diff options
-rw-r--r-- | mesalib/docs/news.html | 9 | ||||
-rw-r--r-- | mesalib/docs/relnotes.html | 1 | ||||
-rw-r--r-- | mesalib/src/mapi/glapi/gen/gl_gentable.py | 44 | ||||
-rw-r--r-- | mesalib/src/mapi/glapi/glapi_gentable.c | 5208 | ||||
-rw-r--r-- | mesalib/src/mesa/main/mipmap.c | 4442 | ||||
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_atom_blend.c | 61 | ||||
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_atom_clip.c | 151 | ||||
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_atom_sampler.c | 550 | ||||
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_atom_scissor.c | 201 | ||||
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_atom_stipple.c | 187 | ||||
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_atom_texture.c | 762 | ||||
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_draw.c | 61 | ||||
-rw-r--r-- | xorg-server/Xi/exevents.c | 29 | ||||
-rw-r--r-- | xorg-server/dix/events.c | 107 | ||||
-rw-r--r-- | xorg-server/include/dix.h | 5 |
15 files changed, 5996 insertions, 5822 deletions
diff --git a/mesalib/docs/news.html b/mesalib/docs/news.html index 5c21c11cd..504f63437 100644 --- a/mesalib/docs/news.html +++ b/mesalib/docs/news.html @@ -11,11 +11,18 @@ <H1>News</H1>
+<h2>June 13, 2011</h2>
+
+<p>
+<a href="relnotes-7.10.3.html">Mesa 7.10.3</a> is released. This is a bug
+fix release.
+</p>
+
<h2>April 6, 2011</h2>
<p>
<a href="relnotes-7.10.2.html">Mesa 7.10.2</a> is released. This is a bug
-fix release release.
+fix release.
</p>
<h2>March 2, 2011</h2>
diff --git a/mesalib/docs/relnotes.html b/mesalib/docs/relnotes.html index 794fd60a2..a44f8a12c 100644 --- a/mesalib/docs/relnotes.html +++ b/mesalib/docs/relnotes.html @@ -14,6 +14,7 @@ The release notes summarize what's new or changed in each Mesa release. <UL>
<LI><A HREF="relnotes-7.11.html">7.11 release notes</A>
+<LI><A HREF="relnotes-7.10.3.html">7.10.3 release notes</A>
<LI><A HREF="relnotes-7.10.2.html">7.10.2 release notes</A>
<LI><A HREF="relnotes-7.10.1.html">7.10.1 release notes</A>
<LI><A HREF="relnotes-7.10.html">7.10 release notes</A>
diff --git a/mesalib/src/mapi/glapi/gen/gl_gentable.py b/mesalib/src/mapi/glapi/gen/gl_gentable.py index 73986f272..814238a76 100644 --- a/mesalib/src/mapi/glapi/gen/gl_gentable.py +++ b/mesalib/src/mapi/glapi/gen/gl_gentable.py @@ -34,6 +34,10 @@ import gl_XML, glX_XML import sys, getopt header = """ +#if defined(DEBUG) && !defined(_WIN32_WCE) +#include <execinfo.h> +#endif + #include <dlfcn.h> #include <stdlib.h> #include <stdio.h> @@ -43,6 +47,40 @@ header = """ #include "glapi.h" #include "glapitable.h" +static void +__glapi_gentable_NoOp(void) { +#if defined(DEBUG) && !defined(_WIN32_WCE) + if (getenv("MESA_DEBUG") || getenv("LIBGL_DEBUG")) { + const char *fstr = "Unknown"; + void *frames[2]; + + if(backtrace(frames, 2) == 2) { + Dl_info info; + dladdr(frames[1], &info); + if(info.dli_sname) + fstr = info.dli_sname; + } + + fprintf(stderr, "Call to unimplemented API: %s\\n", fstr); + } +#endif +} + +static void +__glapi_gentable_set_remaining_noop(struct _glapi_table *disp) { + GLuint entries = _glapi_get_dispatch_table_size(); + void **dispatch = (void **) disp; + int i; + + /* ISO C is annoying sometimes */ + union {_glapi_proc p; void *v;} p; + p.p = __glapi_gentable_NoOp; + + for(i=0; i < entries; i++) + if(dispatch[i] == NULL) + dispatch[i] = p.v; +} + struct _glapi_table * _glapi_create_table_from_handle(void *handle, const char *symbol_prefix) { struct _glapi_table *disp = calloc(1, sizeof(struct _glapi_table)); @@ -56,15 +94,17 @@ _glapi_create_table_from_handle(void *handle, const char *symbol_prefix) { """ footer = """ + __glapi_gentable_set_remaining_noop(disp); + return disp; } """ body_template = """ if(!disp->%(name)s) { + void ** procp = (void **) &disp->%(name)s; snprintf(symboln, sizeof(symboln), "%%s%(entry_point)s", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->%(name)s; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } """ diff --git a/mesalib/src/mapi/glapi/glapi_gentable.c b/mesalib/src/mapi/glapi/glapi_gentable.c index dcbed1c78..6dd02a747 100644 --- a/mesalib/src/mapi/glapi/glapi_gentable.c +++ b/mesalib/src/mapi/glapi/glapi_gentable.c @@ -28,6 +28,10 @@ */ +#if defined(DEBUG) && !defined(_WIN32_WCE) +#include <execinfo.h> +#endif + #include <dlfcn.h> #include <stdlib.h> #include <stdio.h> @@ -37,6 +41,40 @@ #include "glapi.h" #include "glapitable.h" +static void +__glapi_gentable_NoOp(void) { +#if defined(DEBUG) && !defined(_WIN32_WCE) + if (getenv("MESA_DEBUG") || getenv("LIBGL_DEBUG")) { + const char *fstr = "Unknown"; + void *frames[2]; + + if(backtrace(frames, 2) == 2) { + Dl_info info; + dladdr(frames[1], &info); + if(info.dli_sname) + fstr = info.dli_sname; + } + + fprintf(stderr, "Call to unimplemented API: %s\n", fstr); + } +#endif +} + +static void +__glapi_gentable_set_remaining_noop(struct _glapi_table *disp) { + GLuint entries = _glapi_get_dispatch_table_size(); + void **dispatch = (void **) disp; + int i; + + /* ISO C is annoying sometimes */ + union {_glapi_proc p; void *v;} p; + p.p = __glapi_gentable_NoOp; + + for(i=0; i < entries; i++) + if(dispatch[i] == NULL) + dispatch[i] = p.v; +} + struct _glapi_table * _glapi_create_table_from_handle(void *handle, const char *symbol_prefix) { struct _glapi_table *disp = calloc(1, sizeof(struct _glapi_table)); @@ -50,9049 +88,9051 @@ _glapi_create_table_from_handle(void *handle, const char *symbol_prefix) { if(!disp->NewList) { + void ** procp = (void **) &disp->NewList; snprintf(symboln, sizeof(symboln), "%sNewList", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->NewList; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->EndList) { + void ** procp = (void **) &disp->EndList; snprintf(symboln, sizeof(symboln), "%sEndList", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->EndList; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CallList) { + void ** procp = (void **) &disp->CallList; snprintf(symboln, sizeof(symboln), "%sCallList", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CallList; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CallLists) { + void ** procp = (void **) &disp->CallLists; snprintf(symboln, sizeof(symboln), "%sCallLists", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CallLists; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DeleteLists) { + void ** procp = (void **) &disp->DeleteLists; snprintf(symboln, sizeof(symboln), "%sDeleteLists", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DeleteLists; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GenLists) { + void ** procp = (void **) &disp->GenLists; snprintf(symboln, sizeof(symboln), "%sGenLists", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GenLists; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ListBase) { + void ** procp = (void **) &disp->ListBase; snprintf(symboln, sizeof(symboln), "%sListBase", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ListBase; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Begin) { + void ** procp = (void **) &disp->Begin; snprintf(symboln, sizeof(symboln), "%sBegin", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Begin; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Bitmap) { + void ** procp = (void **) &disp->Bitmap; snprintf(symboln, sizeof(symboln), "%sBitmap", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Bitmap; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Color3b) { + void ** procp = (void **) &disp->Color3b; snprintf(symboln, sizeof(symboln), "%sColor3b", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Color3b; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Color3bv) { + void ** procp = (void **) &disp->Color3bv; snprintf(symboln, sizeof(symboln), "%sColor3bv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Color3bv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Color3d) { + void ** procp = (void **) &disp->Color3d; snprintf(symboln, sizeof(symboln), "%sColor3d", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Color3d; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Color3dv) { + void ** procp = (void **) &disp->Color3dv; snprintf(symboln, sizeof(symboln), "%sColor3dv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Color3dv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Color3f) { + void ** procp = (void **) &disp->Color3f; snprintf(symboln, sizeof(symboln), "%sColor3f", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Color3f; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Color3fv) { + void ** procp = (void **) &disp->Color3fv; snprintf(symboln, sizeof(symboln), "%sColor3fv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Color3fv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Color3i) { + void ** procp = (void **) &disp->Color3i; snprintf(symboln, sizeof(symboln), "%sColor3i", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Color3i; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Color3iv) { + void ** procp = (void **) &disp->Color3iv; snprintf(symboln, sizeof(symboln), "%sColor3iv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Color3iv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Color3s) { + void ** procp = (void **) &disp->Color3s; snprintf(symboln, sizeof(symboln), "%sColor3s", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Color3s; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Color3sv) { + void ** procp = (void **) &disp->Color3sv; snprintf(symboln, sizeof(symboln), "%sColor3sv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Color3sv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Color3ub) { + void ** procp = (void **) &disp->Color3ub; snprintf(symboln, sizeof(symboln), "%sColor3ub", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Color3ub; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Color3ubv) { + void ** procp = (void **) &disp->Color3ubv; snprintf(symboln, sizeof(symboln), "%sColor3ubv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Color3ubv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Color3ui) { + void ** procp = (void **) &disp->Color3ui; snprintf(symboln, sizeof(symboln), "%sColor3ui", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Color3ui; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Color3uiv) { + void ** procp = (void **) &disp->Color3uiv; snprintf(symboln, sizeof(symboln), "%sColor3uiv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Color3uiv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Color3us) { + void ** procp = (void **) &disp->Color3us; snprintf(symboln, sizeof(symboln), "%sColor3us", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Color3us; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Color3usv) { + void ** procp = (void **) &disp->Color3usv; snprintf(symboln, sizeof(symboln), "%sColor3usv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Color3usv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Color4b) { + void ** procp = (void **) &disp->Color4b; snprintf(symboln, sizeof(symboln), "%sColor4b", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Color4b; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Color4bv) { + void ** procp = (void **) &disp->Color4bv; snprintf(symboln, sizeof(symboln), "%sColor4bv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Color4bv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Color4d) { + void ** procp = (void **) &disp->Color4d; snprintf(symboln, sizeof(symboln), "%sColor4d", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Color4d; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Color4dv) { + void ** procp = (void **) &disp->Color4dv; snprintf(symboln, sizeof(symboln), "%sColor4dv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Color4dv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Color4f) { + void ** procp = (void **) &disp->Color4f; snprintf(symboln, sizeof(symboln), "%sColor4f", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Color4f; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Color4fv) { + void ** procp = (void **) &disp->Color4fv; snprintf(symboln, sizeof(symboln), "%sColor4fv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Color4fv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Color4i) { + void ** procp = (void **) &disp->Color4i; snprintf(symboln, sizeof(symboln), "%sColor4i", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Color4i; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Color4iv) { + void ** procp = (void **) &disp->Color4iv; snprintf(symboln, sizeof(symboln), "%sColor4iv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Color4iv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Color4s) { + void ** procp = (void **) &disp->Color4s; snprintf(symboln, sizeof(symboln), "%sColor4s", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Color4s; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Color4sv) { + void ** procp = (void **) &disp->Color4sv; snprintf(symboln, sizeof(symboln), "%sColor4sv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Color4sv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Color4ub) { + void ** procp = (void **) &disp->Color4ub; snprintf(symboln, sizeof(symboln), "%sColor4ub", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Color4ub; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Color4ubv) { + void ** procp = (void **) &disp->Color4ubv; snprintf(symboln, sizeof(symboln), "%sColor4ubv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Color4ubv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Color4ui) { + void ** procp = (void **) &disp->Color4ui; snprintf(symboln, sizeof(symboln), "%sColor4ui", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Color4ui; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Color4uiv) { + void ** procp = (void **) &disp->Color4uiv; snprintf(symboln, sizeof(symboln), "%sColor4uiv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Color4uiv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Color4us) { + void ** procp = (void **) &disp->Color4us; snprintf(symboln, sizeof(symboln), "%sColor4us", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Color4us; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Color4usv) { + void ** procp = (void **) &disp->Color4usv; snprintf(symboln, sizeof(symboln), "%sColor4usv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Color4usv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->EdgeFlag) { + void ** procp = (void **) &disp->EdgeFlag; snprintf(symboln, sizeof(symboln), "%sEdgeFlag", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->EdgeFlag; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->EdgeFlagv) { + void ** procp = (void **) &disp->EdgeFlagv; snprintf(symboln, sizeof(symboln), "%sEdgeFlagv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->EdgeFlagv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->End) { + void ** procp = (void **) &disp->End; snprintf(symboln, sizeof(symboln), "%sEnd", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->End; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Indexd) { + void ** procp = (void **) &disp->Indexd; snprintf(symboln, sizeof(symboln), "%sIndexd", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Indexd; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Indexdv) { + void ** procp = (void **) &disp->Indexdv; snprintf(symboln, sizeof(symboln), "%sIndexdv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Indexdv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Indexf) { + void ** procp = (void **) &disp->Indexf; snprintf(symboln, sizeof(symboln), "%sIndexf", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Indexf; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Indexfv) { + void ** procp = (void **) &disp->Indexfv; snprintf(symboln, sizeof(symboln), "%sIndexfv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Indexfv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Indexi) { + void ** procp = (void **) &disp->Indexi; snprintf(symboln, sizeof(symboln), "%sIndexi", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Indexi; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Indexiv) { + void ** procp = (void **) &disp->Indexiv; snprintf(symboln, sizeof(symboln), "%sIndexiv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Indexiv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Indexs) { + void ** procp = (void **) &disp->Indexs; snprintf(symboln, sizeof(symboln), "%sIndexs", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Indexs; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Indexsv) { + void ** procp = (void **) &disp->Indexsv; snprintf(symboln, sizeof(symboln), "%sIndexsv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Indexsv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Normal3b) { + void ** procp = (void **) &disp->Normal3b; snprintf(symboln, sizeof(symboln), "%sNormal3b", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Normal3b; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Normal3bv) { + void ** procp = (void **) &disp->Normal3bv; snprintf(symboln, sizeof(symboln), "%sNormal3bv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Normal3bv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Normal3d) { + void ** procp = (void **) &disp->Normal3d; snprintf(symboln, sizeof(symboln), "%sNormal3d", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Normal3d; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Normal3dv) { + void ** procp = (void **) &disp->Normal3dv; snprintf(symboln, sizeof(symboln), "%sNormal3dv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Normal3dv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Normal3f) { + void ** procp = (void **) &disp->Normal3f; snprintf(symboln, sizeof(symboln), "%sNormal3f", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Normal3f; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Normal3fv) { + void ** procp = (void **) &disp->Normal3fv; snprintf(symboln, sizeof(symboln), "%sNormal3fv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Normal3fv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Normal3i) { + void ** procp = (void **) &disp->Normal3i; snprintf(symboln, sizeof(symboln), "%sNormal3i", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Normal3i; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Normal3iv) { + void ** procp = (void **) &disp->Normal3iv; snprintf(symboln, sizeof(symboln), "%sNormal3iv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Normal3iv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Normal3s) { + void ** procp = (void **) &disp->Normal3s; snprintf(symboln, sizeof(symboln), "%sNormal3s", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Normal3s; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Normal3sv) { + void ** procp = (void **) &disp->Normal3sv; snprintf(symboln, sizeof(symboln), "%sNormal3sv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Normal3sv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->RasterPos2d) { + void ** procp = (void **) &disp->RasterPos2d; snprintf(symboln, sizeof(symboln), "%sRasterPos2d", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos2d; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->RasterPos2dv) { + void ** procp = (void **) &disp->RasterPos2dv; snprintf(symboln, sizeof(symboln), "%sRasterPos2dv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos2dv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->RasterPos2f) { + void ** procp = (void **) &disp->RasterPos2f; snprintf(symboln, sizeof(symboln), "%sRasterPos2f", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos2f; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->RasterPos2fv) { + void ** procp = (void **) &disp->RasterPos2fv; snprintf(symboln, sizeof(symboln), "%sRasterPos2fv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos2fv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->RasterPos2i) { + void ** procp = (void **) &disp->RasterPos2i; snprintf(symboln, sizeof(symboln), "%sRasterPos2i", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos2i; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->RasterPos2iv) { + void ** procp = (void **) &disp->RasterPos2iv; snprintf(symboln, sizeof(symboln), "%sRasterPos2iv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos2iv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->RasterPos2s) { + void ** procp = (void **) &disp->RasterPos2s; snprintf(symboln, sizeof(symboln), "%sRasterPos2s", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos2s; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->RasterPos2sv) { + void ** procp = (void **) &disp->RasterPos2sv; snprintf(symboln, sizeof(symboln), "%sRasterPos2sv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos2sv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->RasterPos3d) { + void ** procp = (void **) &disp->RasterPos3d; snprintf(symboln, sizeof(symboln), "%sRasterPos3d", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos3d; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->RasterPos3dv) { + void ** procp = (void **) &disp->RasterPos3dv; snprintf(symboln, sizeof(symboln), "%sRasterPos3dv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos3dv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->RasterPos3f) { + void ** procp = (void **) &disp->RasterPos3f; snprintf(symboln, sizeof(symboln), "%sRasterPos3f", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos3f; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->RasterPos3fv) { + void ** procp = (void **) &disp->RasterPos3fv; snprintf(symboln, sizeof(symboln), "%sRasterPos3fv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos3fv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->RasterPos3i) { + void ** procp = (void **) &disp->RasterPos3i; snprintf(symboln, sizeof(symboln), "%sRasterPos3i", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos3i; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->RasterPos3iv) { + void ** procp = (void **) &disp->RasterPos3iv; snprintf(symboln, sizeof(symboln), "%sRasterPos3iv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos3iv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->RasterPos3s) { + void ** procp = (void **) &disp->RasterPos3s; snprintf(symboln, sizeof(symboln), "%sRasterPos3s", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos3s; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->RasterPos3sv) { + void ** procp = (void **) &disp->RasterPos3sv; snprintf(symboln, sizeof(symboln), "%sRasterPos3sv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos3sv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->RasterPos4d) { + void ** procp = (void **) &disp->RasterPos4d; snprintf(symboln, sizeof(symboln), "%sRasterPos4d", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos4d; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->RasterPos4dv) { + void ** procp = (void **) &disp->RasterPos4dv; snprintf(symboln, sizeof(symboln), "%sRasterPos4dv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos4dv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->RasterPos4f) { + void ** procp = (void **) &disp->RasterPos4f; snprintf(symboln, sizeof(symboln), "%sRasterPos4f", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos4f; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->RasterPos4fv) { + void ** procp = (void **) &disp->RasterPos4fv; snprintf(symboln, sizeof(symboln), "%sRasterPos4fv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos4fv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->RasterPos4i) { + void ** procp = (void **) &disp->RasterPos4i; snprintf(symboln, sizeof(symboln), "%sRasterPos4i", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos4i; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->RasterPos4iv) { + void ** procp = (void **) &disp->RasterPos4iv; snprintf(symboln, sizeof(symboln), "%sRasterPos4iv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos4iv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->RasterPos4s) { + void ** procp = (void **) &disp->RasterPos4s; snprintf(symboln, sizeof(symboln), "%sRasterPos4s", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos4s; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->RasterPos4sv) { + void ** procp = (void **) &disp->RasterPos4sv; snprintf(symboln, sizeof(symboln), "%sRasterPos4sv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->RasterPos4sv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Rectd) { + void ** procp = (void **) &disp->Rectd; snprintf(symboln, sizeof(symboln), "%sRectd", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Rectd; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Rectdv) { + void ** procp = (void **) &disp->Rectdv; snprintf(symboln, sizeof(symboln), "%sRectdv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Rectdv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Rectf) { + void ** procp = (void **) &disp->Rectf; snprintf(symboln, sizeof(symboln), "%sRectf", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Rectf; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Rectfv) { + void ** procp = (void **) &disp->Rectfv; snprintf(symboln, sizeof(symboln), "%sRectfv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Rectfv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Recti) { + void ** procp = (void **) &disp->Recti; snprintf(symboln, sizeof(symboln), "%sRecti", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Recti; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Rectiv) { + void ** procp = (void **) &disp->Rectiv; snprintf(symboln, sizeof(symboln), "%sRectiv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Rectiv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Rects) { + void ** procp = (void **) &disp->Rects; snprintf(symboln, sizeof(symboln), "%sRects", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Rects; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Rectsv) { + void ** procp = (void **) &disp->Rectsv; snprintf(symboln, sizeof(symboln), "%sRectsv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Rectsv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexCoord1d) { + void ** procp = (void **) &disp->TexCoord1d; snprintf(symboln, sizeof(symboln), "%sTexCoord1d", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord1d; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexCoord1dv) { + void ** procp = (void **) &disp->TexCoord1dv; snprintf(symboln, sizeof(symboln), "%sTexCoord1dv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord1dv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexCoord1f) { + void ** procp = (void **) &disp->TexCoord1f; snprintf(symboln, sizeof(symboln), "%sTexCoord1f", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord1f; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexCoord1fv) { + void ** procp = (void **) &disp->TexCoord1fv; snprintf(symboln, sizeof(symboln), "%sTexCoord1fv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord1fv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexCoord1i) { + void ** procp = (void **) &disp->TexCoord1i; snprintf(symboln, sizeof(symboln), "%sTexCoord1i", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord1i; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexCoord1iv) { + void ** procp = (void **) &disp->TexCoord1iv; snprintf(symboln, sizeof(symboln), "%sTexCoord1iv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord1iv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexCoord1s) { + void ** procp = (void **) &disp->TexCoord1s; snprintf(symboln, sizeof(symboln), "%sTexCoord1s", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord1s; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexCoord1sv) { + void ** procp = (void **) &disp->TexCoord1sv; snprintf(symboln, sizeof(symboln), "%sTexCoord1sv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord1sv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexCoord2d) { + void ** procp = (void **) &disp->TexCoord2d; snprintf(symboln, sizeof(symboln), "%sTexCoord2d", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord2d; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexCoord2dv) { + void ** procp = (void **) &disp->TexCoord2dv; snprintf(symboln, sizeof(symboln), "%sTexCoord2dv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord2dv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexCoord2f) { + void ** procp = (void **) &disp->TexCoord2f; snprintf(symboln, sizeof(symboln), "%sTexCoord2f", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord2f; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexCoord2fv) { + void ** procp = (void **) &disp->TexCoord2fv; snprintf(symboln, sizeof(symboln), "%sTexCoord2fv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord2fv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexCoord2i) { + void ** procp = (void **) &disp->TexCoord2i; snprintf(symboln, sizeof(symboln), "%sTexCoord2i", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord2i; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexCoord2iv) { + void ** procp = (void **) &disp->TexCoord2iv; snprintf(symboln, sizeof(symboln), "%sTexCoord2iv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord2iv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexCoord2s) { + void ** procp = (void **) &disp->TexCoord2s; snprintf(symboln, sizeof(symboln), "%sTexCoord2s", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord2s; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexCoord2sv) { + void ** procp = (void **) &disp->TexCoord2sv; snprintf(symboln, sizeof(symboln), "%sTexCoord2sv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord2sv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexCoord3d) { + void ** procp = (void **) &disp->TexCoord3d; snprintf(symboln, sizeof(symboln), "%sTexCoord3d", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord3d; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexCoord3dv) { + void ** procp = (void **) &disp->TexCoord3dv; snprintf(symboln, sizeof(symboln), "%sTexCoord3dv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord3dv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexCoord3f) { + void ** procp = (void **) &disp->TexCoord3f; snprintf(symboln, sizeof(symboln), "%sTexCoord3f", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord3f; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexCoord3fv) { + void ** procp = (void **) &disp->TexCoord3fv; snprintf(symboln, sizeof(symboln), "%sTexCoord3fv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord3fv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexCoord3i) { + void ** procp = (void **) &disp->TexCoord3i; snprintf(symboln, sizeof(symboln), "%sTexCoord3i", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord3i; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexCoord3iv) { + void ** procp = (void **) &disp->TexCoord3iv; snprintf(symboln, sizeof(symboln), "%sTexCoord3iv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord3iv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexCoord3s) { + void ** procp = (void **) &disp->TexCoord3s; snprintf(symboln, sizeof(symboln), "%sTexCoord3s", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord3s; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexCoord3sv) { + void ** procp = (void **) &disp->TexCoord3sv; snprintf(symboln, sizeof(symboln), "%sTexCoord3sv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord3sv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexCoord4d) { + void ** procp = (void **) &disp->TexCoord4d; snprintf(symboln, sizeof(symboln), "%sTexCoord4d", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord4d; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexCoord4dv) { + void ** procp = (void **) &disp->TexCoord4dv; snprintf(symboln, sizeof(symboln), "%sTexCoord4dv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord4dv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexCoord4f) { + void ** procp = (void **) &disp->TexCoord4f; snprintf(symboln, sizeof(symboln), "%sTexCoord4f", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord4f; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexCoord4fv) { + void ** procp = (void **) &disp->TexCoord4fv; snprintf(symboln, sizeof(symboln), "%sTexCoord4fv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord4fv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexCoord4i) { + void ** procp = (void **) &disp->TexCoord4i; snprintf(symboln, sizeof(symboln), "%sTexCoord4i", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord4i; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexCoord4iv) { + void ** procp = (void **) &disp->TexCoord4iv; snprintf(symboln, sizeof(symboln), "%sTexCoord4iv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord4iv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexCoord4s) { + void ** procp = (void **) &disp->TexCoord4s; snprintf(symboln, sizeof(symboln), "%sTexCoord4s", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord4s; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexCoord4sv) { + void ** procp = (void **) &disp->TexCoord4sv; snprintf(symboln, sizeof(symboln), "%sTexCoord4sv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexCoord4sv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Vertex2d) { + void ** procp = (void **) &disp->Vertex2d; snprintf(symboln, sizeof(symboln), "%sVertex2d", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Vertex2d; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Vertex2dv) { + void ** procp = (void **) &disp->Vertex2dv; snprintf(symboln, sizeof(symboln), "%sVertex2dv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Vertex2dv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Vertex2f) { + void ** procp = (void **) &disp->Vertex2f; snprintf(symboln, sizeof(symboln), "%sVertex2f", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Vertex2f; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Vertex2fv) { + void ** procp = (void **) &disp->Vertex2fv; snprintf(symboln, sizeof(symboln), "%sVertex2fv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Vertex2fv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Vertex2i) { + void ** procp = (void **) &disp->Vertex2i; snprintf(symboln, sizeof(symboln), "%sVertex2i", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Vertex2i; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Vertex2iv) { + void ** procp = (void **) &disp->Vertex2iv; snprintf(symboln, sizeof(symboln), "%sVertex2iv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Vertex2iv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Vertex2s) { + void ** procp = (void **) &disp->Vertex2s; snprintf(symboln, sizeof(symboln), "%sVertex2s", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Vertex2s; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Vertex2sv) { + void ** procp = (void **) &disp->Vertex2sv; snprintf(symboln, sizeof(symboln), "%sVertex2sv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Vertex2sv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Vertex3d) { + void ** procp = (void **) &disp->Vertex3d; snprintf(symboln, sizeof(symboln), "%sVertex3d", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Vertex3d; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Vertex3dv) { + void ** procp = (void **) &disp->Vertex3dv; snprintf(symboln, sizeof(symboln), "%sVertex3dv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Vertex3dv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Vertex3f) { + void ** procp = (void **) &disp->Vertex3f; snprintf(symboln, sizeof(symboln), "%sVertex3f", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Vertex3f; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Vertex3fv) { + void ** procp = (void **) &disp->Vertex3fv; snprintf(symboln, sizeof(symboln), "%sVertex3fv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Vertex3fv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Vertex3i) { + void ** procp = (void **) &disp->Vertex3i; snprintf(symboln, sizeof(symboln), "%sVertex3i", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Vertex3i; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Vertex3iv) { + void ** procp = (void **) &disp->Vertex3iv; snprintf(symboln, sizeof(symboln), "%sVertex3iv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Vertex3iv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Vertex3s) { + void ** procp = (void **) &disp->Vertex3s; snprintf(symboln, sizeof(symboln), "%sVertex3s", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Vertex3s; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Vertex3sv) { + void ** procp = (void **) &disp->Vertex3sv; snprintf(symboln, sizeof(symboln), "%sVertex3sv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Vertex3sv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Vertex4d) { + void ** procp = (void **) &disp->Vertex4d; snprintf(symboln, sizeof(symboln), "%sVertex4d", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Vertex4d; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Vertex4dv) { + void ** procp = (void **) &disp->Vertex4dv; snprintf(symboln, sizeof(symboln), "%sVertex4dv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Vertex4dv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Vertex4f) { + void ** procp = (void **) &disp->Vertex4f; snprintf(symboln, sizeof(symboln), "%sVertex4f", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Vertex4f; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Vertex4fv) { + void ** procp = (void **) &disp->Vertex4fv; snprintf(symboln, sizeof(symboln), "%sVertex4fv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Vertex4fv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Vertex4i) { + void ** procp = (void **) &disp->Vertex4i; snprintf(symboln, sizeof(symboln), "%sVertex4i", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Vertex4i; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Vertex4iv) { + void ** procp = (void **) &disp->Vertex4iv; snprintf(symboln, sizeof(symboln), "%sVertex4iv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Vertex4iv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Vertex4s) { + void ** procp = (void **) &disp->Vertex4s; snprintf(symboln, sizeof(symboln), "%sVertex4s", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Vertex4s; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Vertex4sv) { + void ** procp = (void **) &disp->Vertex4sv; snprintf(symboln, sizeof(symboln), "%sVertex4sv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Vertex4sv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ClipPlane) { + void ** procp = (void **) &disp->ClipPlane; snprintf(symboln, sizeof(symboln), "%sClipPlane", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ClipPlane; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ColorMaterial) { + void ** procp = (void **) &disp->ColorMaterial; snprintf(symboln, sizeof(symboln), "%sColorMaterial", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ColorMaterial; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CullFace) { + void ** procp = (void **) &disp->CullFace; snprintf(symboln, sizeof(symboln), "%sCullFace", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CullFace; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Fogf) { + void ** procp = (void **) &disp->Fogf; snprintf(symboln, sizeof(symboln), "%sFogf", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Fogf; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Fogfv) { + void ** procp = (void **) &disp->Fogfv; snprintf(symboln, sizeof(symboln), "%sFogfv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Fogfv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Fogi) { + void ** procp = (void **) &disp->Fogi; snprintf(symboln, sizeof(symboln), "%sFogi", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Fogi; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Fogiv) { + void ** procp = (void **) &disp->Fogiv; snprintf(symboln, sizeof(symboln), "%sFogiv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Fogiv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->FrontFace) { + void ** procp = (void **) &disp->FrontFace; snprintf(symboln, sizeof(symboln), "%sFrontFace", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->FrontFace; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Hint) { + void ** procp = (void **) &disp->Hint; snprintf(symboln, sizeof(symboln), "%sHint", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Hint; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Lightf) { + void ** procp = (void **) &disp->Lightf; snprintf(symboln, sizeof(symboln), "%sLightf", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Lightf; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Lightfv) { + void ** procp = (void **) &disp->Lightfv; snprintf(symboln, sizeof(symboln), "%sLightfv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Lightfv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Lighti) { + void ** procp = (void **) &disp->Lighti; snprintf(symboln, sizeof(symboln), "%sLighti", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Lighti; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Lightiv) { + void ** procp = (void **) &disp->Lightiv; snprintf(symboln, sizeof(symboln), "%sLightiv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Lightiv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->LightModelf) { + void ** procp = (void **) &disp->LightModelf; snprintf(symboln, sizeof(symboln), "%sLightModelf", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->LightModelf; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->LightModelfv) { + void ** procp = (void **) &disp->LightModelfv; snprintf(symboln, sizeof(symboln), "%sLightModelfv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->LightModelfv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->LightModeli) { + void ** procp = (void **) &disp->LightModeli; snprintf(symboln, sizeof(symboln), "%sLightModeli", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->LightModeli; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->LightModeliv) { + void ** procp = (void **) &disp->LightModeliv; snprintf(symboln, sizeof(symboln), "%sLightModeliv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->LightModeliv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->LineStipple) { + void ** procp = (void **) &disp->LineStipple; snprintf(symboln, sizeof(symboln), "%sLineStipple", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->LineStipple; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->LineWidth) { + void ** procp = (void **) &disp->LineWidth; snprintf(symboln, sizeof(symboln), "%sLineWidth", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->LineWidth; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Materialf) { + void ** procp = (void **) &disp->Materialf; snprintf(symboln, sizeof(symboln), "%sMaterialf", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Materialf; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Materialfv) { + void ** procp = (void **) &disp->Materialfv; snprintf(symboln, sizeof(symboln), "%sMaterialfv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Materialfv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Materiali) { + void ** procp = (void **) &disp->Materiali; snprintf(symboln, sizeof(symboln), "%sMateriali", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Materiali; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Materialiv) { + void ** procp = (void **) &disp->Materialiv; snprintf(symboln, sizeof(symboln), "%sMaterialiv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Materialiv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PointSize) { + void ** procp = (void **) &disp->PointSize; snprintf(symboln, sizeof(symboln), "%sPointSize", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PointSize; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PolygonMode) { + void ** procp = (void **) &disp->PolygonMode; snprintf(symboln, sizeof(symboln), "%sPolygonMode", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PolygonMode; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PolygonStipple) { + void ** procp = (void **) &disp->PolygonStipple; snprintf(symboln, sizeof(symboln), "%sPolygonStipple", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PolygonStipple; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Scissor) { + void ** procp = (void **) &disp->Scissor; snprintf(symboln, sizeof(symboln), "%sScissor", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Scissor; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ShadeModel) { + void ** procp = (void **) &disp->ShadeModel; snprintf(symboln, sizeof(symboln), "%sShadeModel", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ShadeModel; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexParameterf) { + void ** procp = (void **) &disp->TexParameterf; snprintf(symboln, sizeof(symboln), "%sTexParameterf", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexParameterf; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexParameterfv) { + void ** procp = (void **) &disp->TexParameterfv; snprintf(symboln, sizeof(symboln), "%sTexParameterfv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexParameterfv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexParameteri) { + void ** procp = (void **) &disp->TexParameteri; snprintf(symboln, sizeof(symboln), "%sTexParameteri", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexParameteri; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexParameteriv) { + void ** procp = (void **) &disp->TexParameteriv; snprintf(symboln, sizeof(symboln), "%sTexParameteriv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexParameteriv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexImage1D) { + void ** procp = (void **) &disp->TexImage1D; snprintf(symboln, sizeof(symboln), "%sTexImage1D", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexImage1D; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexImage2D) { + void ** procp = (void **) &disp->TexImage2D; snprintf(symboln, sizeof(symboln), "%sTexImage2D", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexImage2D; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexEnvf) { + void ** procp = (void **) &disp->TexEnvf; snprintf(symboln, sizeof(symboln), "%sTexEnvf", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexEnvf; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexEnvfv) { + void ** procp = (void **) &disp->TexEnvfv; snprintf(symboln, sizeof(symboln), "%sTexEnvfv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexEnvfv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexEnvi) { + void ** procp = (void **) &disp->TexEnvi; snprintf(symboln, sizeof(symboln), "%sTexEnvi", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexEnvi; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexEnviv) { + void ** procp = (void **) &disp->TexEnviv; snprintf(symboln, sizeof(symboln), "%sTexEnviv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexEnviv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexGend) { + void ** procp = (void **) &disp->TexGend; snprintf(symboln, sizeof(symboln), "%sTexGend", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexGend; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexGendv) { + void ** procp = (void **) &disp->TexGendv; snprintf(symboln, sizeof(symboln), "%sTexGendv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexGendv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexGenf) { + void ** procp = (void **) &disp->TexGenf; snprintf(symboln, sizeof(symboln), "%sTexGenf", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexGenf; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexGenfv) { + void ** procp = (void **) &disp->TexGenfv; snprintf(symboln, sizeof(symboln), "%sTexGenfv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexGenfv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexGeni) { + void ** procp = (void **) &disp->TexGeni; snprintf(symboln, sizeof(symboln), "%sTexGeni", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexGeni; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexGeniv) { + void ** procp = (void **) &disp->TexGeniv; snprintf(symboln, sizeof(symboln), "%sTexGeniv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexGeniv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->FeedbackBuffer) { + void ** procp = (void **) &disp->FeedbackBuffer; snprintf(symboln, sizeof(symboln), "%sFeedbackBuffer", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->FeedbackBuffer; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SelectBuffer) { + void ** procp = (void **) &disp->SelectBuffer; snprintf(symboln, sizeof(symboln), "%sSelectBuffer", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SelectBuffer; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->RenderMode) { + void ** procp = (void **) &disp->RenderMode; snprintf(symboln, sizeof(symboln), "%sRenderMode", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->RenderMode; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->InitNames) { + void ** procp = (void **) &disp->InitNames; snprintf(symboln, sizeof(symboln), "%sInitNames", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->InitNames; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->LoadName) { + void ** procp = (void **) &disp->LoadName; snprintf(symboln, sizeof(symboln), "%sLoadName", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->LoadName; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PassThrough) { + void ** procp = (void **) &disp->PassThrough; snprintf(symboln, sizeof(symboln), "%sPassThrough", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PassThrough; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PopName) { + void ** procp = (void **) &disp->PopName; snprintf(symboln, sizeof(symboln), "%sPopName", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PopName; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PushName) { + void ** procp = (void **) &disp->PushName; snprintf(symboln, sizeof(symboln), "%sPushName", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PushName; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DrawBuffer) { + void ** procp = (void **) &disp->DrawBuffer; snprintf(symboln, sizeof(symboln), "%sDrawBuffer", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DrawBuffer; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Clear) { + void ** procp = (void **) &disp->Clear; snprintf(symboln, sizeof(symboln), "%sClear", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Clear; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ClearAccum) { + void ** procp = (void **) &disp->ClearAccum; snprintf(symboln, sizeof(symboln), "%sClearAccum", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ClearAccum; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ClearIndex) { + void ** procp = (void **) &disp->ClearIndex; snprintf(symboln, sizeof(symboln), "%sClearIndex", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ClearIndex; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ClearColor) { + void ** procp = (void **) &disp->ClearColor; snprintf(symboln, sizeof(symboln), "%sClearColor", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ClearColor; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ClearStencil) { + void ** procp = (void **) &disp->ClearStencil; snprintf(symboln, sizeof(symboln), "%sClearStencil", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ClearStencil; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ClearDepth) { + void ** procp = (void **) &disp->ClearDepth; snprintf(symboln, sizeof(symboln), "%sClearDepth", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ClearDepth; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->StencilMask) { + void ** procp = (void **) &disp->StencilMask; snprintf(symboln, sizeof(symboln), "%sStencilMask", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->StencilMask; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ColorMask) { + void ** procp = (void **) &disp->ColorMask; snprintf(symboln, sizeof(symboln), "%sColorMask", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ColorMask; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DepthMask) { + void ** procp = (void **) &disp->DepthMask; snprintf(symboln, sizeof(symboln), "%sDepthMask", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DepthMask; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->IndexMask) { + void ** procp = (void **) &disp->IndexMask; snprintf(symboln, sizeof(symboln), "%sIndexMask", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->IndexMask; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Accum) { + void ** procp = (void **) &disp->Accum; snprintf(symboln, sizeof(symboln), "%sAccum", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Accum; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Disable) { + void ** procp = (void **) &disp->Disable; snprintf(symboln, sizeof(symboln), "%sDisable", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Disable; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Enable) { + void ** procp = (void **) &disp->Enable; snprintf(symboln, sizeof(symboln), "%sEnable", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Enable; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Finish) { + void ** procp = (void **) &disp->Finish; snprintf(symboln, sizeof(symboln), "%sFinish", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Finish; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Flush) { + void ** procp = (void **) &disp->Flush; snprintf(symboln, sizeof(symboln), "%sFlush", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Flush; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PopAttrib) { + void ** procp = (void **) &disp->PopAttrib; snprintf(symboln, sizeof(symboln), "%sPopAttrib", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PopAttrib; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PushAttrib) { + void ** procp = (void **) &disp->PushAttrib; snprintf(symboln, sizeof(symboln), "%sPushAttrib", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PushAttrib; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Map1d) { + void ** procp = (void **) &disp->Map1d; snprintf(symboln, sizeof(symboln), "%sMap1d", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Map1d; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Map1f) { + void ** procp = (void **) &disp->Map1f; snprintf(symboln, sizeof(symboln), "%sMap1f", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Map1f; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Map2d) { + void ** procp = (void **) &disp->Map2d; snprintf(symboln, sizeof(symboln), "%sMap2d", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Map2d; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Map2f) { + void ** procp = (void **) &disp->Map2f; snprintf(symboln, sizeof(symboln), "%sMap2f", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Map2f; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MapGrid1d) { + void ** procp = (void **) &disp->MapGrid1d; snprintf(symboln, sizeof(symboln), "%sMapGrid1d", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MapGrid1d; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MapGrid1f) { + void ** procp = (void **) &disp->MapGrid1f; snprintf(symboln, sizeof(symboln), "%sMapGrid1f", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MapGrid1f; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MapGrid2d) { + void ** procp = (void **) &disp->MapGrid2d; snprintf(symboln, sizeof(symboln), "%sMapGrid2d", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MapGrid2d; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MapGrid2f) { + void ** procp = (void **) &disp->MapGrid2f; snprintf(symboln, sizeof(symboln), "%sMapGrid2f", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MapGrid2f; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->EvalCoord1d) { + void ** procp = (void **) &disp->EvalCoord1d; snprintf(symboln, sizeof(symboln), "%sEvalCoord1d", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->EvalCoord1d; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->EvalCoord1dv) { + void ** procp = (void **) &disp->EvalCoord1dv; snprintf(symboln, sizeof(symboln), "%sEvalCoord1dv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->EvalCoord1dv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->EvalCoord1f) { + void ** procp = (void **) &disp->EvalCoord1f; snprintf(symboln, sizeof(symboln), "%sEvalCoord1f", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->EvalCoord1f; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->EvalCoord1fv) { + void ** procp = (void **) &disp->EvalCoord1fv; snprintf(symboln, sizeof(symboln), "%sEvalCoord1fv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->EvalCoord1fv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->EvalCoord2d) { + void ** procp = (void **) &disp->EvalCoord2d; snprintf(symboln, sizeof(symboln), "%sEvalCoord2d", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->EvalCoord2d; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->EvalCoord2dv) { + void ** procp = (void **) &disp->EvalCoord2dv; snprintf(symboln, sizeof(symboln), "%sEvalCoord2dv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->EvalCoord2dv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->EvalCoord2f) { + void ** procp = (void **) &disp->EvalCoord2f; snprintf(symboln, sizeof(symboln), "%sEvalCoord2f", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->EvalCoord2f; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->EvalCoord2fv) { + void ** procp = (void **) &disp->EvalCoord2fv; snprintf(symboln, sizeof(symboln), "%sEvalCoord2fv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->EvalCoord2fv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->EvalMesh1) { + void ** procp = (void **) &disp->EvalMesh1; snprintf(symboln, sizeof(symboln), "%sEvalMesh1", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->EvalMesh1; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->EvalPoint1) { + void ** procp = (void **) &disp->EvalPoint1; snprintf(symboln, sizeof(symboln), "%sEvalPoint1", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->EvalPoint1; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->EvalMesh2) { + void ** procp = (void **) &disp->EvalMesh2; snprintf(symboln, sizeof(symboln), "%sEvalMesh2", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->EvalMesh2; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->EvalPoint2) { + void ** procp = (void **) &disp->EvalPoint2; snprintf(symboln, sizeof(symboln), "%sEvalPoint2", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->EvalPoint2; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->AlphaFunc) { + void ** procp = (void **) &disp->AlphaFunc; snprintf(symboln, sizeof(symboln), "%sAlphaFunc", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->AlphaFunc; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BlendFunc) { + void ** procp = (void **) &disp->BlendFunc; snprintf(symboln, sizeof(symboln), "%sBlendFunc", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BlendFunc; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->LogicOp) { + void ** procp = (void **) &disp->LogicOp; snprintf(symboln, sizeof(symboln), "%sLogicOp", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->LogicOp; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->StencilFunc) { + void ** procp = (void **) &disp->StencilFunc; snprintf(symboln, sizeof(symboln), "%sStencilFunc", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->StencilFunc; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->StencilOp) { + void ** procp = (void **) &disp->StencilOp; snprintf(symboln, sizeof(symboln), "%sStencilOp", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->StencilOp; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DepthFunc) { + void ** procp = (void **) &disp->DepthFunc; snprintf(symboln, sizeof(symboln), "%sDepthFunc", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DepthFunc; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PixelZoom) { + void ** procp = (void **) &disp->PixelZoom; snprintf(symboln, sizeof(symboln), "%sPixelZoom", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PixelZoom; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PixelTransferf) { + void ** procp = (void **) &disp->PixelTransferf; snprintf(symboln, sizeof(symboln), "%sPixelTransferf", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PixelTransferf; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PixelTransferi) { + void ** procp = (void **) &disp->PixelTransferi; snprintf(symboln, sizeof(symboln), "%sPixelTransferi", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PixelTransferi; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PixelStoref) { + void ** procp = (void **) &disp->PixelStoref; snprintf(symboln, sizeof(symboln), "%sPixelStoref", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PixelStoref; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PixelStorei) { + void ** procp = (void **) &disp->PixelStorei; snprintf(symboln, sizeof(symboln), "%sPixelStorei", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PixelStorei; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PixelMapfv) { + void ** procp = (void **) &disp->PixelMapfv; snprintf(symboln, sizeof(symboln), "%sPixelMapfv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PixelMapfv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PixelMapuiv) { + void ** procp = (void **) &disp->PixelMapuiv; snprintf(symboln, sizeof(symboln), "%sPixelMapuiv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PixelMapuiv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PixelMapusv) { + void ** procp = (void **) &disp->PixelMapusv; snprintf(symboln, sizeof(symboln), "%sPixelMapusv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PixelMapusv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ReadBuffer) { + void ** procp = (void **) &disp->ReadBuffer; snprintf(symboln, sizeof(symboln), "%sReadBuffer", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ReadBuffer; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CopyPixels) { + void ** procp = (void **) &disp->CopyPixels; snprintf(symboln, sizeof(symboln), "%sCopyPixels", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CopyPixels; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ReadPixels) { + void ** procp = (void **) &disp->ReadPixels; snprintf(symboln, sizeof(symboln), "%sReadPixels", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ReadPixels; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DrawPixels) { + void ** procp = (void **) &disp->DrawPixels; snprintf(symboln, sizeof(symboln), "%sDrawPixels", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DrawPixels; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetBooleanv) { + void ** procp = (void **) &disp->GetBooleanv; snprintf(symboln, sizeof(symboln), "%sGetBooleanv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetBooleanv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetClipPlane) { + void ** procp = (void **) &disp->GetClipPlane; snprintf(symboln, sizeof(symboln), "%sGetClipPlane", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetClipPlane; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetDoublev) { + void ** procp = (void **) &disp->GetDoublev; snprintf(symboln, sizeof(symboln), "%sGetDoublev", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetDoublev; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetError) { + void ** procp = (void **) &disp->GetError; snprintf(symboln, sizeof(symboln), "%sGetError", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetError; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetFloatv) { + void ** procp = (void **) &disp->GetFloatv; snprintf(symboln, sizeof(symboln), "%sGetFloatv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetFloatv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetIntegerv) { + void ** procp = (void **) &disp->GetIntegerv; snprintf(symboln, sizeof(symboln), "%sGetIntegerv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetIntegerv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetLightfv) { + void ** procp = (void **) &disp->GetLightfv; snprintf(symboln, sizeof(symboln), "%sGetLightfv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetLightfv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetLightiv) { + void ** procp = (void **) &disp->GetLightiv; snprintf(symboln, sizeof(symboln), "%sGetLightiv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetLightiv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetMapdv) { + void ** procp = (void **) &disp->GetMapdv; snprintf(symboln, sizeof(symboln), "%sGetMapdv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetMapdv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetMapfv) { + void ** procp = (void **) &disp->GetMapfv; snprintf(symboln, sizeof(symboln), "%sGetMapfv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetMapfv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetMapiv) { + void ** procp = (void **) &disp->GetMapiv; snprintf(symboln, sizeof(symboln), "%sGetMapiv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetMapiv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetMaterialfv) { + void ** procp = (void **) &disp->GetMaterialfv; snprintf(symboln, sizeof(symboln), "%sGetMaterialfv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetMaterialfv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetMaterialiv) { + void ** procp = (void **) &disp->GetMaterialiv; snprintf(symboln, sizeof(symboln), "%sGetMaterialiv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetMaterialiv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetPixelMapfv) { + void ** procp = (void **) &disp->GetPixelMapfv; snprintf(symboln, sizeof(symboln), "%sGetPixelMapfv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetPixelMapfv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetPixelMapuiv) { + void ** procp = (void **) &disp->GetPixelMapuiv; snprintf(symboln, sizeof(symboln), "%sGetPixelMapuiv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetPixelMapuiv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetPixelMapusv) { + void ** procp = (void **) &disp->GetPixelMapusv; snprintf(symboln, sizeof(symboln), "%sGetPixelMapusv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetPixelMapusv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetPolygonStipple) { + void ** procp = (void **) &disp->GetPolygonStipple; snprintf(symboln, sizeof(symboln), "%sGetPolygonStipple", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetPolygonStipple; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetString) { + void ** procp = (void **) &disp->GetString; snprintf(symboln, sizeof(symboln), "%sGetString", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetString; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetTexEnvfv) { + void ** procp = (void **) &disp->GetTexEnvfv; snprintf(symboln, sizeof(symboln), "%sGetTexEnvfv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetTexEnvfv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetTexEnviv) { + void ** procp = (void **) &disp->GetTexEnviv; snprintf(symboln, sizeof(symboln), "%sGetTexEnviv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetTexEnviv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetTexGendv) { + void ** procp = (void **) &disp->GetTexGendv; snprintf(symboln, sizeof(symboln), "%sGetTexGendv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetTexGendv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetTexGenfv) { + void ** procp = (void **) &disp->GetTexGenfv; snprintf(symboln, sizeof(symboln), "%sGetTexGenfv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetTexGenfv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetTexGeniv) { + void ** procp = (void **) &disp->GetTexGeniv; snprintf(symboln, sizeof(symboln), "%sGetTexGeniv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetTexGeniv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetTexImage) { + void ** procp = (void **) &disp->GetTexImage; snprintf(symboln, sizeof(symboln), "%sGetTexImage", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetTexImage; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetTexParameterfv) { + void ** procp = (void **) &disp->GetTexParameterfv; snprintf(symboln, sizeof(symboln), "%sGetTexParameterfv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetTexParameterfv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetTexParameteriv) { + void ** procp = (void **) &disp->GetTexParameteriv; snprintf(symboln, sizeof(symboln), "%sGetTexParameteriv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetTexParameteriv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetTexLevelParameterfv) { + void ** procp = (void **) &disp->GetTexLevelParameterfv; snprintf(symboln, sizeof(symboln), "%sGetTexLevelParameterfv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetTexLevelParameterfv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetTexLevelParameteriv) { + void ** procp = (void **) &disp->GetTexLevelParameteriv; snprintf(symboln, sizeof(symboln), "%sGetTexLevelParameteriv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetTexLevelParameteriv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->IsEnabled) { + void ** procp = (void **) &disp->IsEnabled; snprintf(symboln, sizeof(symboln), "%sIsEnabled", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->IsEnabled; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->IsList) { + void ** procp = (void **) &disp->IsList; snprintf(symboln, sizeof(symboln), "%sIsList", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->IsList; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DepthRange) { + void ** procp = (void **) &disp->DepthRange; snprintf(symboln, sizeof(symboln), "%sDepthRange", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DepthRange; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Frustum) { + void ** procp = (void **) &disp->Frustum; snprintf(symboln, sizeof(symboln), "%sFrustum", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Frustum; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->LoadIdentity) { + void ** procp = (void **) &disp->LoadIdentity; snprintf(symboln, sizeof(symboln), "%sLoadIdentity", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->LoadIdentity; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->LoadMatrixf) { + void ** procp = (void **) &disp->LoadMatrixf; snprintf(symboln, sizeof(symboln), "%sLoadMatrixf", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->LoadMatrixf; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->LoadMatrixd) { + void ** procp = (void **) &disp->LoadMatrixd; snprintf(symboln, sizeof(symboln), "%sLoadMatrixd", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->LoadMatrixd; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MatrixMode) { + void ** procp = (void **) &disp->MatrixMode; snprintf(symboln, sizeof(symboln), "%sMatrixMode", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MatrixMode; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultMatrixf) { + void ** procp = (void **) &disp->MultMatrixf; snprintf(symboln, sizeof(symboln), "%sMultMatrixf", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultMatrixf; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultMatrixd) { + void ** procp = (void **) &disp->MultMatrixd; snprintf(symboln, sizeof(symboln), "%sMultMatrixd", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultMatrixd; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Ortho) { + void ** procp = (void **) &disp->Ortho; snprintf(symboln, sizeof(symboln), "%sOrtho", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Ortho; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PopMatrix) { + void ** procp = (void **) &disp->PopMatrix; snprintf(symboln, sizeof(symboln), "%sPopMatrix", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PopMatrix; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PushMatrix) { + void ** procp = (void **) &disp->PushMatrix; snprintf(symboln, sizeof(symboln), "%sPushMatrix", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PushMatrix; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Rotated) { + void ** procp = (void **) &disp->Rotated; snprintf(symboln, sizeof(symboln), "%sRotated", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Rotated; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Rotatef) { + void ** procp = (void **) &disp->Rotatef; snprintf(symboln, sizeof(symboln), "%sRotatef", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Rotatef; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Scaled) { + void ** procp = (void **) &disp->Scaled; snprintf(symboln, sizeof(symboln), "%sScaled", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Scaled; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Scalef) { + void ** procp = (void **) &disp->Scalef; snprintf(symboln, sizeof(symboln), "%sScalef", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Scalef; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Translated) { + void ** procp = (void **) &disp->Translated; snprintf(symboln, sizeof(symboln), "%sTranslated", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Translated; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Translatef) { + void ** procp = (void **) &disp->Translatef; snprintf(symboln, sizeof(symboln), "%sTranslatef", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Translatef; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Viewport) { + void ** procp = (void **) &disp->Viewport; snprintf(symboln, sizeof(symboln), "%sViewport", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Viewport; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ArrayElement) { + void ** procp = (void **) &disp->ArrayElement; snprintf(symboln, sizeof(symboln), "%sArrayElement", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ArrayElement; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ArrayElement) { + void ** procp = (void **) &disp->ArrayElement; snprintf(symboln, sizeof(symboln), "%sArrayElementEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ArrayElement; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BindTexture) { + void ** procp = (void **) &disp->BindTexture; snprintf(symboln, sizeof(symboln), "%sBindTexture", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BindTexture; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BindTexture) { + void ** procp = (void **) &disp->BindTexture; snprintf(symboln, sizeof(symboln), "%sBindTextureEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BindTexture; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ColorPointer) { + void ** procp = (void **) &disp->ColorPointer; snprintf(symboln, sizeof(symboln), "%sColorPointer", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ColorPointer; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DisableClientState) { + void ** procp = (void **) &disp->DisableClientState; snprintf(symboln, sizeof(symboln), "%sDisableClientState", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DisableClientState; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DrawArrays) { + void ** procp = (void **) &disp->DrawArrays; snprintf(symboln, sizeof(symboln), "%sDrawArrays", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DrawArrays; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DrawArrays) { + void ** procp = (void **) &disp->DrawArrays; snprintf(symboln, sizeof(symboln), "%sDrawArraysEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DrawArrays; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DrawElements) { + void ** procp = (void **) &disp->DrawElements; snprintf(symboln, sizeof(symboln), "%sDrawElements", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DrawElements; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->EdgeFlagPointer) { + void ** procp = (void **) &disp->EdgeFlagPointer; snprintf(symboln, sizeof(symboln), "%sEdgeFlagPointer", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->EdgeFlagPointer; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->EnableClientState) { + void ** procp = (void **) &disp->EnableClientState; snprintf(symboln, sizeof(symboln), "%sEnableClientState", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->EnableClientState; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->IndexPointer) { + void ** procp = (void **) &disp->IndexPointer; snprintf(symboln, sizeof(symboln), "%sIndexPointer", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->IndexPointer; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Indexub) { + void ** procp = (void **) &disp->Indexub; snprintf(symboln, sizeof(symboln), "%sIndexub", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Indexub; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Indexubv) { + void ** procp = (void **) &disp->Indexubv; snprintf(symboln, sizeof(symboln), "%sIndexubv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Indexubv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->InterleavedArrays) { + void ** procp = (void **) &disp->InterleavedArrays; snprintf(symboln, sizeof(symboln), "%sInterleavedArrays", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->InterleavedArrays; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->NormalPointer) { + void ** procp = (void **) &disp->NormalPointer; snprintf(symboln, sizeof(symboln), "%sNormalPointer", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->NormalPointer; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PolygonOffset) { + void ** procp = (void **) &disp->PolygonOffset; snprintf(symboln, sizeof(symboln), "%sPolygonOffset", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PolygonOffset; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexCoordPointer) { + void ** procp = (void **) &disp->TexCoordPointer; snprintf(symboln, sizeof(symboln), "%sTexCoordPointer", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexCoordPointer; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexPointer) { + void ** procp = (void **) &disp->VertexPointer; snprintf(symboln, sizeof(symboln), "%sVertexPointer", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexPointer; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->AreTexturesResident) { + void ** procp = (void **) &disp->AreTexturesResident; snprintf(symboln, sizeof(symboln), "%sAreTexturesResident", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->AreTexturesResident; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->AreTexturesResident) { + void ** procp = (void **) &disp->AreTexturesResident; snprintf(symboln, sizeof(symboln), "%sAreTexturesResidentEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->AreTexturesResident; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CopyTexImage1D) { + void ** procp = (void **) &disp->CopyTexImage1D; snprintf(symboln, sizeof(symboln), "%sCopyTexImage1D", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CopyTexImage1D; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CopyTexImage1D) { + void ** procp = (void **) &disp->CopyTexImage1D; snprintf(symboln, sizeof(symboln), "%sCopyTexImage1DEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CopyTexImage1D; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CopyTexImage2D) { + void ** procp = (void **) &disp->CopyTexImage2D; snprintf(symboln, sizeof(symboln), "%sCopyTexImage2D", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CopyTexImage2D; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CopyTexImage2D) { + void ** procp = (void **) &disp->CopyTexImage2D; snprintf(symboln, sizeof(symboln), "%sCopyTexImage2DEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CopyTexImage2D; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CopyTexSubImage1D) { + void ** procp = (void **) &disp->CopyTexSubImage1D; snprintf(symboln, sizeof(symboln), "%sCopyTexSubImage1D", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CopyTexSubImage1D; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CopyTexSubImage1D) { + void ** procp = (void **) &disp->CopyTexSubImage1D; snprintf(symboln, sizeof(symboln), "%sCopyTexSubImage1DEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CopyTexSubImage1D; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CopyTexSubImage2D) { + void ** procp = (void **) &disp->CopyTexSubImage2D; snprintf(symboln, sizeof(symboln), "%sCopyTexSubImage2D", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CopyTexSubImage2D; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CopyTexSubImage2D) { + void ** procp = (void **) &disp->CopyTexSubImage2D; snprintf(symboln, sizeof(symboln), "%sCopyTexSubImage2DEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CopyTexSubImage2D; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DeleteTextures) { + void ** procp = (void **) &disp->DeleteTextures; snprintf(symboln, sizeof(symboln), "%sDeleteTextures", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DeleteTextures; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DeleteTextures) { + void ** procp = (void **) &disp->DeleteTextures; snprintf(symboln, sizeof(symboln), "%sDeleteTexturesEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DeleteTextures; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GenTextures) { + void ** procp = (void **) &disp->GenTextures; snprintf(symboln, sizeof(symboln), "%sGenTextures", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GenTextures; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GenTextures) { + void ** procp = (void **) &disp->GenTextures; snprintf(symboln, sizeof(symboln), "%sGenTexturesEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GenTextures; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetPointerv) { + void ** procp = (void **) &disp->GetPointerv; snprintf(symboln, sizeof(symboln), "%sGetPointerv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetPointerv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetPointerv) { + void ** procp = (void **) &disp->GetPointerv; snprintf(symboln, sizeof(symboln), "%sGetPointervEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetPointerv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->IsTexture) { + void ** procp = (void **) &disp->IsTexture; snprintf(symboln, sizeof(symboln), "%sIsTexture", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->IsTexture; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->IsTexture) { + void ** procp = (void **) &disp->IsTexture; snprintf(symboln, sizeof(symboln), "%sIsTextureEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->IsTexture; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PrioritizeTextures) { + void ** procp = (void **) &disp->PrioritizeTextures; snprintf(symboln, sizeof(symboln), "%sPrioritizeTextures", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PrioritizeTextures; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PrioritizeTextures) { + void ** procp = (void **) &disp->PrioritizeTextures; snprintf(symboln, sizeof(symboln), "%sPrioritizeTexturesEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PrioritizeTextures; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexSubImage1D) { + void ** procp = (void **) &disp->TexSubImage1D; snprintf(symboln, sizeof(symboln), "%sTexSubImage1D", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexSubImage1D; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexSubImage1D) { + void ** procp = (void **) &disp->TexSubImage1D; snprintf(symboln, sizeof(symboln), "%sTexSubImage1DEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexSubImage1D; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexSubImage2D) { + void ** procp = (void **) &disp->TexSubImage2D; snprintf(symboln, sizeof(symboln), "%sTexSubImage2D", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexSubImage2D; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexSubImage2D) { + void ** procp = (void **) &disp->TexSubImage2D; snprintf(symboln, sizeof(symboln), "%sTexSubImage2DEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexSubImage2D; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PopClientAttrib) { + void ** procp = (void **) &disp->PopClientAttrib; snprintf(symboln, sizeof(symboln), "%sPopClientAttrib", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PopClientAttrib; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PushClientAttrib) { + void ** procp = (void **) &disp->PushClientAttrib; snprintf(symboln, sizeof(symboln), "%sPushClientAttrib", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PushClientAttrib; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BlendColor) { + void ** procp = (void **) &disp->BlendColor; snprintf(symboln, sizeof(symboln), "%sBlendColor", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BlendColor; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BlendColor) { + void ** procp = (void **) &disp->BlendColor; snprintf(symboln, sizeof(symboln), "%sBlendColorEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BlendColor; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BlendEquation) { + void ** procp = (void **) &disp->BlendEquation; snprintf(symboln, sizeof(symboln), "%sBlendEquation", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BlendEquation; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BlendEquation) { + void ** procp = (void **) &disp->BlendEquation; snprintf(symboln, sizeof(symboln), "%sBlendEquationEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BlendEquation; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DrawRangeElements) { + void ** procp = (void **) &disp->DrawRangeElements; snprintf(symboln, sizeof(symboln), "%sDrawRangeElements", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DrawRangeElements; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DrawRangeElements) { + void ** procp = (void **) &disp->DrawRangeElements; snprintf(symboln, sizeof(symboln), "%sDrawRangeElementsEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DrawRangeElements; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ColorTable) { + void ** procp = (void **) &disp->ColorTable; snprintf(symboln, sizeof(symboln), "%sColorTable", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ColorTable; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ColorTable) { + void ** procp = (void **) &disp->ColorTable; snprintf(symboln, sizeof(symboln), "%sColorTableSGI", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ColorTable; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ColorTable) { + void ** procp = (void **) &disp->ColorTable; snprintf(symboln, sizeof(symboln), "%sColorTableEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ColorTable; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ColorTableParameterfv) { + void ** procp = (void **) &disp->ColorTableParameterfv; snprintf(symboln, sizeof(symboln), "%sColorTableParameterfv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ColorTableParameterfv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ColorTableParameterfv) { + void ** procp = (void **) &disp->ColorTableParameterfv; snprintf(symboln, sizeof(symboln), "%sColorTableParameterfvSGI", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ColorTableParameterfv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ColorTableParameteriv) { + void ** procp = (void **) &disp->ColorTableParameteriv; snprintf(symboln, sizeof(symboln), "%sColorTableParameteriv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ColorTableParameteriv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ColorTableParameteriv) { + void ** procp = (void **) &disp->ColorTableParameteriv; snprintf(symboln, sizeof(symboln), "%sColorTableParameterivSGI", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ColorTableParameteriv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CopyColorTable) { + void ** procp = (void **) &disp->CopyColorTable; snprintf(symboln, sizeof(symboln), "%sCopyColorTable", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CopyColorTable; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CopyColorTable) { + void ** procp = (void **) &disp->CopyColorTable; snprintf(symboln, sizeof(symboln), "%sCopyColorTableSGI", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CopyColorTable; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetColorTable) { + void ** procp = (void **) &disp->GetColorTable; snprintf(symboln, sizeof(symboln), "%sGetColorTable", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetColorTable; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetColorTable) { + void ** procp = (void **) &disp->GetColorTable; snprintf(symboln, sizeof(symboln), "%sGetColorTableSGI", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetColorTable; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetColorTable) { + void ** procp = (void **) &disp->GetColorTable; snprintf(symboln, sizeof(symboln), "%sGetColorTableEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetColorTable; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetColorTableParameterfv) { + void ** procp = (void **) &disp->GetColorTableParameterfv; snprintf(symboln, sizeof(symboln), "%sGetColorTableParameterfv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetColorTableParameterfv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetColorTableParameterfv) { + void ** procp = (void **) &disp->GetColorTableParameterfv; snprintf(symboln, sizeof(symboln), "%sGetColorTableParameterfvSGI", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetColorTableParameterfv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetColorTableParameterfv) { + void ** procp = (void **) &disp->GetColorTableParameterfv; snprintf(symboln, sizeof(symboln), "%sGetColorTableParameterfvEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetColorTableParameterfv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetColorTableParameteriv) { + void ** procp = (void **) &disp->GetColorTableParameteriv; snprintf(symboln, sizeof(symboln), "%sGetColorTableParameteriv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetColorTableParameteriv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetColorTableParameteriv) { + void ** procp = (void **) &disp->GetColorTableParameteriv; snprintf(symboln, sizeof(symboln), "%sGetColorTableParameterivSGI", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetColorTableParameteriv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetColorTableParameteriv) { + void ** procp = (void **) &disp->GetColorTableParameteriv; snprintf(symboln, sizeof(symboln), "%sGetColorTableParameterivEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetColorTableParameteriv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ColorSubTable) { + void ** procp = (void **) &disp->ColorSubTable; snprintf(symboln, sizeof(symboln), "%sColorSubTable", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ColorSubTable; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ColorSubTable) { + void ** procp = (void **) &disp->ColorSubTable; snprintf(symboln, sizeof(symboln), "%sColorSubTableEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ColorSubTable; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CopyColorSubTable) { + void ** procp = (void **) &disp->CopyColorSubTable; snprintf(symboln, sizeof(symboln), "%sCopyColorSubTable", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CopyColorSubTable; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CopyColorSubTable) { + void ** procp = (void **) &disp->CopyColorSubTable; snprintf(symboln, sizeof(symboln), "%sCopyColorSubTableEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CopyColorSubTable; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ConvolutionFilter1D) { + void ** procp = (void **) &disp->ConvolutionFilter1D; snprintf(symboln, sizeof(symboln), "%sConvolutionFilter1D", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ConvolutionFilter1D; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ConvolutionFilter1D) { + void ** procp = (void **) &disp->ConvolutionFilter1D; snprintf(symboln, sizeof(symboln), "%sConvolutionFilter1DEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ConvolutionFilter1D; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ConvolutionFilter2D) { + void ** procp = (void **) &disp->ConvolutionFilter2D; snprintf(symboln, sizeof(symboln), "%sConvolutionFilter2D", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ConvolutionFilter2D; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ConvolutionFilter2D) { + void ** procp = (void **) &disp->ConvolutionFilter2D; snprintf(symboln, sizeof(symboln), "%sConvolutionFilter2DEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ConvolutionFilter2D; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ConvolutionParameterf) { + void ** procp = (void **) &disp->ConvolutionParameterf; snprintf(symboln, sizeof(symboln), "%sConvolutionParameterf", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ConvolutionParameterf; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ConvolutionParameterf) { + void ** procp = (void **) &disp->ConvolutionParameterf; snprintf(symboln, sizeof(symboln), "%sConvolutionParameterfEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ConvolutionParameterf; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ConvolutionParameterfv) { + void ** procp = (void **) &disp->ConvolutionParameterfv; snprintf(symboln, sizeof(symboln), "%sConvolutionParameterfv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ConvolutionParameterfv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ConvolutionParameterfv) { + void ** procp = (void **) &disp->ConvolutionParameterfv; snprintf(symboln, sizeof(symboln), "%sConvolutionParameterfvEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ConvolutionParameterfv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ConvolutionParameteri) { + void ** procp = (void **) &disp->ConvolutionParameteri; snprintf(symboln, sizeof(symboln), "%sConvolutionParameteri", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ConvolutionParameteri; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ConvolutionParameteri) { + void ** procp = (void **) &disp->ConvolutionParameteri; snprintf(symboln, sizeof(symboln), "%sConvolutionParameteriEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ConvolutionParameteri; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ConvolutionParameteriv) { + void ** procp = (void **) &disp->ConvolutionParameteriv; snprintf(symboln, sizeof(symboln), "%sConvolutionParameteriv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ConvolutionParameteriv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ConvolutionParameteriv) { + void ** procp = (void **) &disp->ConvolutionParameteriv; snprintf(symboln, sizeof(symboln), "%sConvolutionParameterivEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ConvolutionParameteriv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CopyConvolutionFilter1D) { + void ** procp = (void **) &disp->CopyConvolutionFilter1D; snprintf(symboln, sizeof(symboln), "%sCopyConvolutionFilter1D", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CopyConvolutionFilter1D; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CopyConvolutionFilter1D) { + void ** procp = (void **) &disp->CopyConvolutionFilter1D; snprintf(symboln, sizeof(symboln), "%sCopyConvolutionFilter1DEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CopyConvolutionFilter1D; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CopyConvolutionFilter2D) { + void ** procp = (void **) &disp->CopyConvolutionFilter2D; snprintf(symboln, sizeof(symboln), "%sCopyConvolutionFilter2D", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CopyConvolutionFilter2D; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CopyConvolutionFilter2D) { + void ** procp = (void **) &disp->CopyConvolutionFilter2D; snprintf(symboln, sizeof(symboln), "%sCopyConvolutionFilter2DEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CopyConvolutionFilter2D; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetConvolutionFilter) { + void ** procp = (void **) &disp->GetConvolutionFilter; snprintf(symboln, sizeof(symboln), "%sGetConvolutionFilter", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetConvolutionFilter; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetConvolutionFilter) { + void ** procp = (void **) &disp->GetConvolutionFilter; snprintf(symboln, sizeof(symboln), "%sGetConvolutionFilterEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetConvolutionFilter; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetConvolutionParameterfv) { + void ** procp = (void **) &disp->GetConvolutionParameterfv; snprintf(symboln, sizeof(symboln), "%sGetConvolutionParameterfv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetConvolutionParameterfv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetConvolutionParameterfv) { + void ** procp = (void **) &disp->GetConvolutionParameterfv; snprintf(symboln, sizeof(symboln), "%sGetConvolutionParameterfvEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetConvolutionParameterfv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetConvolutionParameteriv) { + void ** procp = (void **) &disp->GetConvolutionParameteriv; snprintf(symboln, sizeof(symboln), "%sGetConvolutionParameteriv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetConvolutionParameteriv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetConvolutionParameteriv) { + void ** procp = (void **) &disp->GetConvolutionParameteriv; snprintf(symboln, sizeof(symboln), "%sGetConvolutionParameterivEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetConvolutionParameteriv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetSeparableFilter) { + void ** procp = (void **) &disp->GetSeparableFilter; snprintf(symboln, sizeof(symboln), "%sGetSeparableFilter", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetSeparableFilter; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetSeparableFilter) { + void ** procp = (void **) &disp->GetSeparableFilter; snprintf(symboln, sizeof(symboln), "%sGetSeparableFilterEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetSeparableFilter; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SeparableFilter2D) { + void ** procp = (void **) &disp->SeparableFilter2D; snprintf(symboln, sizeof(symboln), "%sSeparableFilter2D", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SeparableFilter2D; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SeparableFilter2D) { + void ** procp = (void **) &disp->SeparableFilter2D; snprintf(symboln, sizeof(symboln), "%sSeparableFilter2DEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SeparableFilter2D; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetHistogram) { + void ** procp = (void **) &disp->GetHistogram; snprintf(symboln, sizeof(symboln), "%sGetHistogram", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetHistogram; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetHistogram) { + void ** procp = (void **) &disp->GetHistogram; snprintf(symboln, sizeof(symboln), "%sGetHistogramEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetHistogram; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetHistogramParameterfv) { + void ** procp = (void **) &disp->GetHistogramParameterfv; snprintf(symboln, sizeof(symboln), "%sGetHistogramParameterfv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetHistogramParameterfv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetHistogramParameterfv) { + void ** procp = (void **) &disp->GetHistogramParameterfv; snprintf(symboln, sizeof(symboln), "%sGetHistogramParameterfvEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetHistogramParameterfv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetHistogramParameteriv) { + void ** procp = (void **) &disp->GetHistogramParameteriv; snprintf(symboln, sizeof(symboln), "%sGetHistogramParameteriv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetHistogramParameteriv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetHistogramParameteriv) { + void ** procp = (void **) &disp->GetHistogramParameteriv; snprintf(symboln, sizeof(symboln), "%sGetHistogramParameterivEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetHistogramParameteriv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetMinmax) { + void ** procp = (void **) &disp->GetMinmax; snprintf(symboln, sizeof(symboln), "%sGetMinmax", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetMinmax; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetMinmax) { + void ** procp = (void **) &disp->GetMinmax; snprintf(symboln, sizeof(symboln), "%sGetMinmaxEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetMinmax; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetMinmaxParameterfv) { + void ** procp = (void **) &disp->GetMinmaxParameterfv; snprintf(symboln, sizeof(symboln), "%sGetMinmaxParameterfv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetMinmaxParameterfv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetMinmaxParameterfv) { + void ** procp = (void **) &disp->GetMinmaxParameterfv; snprintf(symboln, sizeof(symboln), "%sGetMinmaxParameterfvEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetMinmaxParameterfv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetMinmaxParameteriv) { + void ** procp = (void **) &disp->GetMinmaxParameteriv; snprintf(symboln, sizeof(symboln), "%sGetMinmaxParameteriv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetMinmaxParameteriv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetMinmaxParameteriv) { + void ** procp = (void **) &disp->GetMinmaxParameteriv; snprintf(symboln, sizeof(symboln), "%sGetMinmaxParameterivEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetMinmaxParameteriv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Histogram) { + void ** procp = (void **) &disp->Histogram; snprintf(symboln, sizeof(symboln), "%sHistogram", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Histogram; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Histogram) { + void ** procp = (void **) &disp->Histogram; snprintf(symboln, sizeof(symboln), "%sHistogramEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Histogram; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Minmax) { + void ** procp = (void **) &disp->Minmax; snprintf(symboln, sizeof(symboln), "%sMinmax", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Minmax; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Minmax) { + void ** procp = (void **) &disp->Minmax; snprintf(symboln, sizeof(symboln), "%sMinmaxEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Minmax; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ResetHistogram) { + void ** procp = (void **) &disp->ResetHistogram; snprintf(symboln, sizeof(symboln), "%sResetHistogram", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ResetHistogram; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ResetHistogram) { + void ** procp = (void **) &disp->ResetHistogram; snprintf(symboln, sizeof(symboln), "%sResetHistogramEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ResetHistogram; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ResetMinmax) { + void ** procp = (void **) &disp->ResetMinmax; snprintf(symboln, sizeof(symboln), "%sResetMinmax", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ResetMinmax; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ResetMinmax) { + void ** procp = (void **) &disp->ResetMinmax; snprintf(symboln, sizeof(symboln), "%sResetMinmaxEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ResetMinmax; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexImage3D) { + void ** procp = (void **) &disp->TexImage3D; snprintf(symboln, sizeof(symboln), "%sTexImage3D", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexImage3D; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexImage3D) { + void ** procp = (void **) &disp->TexImage3D; snprintf(symboln, sizeof(symboln), "%sTexImage3DEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexImage3D; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexSubImage3D) { + void ** procp = (void **) &disp->TexSubImage3D; snprintf(symboln, sizeof(symboln), "%sTexSubImage3D", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexSubImage3D; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexSubImage3D) { + void ** procp = (void **) &disp->TexSubImage3D; snprintf(symboln, sizeof(symboln), "%sTexSubImage3DEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexSubImage3D; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CopyTexSubImage3D) { + void ** procp = (void **) &disp->CopyTexSubImage3D; snprintf(symboln, sizeof(symboln), "%sCopyTexSubImage3D", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CopyTexSubImage3D; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CopyTexSubImage3D) { + void ** procp = (void **) &disp->CopyTexSubImage3D; snprintf(symboln, sizeof(symboln), "%sCopyTexSubImage3DEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CopyTexSubImage3D; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ActiveTextureARB) { + void ** procp = (void **) &disp->ActiveTextureARB; snprintf(symboln, sizeof(symboln), "%sActiveTexture", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ActiveTextureARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ActiveTextureARB) { + void ** procp = (void **) &disp->ActiveTextureARB; snprintf(symboln, sizeof(symboln), "%sActiveTextureARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ActiveTextureARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ClientActiveTextureARB) { + void ** procp = (void **) &disp->ClientActiveTextureARB; snprintf(symboln, sizeof(symboln), "%sClientActiveTexture", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ClientActiveTextureARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ClientActiveTextureARB) { + void ** procp = (void **) &disp->ClientActiveTextureARB; snprintf(symboln, sizeof(symboln), "%sClientActiveTextureARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ClientActiveTextureARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord1dARB) { + void ** procp = (void **) &disp->MultiTexCoord1dARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1d", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord1dARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord1dARB) { + void ** procp = (void **) &disp->MultiTexCoord1dARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1dARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord1dARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord1dvARB) { + void ** procp = (void **) &disp->MultiTexCoord1dvARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1dv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord1dvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord1dvARB) { + void ** procp = (void **) &disp->MultiTexCoord1dvARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1dvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord1dvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord1fARB) { + void ** procp = (void **) &disp->MultiTexCoord1fARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1f", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord1fARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord1fARB) { + void ** procp = (void **) &disp->MultiTexCoord1fARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1fARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord1fARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord1fvARB) { + void ** procp = (void **) &disp->MultiTexCoord1fvARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1fv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord1fvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord1fvARB) { + void ** procp = (void **) &disp->MultiTexCoord1fvARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1fvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord1fvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord1iARB) { + void ** procp = (void **) &disp->MultiTexCoord1iARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1i", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord1iARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord1iARB) { + void ** procp = (void **) &disp->MultiTexCoord1iARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1iARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord1iARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord1ivARB) { + void ** procp = (void **) &disp->MultiTexCoord1ivARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1iv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord1ivARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord1ivARB) { + void ** procp = (void **) &disp->MultiTexCoord1ivARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1ivARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord1ivARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord1sARB) { + void ** procp = (void **) &disp->MultiTexCoord1sARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1s", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord1sARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord1sARB) { + void ** procp = (void **) &disp->MultiTexCoord1sARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1sARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord1sARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord1svARB) { + void ** procp = (void **) &disp->MultiTexCoord1svARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1sv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord1svARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord1svARB) { + void ** procp = (void **) &disp->MultiTexCoord1svARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord1svARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord1svARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord2dARB) { + void ** procp = (void **) &disp->MultiTexCoord2dARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2d", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord2dARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord2dARB) { + void ** procp = (void **) &disp->MultiTexCoord2dARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2dARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord2dARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord2dvARB) { + void ** procp = (void **) &disp->MultiTexCoord2dvARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2dv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord2dvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord2dvARB) { + void ** procp = (void **) &disp->MultiTexCoord2dvARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2dvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord2dvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord2fARB) { + void ** procp = (void **) &disp->MultiTexCoord2fARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2f", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord2fARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord2fARB) { + void ** procp = (void **) &disp->MultiTexCoord2fARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2fARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord2fARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord2fvARB) { + void ** procp = (void **) &disp->MultiTexCoord2fvARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2fv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord2fvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord2fvARB) { + void ** procp = (void **) &disp->MultiTexCoord2fvARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2fvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord2fvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord2iARB) { + void ** procp = (void **) &disp->MultiTexCoord2iARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2i", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord2iARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord2iARB) { + void ** procp = (void **) &disp->MultiTexCoord2iARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2iARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord2iARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord2ivARB) { + void ** procp = (void **) &disp->MultiTexCoord2ivARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2iv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord2ivARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord2ivARB) { + void ** procp = (void **) &disp->MultiTexCoord2ivARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2ivARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord2ivARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord2sARB) { + void ** procp = (void **) &disp->MultiTexCoord2sARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2s", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord2sARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord2sARB) { + void ** procp = (void **) &disp->MultiTexCoord2sARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2sARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord2sARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord2svARB) { + void ** procp = (void **) &disp->MultiTexCoord2svARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2sv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord2svARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord2svARB) { + void ** procp = (void **) &disp->MultiTexCoord2svARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord2svARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord2svARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord3dARB) { + void ** procp = (void **) &disp->MultiTexCoord3dARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3d", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord3dARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord3dARB) { + void ** procp = (void **) &disp->MultiTexCoord3dARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3dARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord3dARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord3dvARB) { + void ** procp = (void **) &disp->MultiTexCoord3dvARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3dv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord3dvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord3dvARB) { + void ** procp = (void **) &disp->MultiTexCoord3dvARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3dvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord3dvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord3fARB) { + void ** procp = (void **) &disp->MultiTexCoord3fARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3f", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord3fARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord3fARB) { + void ** procp = (void **) &disp->MultiTexCoord3fARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3fARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord3fARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord3fvARB) { + void ** procp = (void **) &disp->MultiTexCoord3fvARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3fv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord3fvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord3fvARB) { + void ** procp = (void **) &disp->MultiTexCoord3fvARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3fvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord3fvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord3iARB) { + void ** procp = (void **) &disp->MultiTexCoord3iARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3i", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord3iARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord3iARB) { + void ** procp = (void **) &disp->MultiTexCoord3iARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3iARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord3iARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord3ivARB) { + void ** procp = (void **) &disp->MultiTexCoord3ivARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3iv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord3ivARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord3ivARB) { + void ** procp = (void **) &disp->MultiTexCoord3ivARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3ivARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord3ivARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord3sARB) { + void ** procp = (void **) &disp->MultiTexCoord3sARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3s", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord3sARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord3sARB) { + void ** procp = (void **) &disp->MultiTexCoord3sARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3sARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord3sARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord3svARB) { + void ** procp = (void **) &disp->MultiTexCoord3svARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3sv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord3svARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord3svARB) { + void ** procp = (void **) &disp->MultiTexCoord3svARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord3svARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord3svARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord4dARB) { + void ** procp = (void **) &disp->MultiTexCoord4dARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4d", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord4dARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord4dARB) { + void ** procp = (void **) &disp->MultiTexCoord4dARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4dARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord4dARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord4dvARB) { + void ** procp = (void **) &disp->MultiTexCoord4dvARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4dv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord4dvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord4dvARB) { + void ** procp = (void **) &disp->MultiTexCoord4dvARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4dvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord4dvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord4fARB) { + void ** procp = (void **) &disp->MultiTexCoord4fARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4f", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord4fARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord4fARB) { + void ** procp = (void **) &disp->MultiTexCoord4fARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4fARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord4fARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord4fvARB) { + void ** procp = (void **) &disp->MultiTexCoord4fvARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4fv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord4fvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord4fvARB) { + void ** procp = (void **) &disp->MultiTexCoord4fvARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4fvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord4fvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord4iARB) { + void ** procp = (void **) &disp->MultiTexCoord4iARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4i", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord4iARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord4iARB) { + void ** procp = (void **) &disp->MultiTexCoord4iARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4iARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord4iARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord4ivARB) { + void ** procp = (void **) &disp->MultiTexCoord4ivARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4iv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord4ivARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord4ivARB) { + void ** procp = (void **) &disp->MultiTexCoord4ivARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4ivARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord4ivARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord4sARB) { + void ** procp = (void **) &disp->MultiTexCoord4sARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4s", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord4sARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord4sARB) { + void ** procp = (void **) &disp->MultiTexCoord4sARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4sARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord4sARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord4svARB) { + void ** procp = (void **) &disp->MultiTexCoord4svARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4sv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord4svARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiTexCoord4svARB) { + void ** procp = (void **) &disp->MultiTexCoord4svARB; snprintf(symboln, sizeof(symboln), "%sMultiTexCoord4svARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiTexCoord4svARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->AttachShader) { + void ** procp = (void **) &disp->AttachShader; snprintf(symboln, sizeof(symboln), "%sAttachShader", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->AttachShader; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CreateProgram) { + void ** procp = (void **) &disp->CreateProgram; snprintf(symboln, sizeof(symboln), "%sCreateProgram", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CreateProgram; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CreateShader) { + void ** procp = (void **) &disp->CreateShader; snprintf(symboln, sizeof(symboln), "%sCreateShader", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CreateShader; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DeleteProgram) { + void ** procp = (void **) &disp->DeleteProgram; snprintf(symboln, sizeof(symboln), "%sDeleteProgram", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DeleteProgram; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DeleteShader) { + void ** procp = (void **) &disp->DeleteShader; snprintf(symboln, sizeof(symboln), "%sDeleteShader", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DeleteShader; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DetachShader) { + void ** procp = (void **) &disp->DetachShader; snprintf(symboln, sizeof(symboln), "%sDetachShader", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DetachShader; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetAttachedShaders) { + void ** procp = (void **) &disp->GetAttachedShaders; snprintf(symboln, sizeof(symboln), "%sGetAttachedShaders", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetAttachedShaders; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetProgramInfoLog) { + void ** procp = (void **) &disp->GetProgramInfoLog; snprintf(symboln, sizeof(symboln), "%sGetProgramInfoLog", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetProgramInfoLog; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetProgramiv) { + void ** procp = (void **) &disp->GetProgramiv; snprintf(symboln, sizeof(symboln), "%sGetProgramiv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetProgramiv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetShaderInfoLog) { + void ** procp = (void **) &disp->GetShaderInfoLog; snprintf(symboln, sizeof(symboln), "%sGetShaderInfoLog", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetShaderInfoLog; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetShaderiv) { + void ** procp = (void **) &disp->GetShaderiv; snprintf(symboln, sizeof(symboln), "%sGetShaderiv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetShaderiv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->IsProgram) { + void ** procp = (void **) &disp->IsProgram; snprintf(symboln, sizeof(symboln), "%sIsProgram", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->IsProgram; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->IsShader) { + void ** procp = (void **) &disp->IsShader; snprintf(symboln, sizeof(symboln), "%sIsShader", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->IsShader; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->StencilFuncSeparate) { + void ** procp = (void **) &disp->StencilFuncSeparate; snprintf(symboln, sizeof(symboln), "%sStencilFuncSeparate", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->StencilFuncSeparate; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->StencilMaskSeparate) { + void ** procp = (void **) &disp->StencilMaskSeparate; snprintf(symboln, sizeof(symboln), "%sStencilMaskSeparate", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->StencilMaskSeparate; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->StencilOpSeparate) { + void ** procp = (void **) &disp->StencilOpSeparate; snprintf(symboln, sizeof(symboln), "%sStencilOpSeparate", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->StencilOpSeparate; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->StencilOpSeparate) { + void ** procp = (void **) &disp->StencilOpSeparate; snprintf(symboln, sizeof(symboln), "%sStencilOpSeparateATI", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->StencilOpSeparate; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->UniformMatrix2x3fv) { + void ** procp = (void **) &disp->UniformMatrix2x3fv; snprintf(symboln, sizeof(symboln), "%sUniformMatrix2x3fv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->UniformMatrix2x3fv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->UniformMatrix2x4fv) { + void ** procp = (void **) &disp->UniformMatrix2x4fv; snprintf(symboln, sizeof(symboln), "%sUniformMatrix2x4fv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->UniformMatrix2x4fv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->UniformMatrix3x2fv) { + void ** procp = (void **) &disp->UniformMatrix3x2fv; snprintf(symboln, sizeof(symboln), "%sUniformMatrix3x2fv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->UniformMatrix3x2fv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->UniformMatrix3x4fv) { + void ** procp = (void **) &disp->UniformMatrix3x4fv; snprintf(symboln, sizeof(symboln), "%sUniformMatrix3x4fv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->UniformMatrix3x4fv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->UniformMatrix4x2fv) { + void ** procp = (void **) &disp->UniformMatrix4x2fv; snprintf(symboln, sizeof(symboln), "%sUniformMatrix4x2fv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->UniformMatrix4x2fv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->UniformMatrix4x3fv) { + void ** procp = (void **) &disp->UniformMatrix4x3fv; snprintf(symboln, sizeof(symboln), "%sUniformMatrix4x3fv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->UniformMatrix4x3fv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ClampColor) { + void ** procp = (void **) &disp->ClampColor; snprintf(symboln, sizeof(symboln), "%sClampColor", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ClampColor; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ClearBufferfi) { + void ** procp = (void **) &disp->ClearBufferfi; snprintf(symboln, sizeof(symboln), "%sClearBufferfi", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ClearBufferfi; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ClearBufferfv) { + void ** procp = (void **) &disp->ClearBufferfv; snprintf(symboln, sizeof(symboln), "%sClearBufferfv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ClearBufferfv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ClearBufferiv) { + void ** procp = (void **) &disp->ClearBufferiv; snprintf(symboln, sizeof(symboln), "%sClearBufferiv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ClearBufferiv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ClearBufferuiv) { + void ** procp = (void **) &disp->ClearBufferuiv; snprintf(symboln, sizeof(symboln), "%sClearBufferuiv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ClearBufferuiv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetStringi) { + void ** procp = (void **) &disp->GetStringi; snprintf(symboln, sizeof(symboln), "%sGetStringi", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetStringi; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexBuffer) { + void ** procp = (void **) &disp->TexBuffer; snprintf(symboln, sizeof(symboln), "%sTexBuffer", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexBuffer; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->FramebufferTexture) { + void ** procp = (void **) &disp->FramebufferTexture; snprintf(symboln, sizeof(symboln), "%sFramebufferTexture", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->FramebufferTexture; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetBufferParameteri64v) { + void ** procp = (void **) &disp->GetBufferParameteri64v; snprintf(symboln, sizeof(symboln), "%sGetBufferParameteri64v", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetBufferParameteri64v; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetInteger64i_v) { + void ** procp = (void **) &disp->GetInteger64i_v; snprintf(symboln, sizeof(symboln), "%sGetInteger64i_v", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetInteger64i_v; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribDivisor) { + void ** procp = (void **) &disp->VertexAttribDivisor; snprintf(symboln, sizeof(symboln), "%sVertexAttribDivisor", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribDivisor; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->LoadTransposeMatrixdARB) { + void ** procp = (void **) &disp->LoadTransposeMatrixdARB; snprintf(symboln, sizeof(symboln), "%sLoadTransposeMatrixd", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->LoadTransposeMatrixdARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->LoadTransposeMatrixdARB) { + void ** procp = (void **) &disp->LoadTransposeMatrixdARB; snprintf(symboln, sizeof(symboln), "%sLoadTransposeMatrixdARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->LoadTransposeMatrixdARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->LoadTransposeMatrixfARB) { + void ** procp = (void **) &disp->LoadTransposeMatrixfARB; snprintf(symboln, sizeof(symboln), "%sLoadTransposeMatrixf", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->LoadTransposeMatrixfARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->LoadTransposeMatrixfARB) { + void ** procp = (void **) &disp->LoadTransposeMatrixfARB; snprintf(symboln, sizeof(symboln), "%sLoadTransposeMatrixfARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->LoadTransposeMatrixfARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultTransposeMatrixdARB) { + void ** procp = (void **) &disp->MultTransposeMatrixdARB; snprintf(symboln, sizeof(symboln), "%sMultTransposeMatrixd", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultTransposeMatrixdARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultTransposeMatrixdARB) { + void ** procp = (void **) &disp->MultTransposeMatrixdARB; snprintf(symboln, sizeof(symboln), "%sMultTransposeMatrixdARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultTransposeMatrixdARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultTransposeMatrixfARB) { + void ** procp = (void **) &disp->MultTransposeMatrixfARB; snprintf(symboln, sizeof(symboln), "%sMultTransposeMatrixf", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultTransposeMatrixfARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultTransposeMatrixfARB) { + void ** procp = (void **) &disp->MultTransposeMatrixfARB; snprintf(symboln, sizeof(symboln), "%sMultTransposeMatrixfARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultTransposeMatrixfARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SampleCoverageARB) { + void ** procp = (void **) &disp->SampleCoverageARB; snprintf(symboln, sizeof(symboln), "%sSampleCoverage", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SampleCoverageARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SampleCoverageARB) { + void ** procp = (void **) &disp->SampleCoverageARB; snprintf(symboln, sizeof(symboln), "%sSampleCoverageARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SampleCoverageARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CompressedTexImage1DARB) { + void ** procp = (void **) &disp->CompressedTexImage1DARB; snprintf(symboln, sizeof(symboln), "%sCompressedTexImage1D", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CompressedTexImage1DARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CompressedTexImage1DARB) { + void ** procp = (void **) &disp->CompressedTexImage1DARB; snprintf(symboln, sizeof(symboln), "%sCompressedTexImage1DARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CompressedTexImage1DARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CompressedTexImage2DARB) { + void ** procp = (void **) &disp->CompressedTexImage2DARB; snprintf(symboln, sizeof(symboln), "%sCompressedTexImage2D", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CompressedTexImage2DARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CompressedTexImage2DARB) { + void ** procp = (void **) &disp->CompressedTexImage2DARB; snprintf(symboln, sizeof(symboln), "%sCompressedTexImage2DARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CompressedTexImage2DARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CompressedTexImage3DARB) { + void ** procp = (void **) &disp->CompressedTexImage3DARB; snprintf(symboln, sizeof(symboln), "%sCompressedTexImage3D", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CompressedTexImage3DARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CompressedTexImage3DARB) { + void ** procp = (void **) &disp->CompressedTexImage3DARB; snprintf(symboln, sizeof(symboln), "%sCompressedTexImage3DARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CompressedTexImage3DARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CompressedTexSubImage1DARB) { + void ** procp = (void **) &disp->CompressedTexSubImage1DARB; snprintf(symboln, sizeof(symboln), "%sCompressedTexSubImage1D", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CompressedTexSubImage1DARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CompressedTexSubImage1DARB) { + void ** procp = (void **) &disp->CompressedTexSubImage1DARB; snprintf(symboln, sizeof(symboln), "%sCompressedTexSubImage1DARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CompressedTexSubImage1DARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CompressedTexSubImage2DARB) { + void ** procp = (void **) &disp->CompressedTexSubImage2DARB; snprintf(symboln, sizeof(symboln), "%sCompressedTexSubImage2D", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CompressedTexSubImage2DARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CompressedTexSubImage2DARB) { + void ** procp = (void **) &disp->CompressedTexSubImage2DARB; snprintf(symboln, sizeof(symboln), "%sCompressedTexSubImage2DARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CompressedTexSubImage2DARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CompressedTexSubImage3DARB) { + void ** procp = (void **) &disp->CompressedTexSubImage3DARB; snprintf(symboln, sizeof(symboln), "%sCompressedTexSubImage3D", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CompressedTexSubImage3DARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CompressedTexSubImage3DARB) { + void ** procp = (void **) &disp->CompressedTexSubImage3DARB; snprintf(symboln, sizeof(symboln), "%sCompressedTexSubImage3DARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CompressedTexSubImage3DARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetCompressedTexImageARB) { + void ** procp = (void **) &disp->GetCompressedTexImageARB; snprintf(symboln, sizeof(symboln), "%sGetCompressedTexImage", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetCompressedTexImageARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetCompressedTexImageARB) { + void ** procp = (void **) &disp->GetCompressedTexImageARB; snprintf(symboln, sizeof(symboln), "%sGetCompressedTexImageARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetCompressedTexImageARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DisableVertexAttribArrayARB) { + void ** procp = (void **) &disp->DisableVertexAttribArrayARB; snprintf(symboln, sizeof(symboln), "%sDisableVertexAttribArray", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DisableVertexAttribArrayARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DisableVertexAttribArrayARB) { + void ** procp = (void **) &disp->DisableVertexAttribArrayARB; snprintf(symboln, sizeof(symboln), "%sDisableVertexAttribArrayARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DisableVertexAttribArrayARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->EnableVertexAttribArrayARB) { + void ** procp = (void **) &disp->EnableVertexAttribArrayARB; snprintf(symboln, sizeof(symboln), "%sEnableVertexAttribArray", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->EnableVertexAttribArrayARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->EnableVertexAttribArrayARB) { + void ** procp = (void **) &disp->EnableVertexAttribArrayARB; snprintf(symboln, sizeof(symboln), "%sEnableVertexAttribArrayARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->EnableVertexAttribArrayARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetProgramEnvParameterdvARB) { + void ** procp = (void **) &disp->GetProgramEnvParameterdvARB; snprintf(symboln, sizeof(symboln), "%sGetProgramEnvParameterdvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetProgramEnvParameterdvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetProgramEnvParameterfvARB) { + void ** procp = (void **) &disp->GetProgramEnvParameterfvARB; snprintf(symboln, sizeof(symboln), "%sGetProgramEnvParameterfvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetProgramEnvParameterfvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetProgramLocalParameterdvARB) { + void ** procp = (void **) &disp->GetProgramLocalParameterdvARB; snprintf(symboln, sizeof(symboln), "%sGetProgramLocalParameterdvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetProgramLocalParameterdvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetProgramLocalParameterfvARB) { + void ** procp = (void **) &disp->GetProgramLocalParameterfvARB; snprintf(symboln, sizeof(symboln), "%sGetProgramLocalParameterfvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetProgramLocalParameterfvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetProgramStringARB) { + void ** procp = (void **) &disp->GetProgramStringARB; snprintf(symboln, sizeof(symboln), "%sGetProgramStringARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetProgramStringARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetProgramivARB) { + void ** procp = (void **) &disp->GetProgramivARB; snprintf(symboln, sizeof(symboln), "%sGetProgramivARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetProgramivARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetVertexAttribdvARB) { + void ** procp = (void **) &disp->GetVertexAttribdvARB; snprintf(symboln, sizeof(symboln), "%sGetVertexAttribdv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetVertexAttribdvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetVertexAttribdvARB) { + void ** procp = (void **) &disp->GetVertexAttribdvARB; snprintf(symboln, sizeof(symboln), "%sGetVertexAttribdvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetVertexAttribdvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetVertexAttribfvARB) { + void ** procp = (void **) &disp->GetVertexAttribfvARB; snprintf(symboln, sizeof(symboln), "%sGetVertexAttribfv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetVertexAttribfvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetVertexAttribfvARB) { + void ** procp = (void **) &disp->GetVertexAttribfvARB; snprintf(symboln, sizeof(symboln), "%sGetVertexAttribfvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetVertexAttribfvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetVertexAttribivARB) { + void ** procp = (void **) &disp->GetVertexAttribivARB; snprintf(symboln, sizeof(symboln), "%sGetVertexAttribiv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetVertexAttribivARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetVertexAttribivARB) { + void ** procp = (void **) &disp->GetVertexAttribivARB; snprintf(symboln, sizeof(symboln), "%sGetVertexAttribivARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetVertexAttribivARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ProgramEnvParameter4dARB) { + void ** procp = (void **) &disp->ProgramEnvParameter4dARB; snprintf(symboln, sizeof(symboln), "%sProgramEnvParameter4dARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ProgramEnvParameter4dARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ProgramEnvParameter4dARB) { + void ** procp = (void **) &disp->ProgramEnvParameter4dARB; snprintf(symboln, sizeof(symboln), "%sProgramParameter4dNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ProgramEnvParameter4dARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ProgramEnvParameter4dvARB) { + void ** procp = (void **) &disp->ProgramEnvParameter4dvARB; snprintf(symboln, sizeof(symboln), "%sProgramEnvParameter4dvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ProgramEnvParameter4dvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ProgramEnvParameter4dvARB) { + void ** procp = (void **) &disp->ProgramEnvParameter4dvARB; snprintf(symboln, sizeof(symboln), "%sProgramParameter4dvNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ProgramEnvParameter4dvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ProgramEnvParameter4fARB) { + void ** procp = (void **) &disp->ProgramEnvParameter4fARB; snprintf(symboln, sizeof(symboln), "%sProgramEnvParameter4fARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ProgramEnvParameter4fARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ProgramEnvParameter4fARB) { + void ** procp = (void **) &disp->ProgramEnvParameter4fARB; snprintf(symboln, sizeof(symboln), "%sProgramParameter4fNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ProgramEnvParameter4fARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ProgramEnvParameter4fvARB) { + void ** procp = (void **) &disp->ProgramEnvParameter4fvARB; snprintf(symboln, sizeof(symboln), "%sProgramEnvParameter4fvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ProgramEnvParameter4fvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ProgramEnvParameter4fvARB) { + void ** procp = (void **) &disp->ProgramEnvParameter4fvARB; snprintf(symboln, sizeof(symboln), "%sProgramParameter4fvNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ProgramEnvParameter4fvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ProgramLocalParameter4dARB) { + void ** procp = (void **) &disp->ProgramLocalParameter4dARB; snprintf(symboln, sizeof(symboln), "%sProgramLocalParameter4dARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ProgramLocalParameter4dARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ProgramLocalParameter4dvARB) { + void ** procp = (void **) &disp->ProgramLocalParameter4dvARB; snprintf(symboln, sizeof(symboln), "%sProgramLocalParameter4dvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ProgramLocalParameter4dvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ProgramLocalParameter4fARB) { + void ** procp = (void **) &disp->ProgramLocalParameter4fARB; snprintf(symboln, sizeof(symboln), "%sProgramLocalParameter4fARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ProgramLocalParameter4fARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ProgramLocalParameter4fvARB) { + void ** procp = (void **) &disp->ProgramLocalParameter4fvARB; snprintf(symboln, sizeof(symboln), "%sProgramLocalParameter4fvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ProgramLocalParameter4fvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ProgramStringARB) { + void ** procp = (void **) &disp->ProgramStringARB; snprintf(symboln, sizeof(symboln), "%sProgramStringARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ProgramStringARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib1dARB) { + void ** procp = (void **) &disp->VertexAttrib1dARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib1d", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib1dARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib1dARB) { + void ** procp = (void **) &disp->VertexAttrib1dARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib1dARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib1dARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib1dvARB) { + void ** procp = (void **) &disp->VertexAttrib1dvARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib1dv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib1dvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib1dvARB) { + void ** procp = (void **) &disp->VertexAttrib1dvARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib1dvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib1dvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib1fARB) { + void ** procp = (void **) &disp->VertexAttrib1fARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib1f", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib1fARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib1fARB) { + void ** procp = (void **) &disp->VertexAttrib1fARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib1fARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib1fARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib1fvARB) { + void ** procp = (void **) &disp->VertexAttrib1fvARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib1fv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib1fvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib1fvARB) { + void ** procp = (void **) &disp->VertexAttrib1fvARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib1fvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib1fvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib1sARB) { + void ** procp = (void **) &disp->VertexAttrib1sARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib1s", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib1sARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib1sARB) { + void ** procp = (void **) &disp->VertexAttrib1sARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib1sARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib1sARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib1svARB) { + void ** procp = (void **) &disp->VertexAttrib1svARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib1sv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib1svARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib1svARB) { + void ** procp = (void **) &disp->VertexAttrib1svARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib1svARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib1svARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib2dARB) { + void ** procp = (void **) &disp->VertexAttrib2dARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib2d", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib2dARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib2dARB) { + void ** procp = (void **) &disp->VertexAttrib2dARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib2dARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib2dARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib2dvARB) { + void ** procp = (void **) &disp->VertexAttrib2dvARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib2dv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib2dvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib2dvARB) { + void ** procp = (void **) &disp->VertexAttrib2dvARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib2dvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib2dvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib2fARB) { + void ** procp = (void **) &disp->VertexAttrib2fARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib2f", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib2fARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib2fARB) { + void ** procp = (void **) &disp->VertexAttrib2fARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib2fARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib2fARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib2fvARB) { + void ** procp = (void **) &disp->VertexAttrib2fvARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib2fv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib2fvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib2fvARB) { + void ** procp = (void **) &disp->VertexAttrib2fvARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib2fvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib2fvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib2sARB) { + void ** procp = (void **) &disp->VertexAttrib2sARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib2s", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib2sARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib2sARB) { + void ** procp = (void **) &disp->VertexAttrib2sARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib2sARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib2sARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib2svARB) { + void ** procp = (void **) &disp->VertexAttrib2svARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib2sv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib2svARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib2svARB) { + void ** procp = (void **) &disp->VertexAttrib2svARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib2svARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib2svARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib3dARB) { + void ** procp = (void **) &disp->VertexAttrib3dARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib3d", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib3dARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib3dARB) { + void ** procp = (void **) &disp->VertexAttrib3dARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib3dARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib3dARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib3dvARB) { + void ** procp = (void **) &disp->VertexAttrib3dvARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib3dv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib3dvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib3dvARB) { + void ** procp = (void **) &disp->VertexAttrib3dvARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib3dvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib3dvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib3fARB) { + void ** procp = (void **) &disp->VertexAttrib3fARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib3f", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib3fARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib3fARB) { + void ** procp = (void **) &disp->VertexAttrib3fARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib3fARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib3fARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib3fvARB) { + void ** procp = (void **) &disp->VertexAttrib3fvARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib3fv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib3fvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib3fvARB) { + void ** procp = (void **) &disp->VertexAttrib3fvARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib3fvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib3fvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib3sARB) { + void ** procp = (void **) &disp->VertexAttrib3sARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib3s", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib3sARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib3sARB) { + void ** procp = (void **) &disp->VertexAttrib3sARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib3sARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib3sARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib3svARB) { + void ** procp = (void **) &disp->VertexAttrib3svARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib3sv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib3svARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib3svARB) { + void ** procp = (void **) &disp->VertexAttrib3svARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib3svARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib3svARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib4NbvARB) { + void ** procp = (void **) &disp->VertexAttrib4NbvARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib4Nbv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4NbvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib4NbvARB) { + void ** procp = (void **) &disp->VertexAttrib4NbvARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib4NbvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4NbvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib4NivARB) { + void ** procp = (void **) &disp->VertexAttrib4NivARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib4Niv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4NivARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib4NivARB) { + void ** procp = (void **) &disp->VertexAttrib4NivARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib4NivARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4NivARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib4NsvARB) { + void ** procp = (void **) &disp->VertexAttrib4NsvARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib4Nsv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4NsvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib4NsvARB) { + void ** procp = (void **) &disp->VertexAttrib4NsvARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib4NsvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4NsvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib4NubARB) { + void ** procp = (void **) &disp->VertexAttrib4NubARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib4Nub", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4NubARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib4NubARB) { + void ** procp = (void **) &disp->VertexAttrib4NubARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib4NubARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4NubARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib4NubvARB) { + void ** procp = (void **) &disp->VertexAttrib4NubvARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib4Nubv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4NubvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib4NubvARB) { + void ** procp = (void **) &disp->VertexAttrib4NubvARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib4NubvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4NubvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib4NuivARB) { + void ** procp = (void **) &disp->VertexAttrib4NuivARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib4Nuiv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4NuivARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib4NuivARB) { + void ** procp = (void **) &disp->VertexAttrib4NuivARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib4NuivARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4NuivARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib4NusvARB) { + void ** procp = (void **) &disp->VertexAttrib4NusvARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib4Nusv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4NusvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib4NusvARB) { + void ** procp = (void **) &disp->VertexAttrib4NusvARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib4NusvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4NusvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib4bvARB) { + void ** procp = (void **) &disp->VertexAttrib4bvARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib4bv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4bvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib4bvARB) { + void ** procp = (void **) &disp->VertexAttrib4bvARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib4bvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4bvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib4dARB) { + void ** procp = (void **) &disp->VertexAttrib4dARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib4d", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4dARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib4dARB) { + void ** procp = (void **) &disp->VertexAttrib4dARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib4dARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4dARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib4dvARB) { + void ** procp = (void **) &disp->VertexAttrib4dvARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib4dv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4dvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib4dvARB) { + void ** procp = (void **) &disp->VertexAttrib4dvARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib4dvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4dvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib4fARB) { + void ** procp = (void **) &disp->VertexAttrib4fARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib4f", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4fARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib4fARB) { + void ** procp = (void **) &disp->VertexAttrib4fARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib4fARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4fARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib4fvARB) { + void ** procp = (void **) &disp->VertexAttrib4fvARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib4fv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4fvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib4fvARB) { + void ** procp = (void **) &disp->VertexAttrib4fvARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib4fvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4fvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib4ivARB) { + void ** procp = (void **) &disp->VertexAttrib4ivARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib4iv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4ivARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib4ivARB) { + void ** procp = (void **) &disp->VertexAttrib4ivARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib4ivARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4ivARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib4sARB) { + void ** procp = (void **) &disp->VertexAttrib4sARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib4s", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4sARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib4sARB) { + void ** procp = (void **) &disp->VertexAttrib4sARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib4sARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4sARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib4svARB) { + void ** procp = (void **) &disp->VertexAttrib4svARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib4sv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4svARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib4svARB) { + void ** procp = (void **) &disp->VertexAttrib4svARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib4svARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4svARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib4ubvARB) { + void ** procp = (void **) &disp->VertexAttrib4ubvARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib4ubv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4ubvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib4ubvARB) { + void ** procp = (void **) &disp->VertexAttrib4ubvARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib4ubvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4ubvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib4uivARB) { + void ** procp = (void **) &disp->VertexAttrib4uivARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib4uiv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4uivARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib4uivARB) { + void ** procp = (void **) &disp->VertexAttrib4uivARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib4uivARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4uivARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib4usvARB) { + void ** procp = (void **) &disp->VertexAttrib4usvARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib4usv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4usvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib4usvARB) { + void ** procp = (void **) &disp->VertexAttrib4usvARB; snprintf(symboln, sizeof(symboln), "%sVertexAttrib4usvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4usvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribPointerARB) { + void ** procp = (void **) &disp->VertexAttribPointerARB; snprintf(symboln, sizeof(symboln), "%sVertexAttribPointer", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribPointerARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribPointerARB) { + void ** procp = (void **) &disp->VertexAttribPointerARB; snprintf(symboln, sizeof(symboln), "%sVertexAttribPointerARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribPointerARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BindBufferARB) { + void ** procp = (void **) &disp->BindBufferARB; snprintf(symboln, sizeof(symboln), "%sBindBuffer", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BindBufferARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BindBufferARB) { + void ** procp = (void **) &disp->BindBufferARB; snprintf(symboln, sizeof(symboln), "%sBindBufferARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BindBufferARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BufferDataARB) { + void ** procp = (void **) &disp->BufferDataARB; snprintf(symboln, sizeof(symboln), "%sBufferData", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BufferDataARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BufferDataARB) { + void ** procp = (void **) &disp->BufferDataARB; snprintf(symboln, sizeof(symboln), "%sBufferDataARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BufferDataARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BufferSubDataARB) { + void ** procp = (void **) &disp->BufferSubDataARB; snprintf(symboln, sizeof(symboln), "%sBufferSubData", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BufferSubDataARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BufferSubDataARB) { + void ** procp = (void **) &disp->BufferSubDataARB; snprintf(symboln, sizeof(symboln), "%sBufferSubDataARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BufferSubDataARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DeleteBuffersARB) { + void ** procp = (void **) &disp->DeleteBuffersARB; snprintf(symboln, sizeof(symboln), "%sDeleteBuffers", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DeleteBuffersARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DeleteBuffersARB) { + void ** procp = (void **) &disp->DeleteBuffersARB; snprintf(symboln, sizeof(symboln), "%sDeleteBuffersARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DeleteBuffersARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GenBuffersARB) { + void ** procp = (void **) &disp->GenBuffersARB; snprintf(symboln, sizeof(symboln), "%sGenBuffers", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GenBuffersARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GenBuffersARB) { + void ** procp = (void **) &disp->GenBuffersARB; snprintf(symboln, sizeof(symboln), "%sGenBuffersARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GenBuffersARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetBufferParameterivARB) { + void ** procp = (void **) &disp->GetBufferParameterivARB; snprintf(symboln, sizeof(symboln), "%sGetBufferParameteriv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetBufferParameterivARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetBufferParameterivARB) { + void ** procp = (void **) &disp->GetBufferParameterivARB; snprintf(symboln, sizeof(symboln), "%sGetBufferParameterivARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetBufferParameterivARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetBufferPointervARB) { + void ** procp = (void **) &disp->GetBufferPointervARB; snprintf(symboln, sizeof(symboln), "%sGetBufferPointerv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetBufferPointervARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetBufferPointervARB) { + void ** procp = (void **) &disp->GetBufferPointervARB; snprintf(symboln, sizeof(symboln), "%sGetBufferPointervARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetBufferPointervARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetBufferSubDataARB) { + void ** procp = (void **) &disp->GetBufferSubDataARB; snprintf(symboln, sizeof(symboln), "%sGetBufferSubData", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetBufferSubDataARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetBufferSubDataARB) { + void ** procp = (void **) &disp->GetBufferSubDataARB; snprintf(symboln, sizeof(symboln), "%sGetBufferSubDataARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetBufferSubDataARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->IsBufferARB) { + void ** procp = (void **) &disp->IsBufferARB; snprintf(symboln, sizeof(symboln), "%sIsBuffer", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->IsBufferARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->IsBufferARB) { + void ** procp = (void **) &disp->IsBufferARB; snprintf(symboln, sizeof(symboln), "%sIsBufferARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->IsBufferARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MapBufferARB) { + void ** procp = (void **) &disp->MapBufferARB; snprintf(symboln, sizeof(symboln), "%sMapBuffer", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MapBufferARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MapBufferARB) { + void ** procp = (void **) &disp->MapBufferARB; snprintf(symboln, sizeof(symboln), "%sMapBufferARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MapBufferARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->UnmapBufferARB) { + void ** procp = (void **) &disp->UnmapBufferARB; snprintf(symboln, sizeof(symboln), "%sUnmapBuffer", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->UnmapBufferARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->UnmapBufferARB) { + void ** procp = (void **) &disp->UnmapBufferARB; snprintf(symboln, sizeof(symboln), "%sUnmapBufferARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->UnmapBufferARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BeginQueryARB) { + void ** procp = (void **) &disp->BeginQueryARB; snprintf(symboln, sizeof(symboln), "%sBeginQuery", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BeginQueryARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BeginQueryARB) { + void ** procp = (void **) &disp->BeginQueryARB; snprintf(symboln, sizeof(symboln), "%sBeginQueryARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BeginQueryARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DeleteQueriesARB) { + void ** procp = (void **) &disp->DeleteQueriesARB; snprintf(symboln, sizeof(symboln), "%sDeleteQueries", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DeleteQueriesARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DeleteQueriesARB) { + void ** procp = (void **) &disp->DeleteQueriesARB; snprintf(symboln, sizeof(symboln), "%sDeleteQueriesARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DeleteQueriesARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->EndQueryARB) { + void ** procp = (void **) &disp->EndQueryARB; snprintf(symboln, sizeof(symboln), "%sEndQuery", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->EndQueryARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->EndQueryARB) { + void ** procp = (void **) &disp->EndQueryARB; snprintf(symboln, sizeof(symboln), "%sEndQueryARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->EndQueryARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GenQueriesARB) { + void ** procp = (void **) &disp->GenQueriesARB; snprintf(symboln, sizeof(symboln), "%sGenQueries", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GenQueriesARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GenQueriesARB) { + void ** procp = (void **) &disp->GenQueriesARB; snprintf(symboln, sizeof(symboln), "%sGenQueriesARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GenQueriesARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetQueryObjectivARB) { + void ** procp = (void **) &disp->GetQueryObjectivARB; snprintf(symboln, sizeof(symboln), "%sGetQueryObjectiv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetQueryObjectivARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetQueryObjectivARB) { + void ** procp = (void **) &disp->GetQueryObjectivARB; snprintf(symboln, sizeof(symboln), "%sGetQueryObjectivARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetQueryObjectivARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetQueryObjectuivARB) { + void ** procp = (void **) &disp->GetQueryObjectuivARB; snprintf(symboln, sizeof(symboln), "%sGetQueryObjectuiv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetQueryObjectuivARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetQueryObjectuivARB) { + void ** procp = (void **) &disp->GetQueryObjectuivARB; snprintf(symboln, sizeof(symboln), "%sGetQueryObjectuivARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetQueryObjectuivARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetQueryivARB) { + void ** procp = (void **) &disp->GetQueryivARB; snprintf(symboln, sizeof(symboln), "%sGetQueryiv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetQueryivARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetQueryivARB) { + void ** procp = (void **) &disp->GetQueryivARB; snprintf(symboln, sizeof(symboln), "%sGetQueryivARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetQueryivARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->IsQueryARB) { + void ** procp = (void **) &disp->IsQueryARB; snprintf(symboln, sizeof(symboln), "%sIsQuery", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->IsQueryARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->IsQueryARB) { + void ** procp = (void **) &disp->IsQueryARB; snprintf(symboln, sizeof(symboln), "%sIsQueryARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->IsQueryARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->AttachObjectARB) { + void ** procp = (void **) &disp->AttachObjectARB; snprintf(symboln, sizeof(symboln), "%sAttachObjectARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->AttachObjectARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CompileShaderARB) { + void ** procp = (void **) &disp->CompileShaderARB; snprintf(symboln, sizeof(symboln), "%sCompileShader", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CompileShaderARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CompileShaderARB) { + void ** procp = (void **) &disp->CompileShaderARB; snprintf(symboln, sizeof(symboln), "%sCompileShaderARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CompileShaderARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CreateProgramObjectARB) { + void ** procp = (void **) &disp->CreateProgramObjectARB; snprintf(symboln, sizeof(symboln), "%sCreateProgramObjectARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CreateProgramObjectARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CreateShaderObjectARB) { + void ** procp = (void **) &disp->CreateShaderObjectARB; snprintf(symboln, sizeof(symboln), "%sCreateShaderObjectARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CreateShaderObjectARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DeleteObjectARB) { + void ** procp = (void **) &disp->DeleteObjectARB; snprintf(symboln, sizeof(symboln), "%sDeleteObjectARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DeleteObjectARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DetachObjectARB) { + void ** procp = (void **) &disp->DetachObjectARB; snprintf(symboln, sizeof(symboln), "%sDetachObjectARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DetachObjectARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetActiveUniformARB) { + void ** procp = (void **) &disp->GetActiveUniformARB; snprintf(symboln, sizeof(symboln), "%sGetActiveUniform", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetActiveUniformARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetActiveUniformARB) { + void ** procp = (void **) &disp->GetActiveUniformARB; snprintf(symboln, sizeof(symboln), "%sGetActiveUniformARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetActiveUniformARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetAttachedObjectsARB) { + void ** procp = (void **) &disp->GetAttachedObjectsARB; snprintf(symboln, sizeof(symboln), "%sGetAttachedObjectsARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetAttachedObjectsARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetHandleARB) { + void ** procp = (void **) &disp->GetHandleARB; snprintf(symboln, sizeof(symboln), "%sGetHandleARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetHandleARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetInfoLogARB) { + void ** procp = (void **) &disp->GetInfoLogARB; snprintf(symboln, sizeof(symboln), "%sGetInfoLogARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetInfoLogARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetObjectParameterfvARB) { + void ** procp = (void **) &disp->GetObjectParameterfvARB; snprintf(symboln, sizeof(symboln), "%sGetObjectParameterfvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetObjectParameterfvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetObjectParameterivARB) { + void ** procp = (void **) &disp->GetObjectParameterivARB; snprintf(symboln, sizeof(symboln), "%sGetObjectParameterivARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetObjectParameterivARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetShaderSourceARB) { + void ** procp = (void **) &disp->GetShaderSourceARB; snprintf(symboln, sizeof(symboln), "%sGetShaderSource", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetShaderSourceARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetShaderSourceARB) { + void ** procp = (void **) &disp->GetShaderSourceARB; snprintf(symboln, sizeof(symboln), "%sGetShaderSourceARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetShaderSourceARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetUniformLocationARB) { + void ** procp = (void **) &disp->GetUniformLocationARB; snprintf(symboln, sizeof(symboln), "%sGetUniformLocation", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetUniformLocationARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetUniformLocationARB) { + void ** procp = (void **) &disp->GetUniformLocationARB; snprintf(symboln, sizeof(symboln), "%sGetUniformLocationARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetUniformLocationARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetUniformfvARB) { + void ** procp = (void **) &disp->GetUniformfvARB; snprintf(symboln, sizeof(symboln), "%sGetUniformfv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetUniformfvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetUniformfvARB) { + void ** procp = (void **) &disp->GetUniformfvARB; snprintf(symboln, sizeof(symboln), "%sGetUniformfvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetUniformfvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetUniformivARB) { + void ** procp = (void **) &disp->GetUniformivARB; snprintf(symboln, sizeof(symboln), "%sGetUniformiv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetUniformivARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetUniformivARB) { + void ** procp = (void **) &disp->GetUniformivARB; snprintf(symboln, sizeof(symboln), "%sGetUniformivARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetUniformivARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->LinkProgramARB) { + void ** procp = (void **) &disp->LinkProgramARB; snprintf(symboln, sizeof(symboln), "%sLinkProgram", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->LinkProgramARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->LinkProgramARB) { + void ** procp = (void **) &disp->LinkProgramARB; snprintf(symboln, sizeof(symboln), "%sLinkProgramARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->LinkProgramARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ShaderSourceARB) { + void ** procp = (void **) &disp->ShaderSourceARB; snprintf(symboln, sizeof(symboln), "%sShaderSource", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ShaderSourceARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ShaderSourceARB) { + void ** procp = (void **) &disp->ShaderSourceARB; snprintf(symboln, sizeof(symboln), "%sShaderSourceARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ShaderSourceARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform1fARB) { + void ** procp = (void **) &disp->Uniform1fARB; snprintf(symboln, sizeof(symboln), "%sUniform1f", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform1fARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform1fARB) { + void ** procp = (void **) &disp->Uniform1fARB; snprintf(symboln, sizeof(symboln), "%sUniform1fARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform1fARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform1fvARB) { + void ** procp = (void **) &disp->Uniform1fvARB; snprintf(symboln, sizeof(symboln), "%sUniform1fv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform1fvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform1fvARB) { + void ** procp = (void **) &disp->Uniform1fvARB; snprintf(symboln, sizeof(symboln), "%sUniform1fvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform1fvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform1iARB) { + void ** procp = (void **) &disp->Uniform1iARB; snprintf(symboln, sizeof(symboln), "%sUniform1i", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform1iARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform1iARB) { + void ** procp = (void **) &disp->Uniform1iARB; snprintf(symboln, sizeof(symboln), "%sUniform1iARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform1iARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform1ivARB) { + void ** procp = (void **) &disp->Uniform1ivARB; snprintf(symboln, sizeof(symboln), "%sUniform1iv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform1ivARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform1ivARB) { + void ** procp = (void **) &disp->Uniform1ivARB; snprintf(symboln, sizeof(symboln), "%sUniform1ivARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform1ivARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform2fARB) { + void ** procp = (void **) &disp->Uniform2fARB; snprintf(symboln, sizeof(symboln), "%sUniform2f", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform2fARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform2fARB) { + void ** procp = (void **) &disp->Uniform2fARB; snprintf(symboln, sizeof(symboln), "%sUniform2fARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform2fARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform2fvARB) { + void ** procp = (void **) &disp->Uniform2fvARB; snprintf(symboln, sizeof(symboln), "%sUniform2fv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform2fvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform2fvARB) { + void ** procp = (void **) &disp->Uniform2fvARB; snprintf(symboln, sizeof(symboln), "%sUniform2fvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform2fvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform2iARB) { + void ** procp = (void **) &disp->Uniform2iARB; snprintf(symboln, sizeof(symboln), "%sUniform2i", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform2iARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform2iARB) { + void ** procp = (void **) &disp->Uniform2iARB; snprintf(symboln, sizeof(symboln), "%sUniform2iARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform2iARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform2ivARB) { + void ** procp = (void **) &disp->Uniform2ivARB; snprintf(symboln, sizeof(symboln), "%sUniform2iv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform2ivARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform2ivARB) { + void ** procp = (void **) &disp->Uniform2ivARB; snprintf(symboln, sizeof(symboln), "%sUniform2ivARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform2ivARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform3fARB) { + void ** procp = (void **) &disp->Uniform3fARB; snprintf(symboln, sizeof(symboln), "%sUniform3f", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform3fARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform3fARB) { + void ** procp = (void **) &disp->Uniform3fARB; snprintf(symboln, sizeof(symboln), "%sUniform3fARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform3fARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform3fvARB) { + void ** procp = (void **) &disp->Uniform3fvARB; snprintf(symboln, sizeof(symboln), "%sUniform3fv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform3fvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform3fvARB) { + void ** procp = (void **) &disp->Uniform3fvARB; snprintf(symboln, sizeof(symboln), "%sUniform3fvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform3fvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform3iARB) { + void ** procp = (void **) &disp->Uniform3iARB; snprintf(symboln, sizeof(symboln), "%sUniform3i", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform3iARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform3iARB) { + void ** procp = (void **) &disp->Uniform3iARB; snprintf(symboln, sizeof(symboln), "%sUniform3iARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform3iARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform3ivARB) { + void ** procp = (void **) &disp->Uniform3ivARB; snprintf(symboln, sizeof(symboln), "%sUniform3iv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform3ivARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform3ivARB) { + void ** procp = (void **) &disp->Uniform3ivARB; snprintf(symboln, sizeof(symboln), "%sUniform3ivARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform3ivARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform4fARB) { + void ** procp = (void **) &disp->Uniform4fARB; snprintf(symboln, sizeof(symboln), "%sUniform4f", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform4fARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform4fARB) { + void ** procp = (void **) &disp->Uniform4fARB; snprintf(symboln, sizeof(symboln), "%sUniform4fARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform4fARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform4fvARB) { + void ** procp = (void **) &disp->Uniform4fvARB; snprintf(symboln, sizeof(symboln), "%sUniform4fv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform4fvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform4fvARB) { + void ** procp = (void **) &disp->Uniform4fvARB; snprintf(symboln, sizeof(symboln), "%sUniform4fvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform4fvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform4iARB) { + void ** procp = (void **) &disp->Uniform4iARB; snprintf(symboln, sizeof(symboln), "%sUniform4i", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform4iARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform4iARB) { + void ** procp = (void **) &disp->Uniform4iARB; snprintf(symboln, sizeof(symboln), "%sUniform4iARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform4iARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform4ivARB) { + void ** procp = (void **) &disp->Uniform4ivARB; snprintf(symboln, sizeof(symboln), "%sUniform4iv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform4ivARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform4ivARB) { + void ** procp = (void **) &disp->Uniform4ivARB; snprintf(symboln, sizeof(symboln), "%sUniform4ivARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform4ivARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->UniformMatrix2fvARB) { + void ** procp = (void **) &disp->UniformMatrix2fvARB; snprintf(symboln, sizeof(symboln), "%sUniformMatrix2fv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->UniformMatrix2fvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->UniformMatrix2fvARB) { + void ** procp = (void **) &disp->UniformMatrix2fvARB; snprintf(symboln, sizeof(symboln), "%sUniformMatrix2fvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->UniformMatrix2fvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->UniformMatrix3fvARB) { + void ** procp = (void **) &disp->UniformMatrix3fvARB; snprintf(symboln, sizeof(symboln), "%sUniformMatrix3fv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->UniformMatrix3fvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->UniformMatrix3fvARB) { + void ** procp = (void **) &disp->UniformMatrix3fvARB; snprintf(symboln, sizeof(symboln), "%sUniformMatrix3fvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->UniformMatrix3fvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->UniformMatrix4fvARB) { + void ** procp = (void **) &disp->UniformMatrix4fvARB; snprintf(symboln, sizeof(symboln), "%sUniformMatrix4fv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->UniformMatrix4fvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->UniformMatrix4fvARB) { + void ** procp = (void **) &disp->UniformMatrix4fvARB; snprintf(symboln, sizeof(symboln), "%sUniformMatrix4fvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->UniformMatrix4fvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->UseProgramObjectARB) { + void ** procp = (void **) &disp->UseProgramObjectARB; snprintf(symboln, sizeof(symboln), "%sUseProgram", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->UseProgramObjectARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->UseProgramObjectARB) { + void ** procp = (void **) &disp->UseProgramObjectARB; snprintf(symboln, sizeof(symboln), "%sUseProgramObjectARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->UseProgramObjectARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ValidateProgramARB) { + void ** procp = (void **) &disp->ValidateProgramARB; snprintf(symboln, sizeof(symboln), "%sValidateProgram", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ValidateProgramARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ValidateProgramARB) { + void ** procp = (void **) &disp->ValidateProgramARB; snprintf(symboln, sizeof(symboln), "%sValidateProgramARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ValidateProgramARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BindAttribLocationARB) { + void ** procp = (void **) &disp->BindAttribLocationARB; snprintf(symboln, sizeof(symboln), "%sBindAttribLocation", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BindAttribLocationARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BindAttribLocationARB) { + void ** procp = (void **) &disp->BindAttribLocationARB; snprintf(symboln, sizeof(symboln), "%sBindAttribLocationARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BindAttribLocationARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetActiveAttribARB) { + void ** procp = (void **) &disp->GetActiveAttribARB; snprintf(symboln, sizeof(symboln), "%sGetActiveAttrib", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetActiveAttribARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetActiveAttribARB) { + void ** procp = (void **) &disp->GetActiveAttribARB; snprintf(symboln, sizeof(symboln), "%sGetActiveAttribARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetActiveAttribARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetAttribLocationARB) { + void ** procp = (void **) &disp->GetAttribLocationARB; snprintf(symboln, sizeof(symboln), "%sGetAttribLocation", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetAttribLocationARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetAttribLocationARB) { + void ** procp = (void **) &disp->GetAttribLocationARB; snprintf(symboln, sizeof(symboln), "%sGetAttribLocationARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetAttribLocationARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DrawBuffersARB) { + void ** procp = (void **) &disp->DrawBuffersARB; snprintf(symboln, sizeof(symboln), "%sDrawBuffers", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DrawBuffersARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DrawBuffersARB) { + void ** procp = (void **) &disp->DrawBuffersARB; snprintf(symboln, sizeof(symboln), "%sDrawBuffersARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DrawBuffersARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DrawBuffersARB) { + void ** procp = (void **) &disp->DrawBuffersARB; snprintf(symboln, sizeof(symboln), "%sDrawBuffersATI", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DrawBuffersARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ClampColorARB) { + void ** procp = (void **) &disp->ClampColorARB; snprintf(symboln, sizeof(symboln), "%sClampColorARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ClampColorARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DrawArraysInstancedARB) { + void ** procp = (void **) &disp->DrawArraysInstancedARB; snprintf(symboln, sizeof(symboln), "%sDrawArraysInstancedARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DrawArraysInstancedARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DrawArraysInstancedARB) { + void ** procp = (void **) &disp->DrawArraysInstancedARB; snprintf(symboln, sizeof(symboln), "%sDrawArraysInstancedEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DrawArraysInstancedARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DrawArraysInstancedARB) { + void ** procp = (void **) &disp->DrawArraysInstancedARB; snprintf(symboln, sizeof(symboln), "%sDrawArraysInstanced", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DrawArraysInstancedARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DrawElementsInstancedARB) { + void ** procp = (void **) &disp->DrawElementsInstancedARB; snprintf(symboln, sizeof(symboln), "%sDrawElementsInstancedARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DrawElementsInstancedARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DrawElementsInstancedARB) { + void ** procp = (void **) &disp->DrawElementsInstancedARB; snprintf(symboln, sizeof(symboln), "%sDrawElementsInstancedEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DrawElementsInstancedARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DrawElementsInstancedARB) { + void ** procp = (void **) &disp->DrawElementsInstancedARB; snprintf(symboln, sizeof(symboln), "%sDrawElementsInstanced", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DrawElementsInstancedARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->RenderbufferStorageMultisample) { + void ** procp = (void **) &disp->RenderbufferStorageMultisample; snprintf(symboln, sizeof(symboln), "%sRenderbufferStorageMultisample", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->RenderbufferStorageMultisample; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->RenderbufferStorageMultisample) { + void ** procp = (void **) &disp->RenderbufferStorageMultisample; snprintf(symboln, sizeof(symboln), "%sRenderbufferStorageMultisampleEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->RenderbufferStorageMultisample; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->FramebufferTextureARB) { + void ** procp = (void **) &disp->FramebufferTextureARB; snprintf(symboln, sizeof(symboln), "%sFramebufferTextureARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->FramebufferTextureARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->FramebufferTextureFaceARB) { + void ** procp = (void **) &disp->FramebufferTextureFaceARB; snprintf(symboln, sizeof(symboln), "%sFramebufferTextureFaceARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->FramebufferTextureFaceARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ProgramParameteriARB) { + void ** procp = (void **) &disp->ProgramParameteriARB; snprintf(symboln, sizeof(symboln), "%sProgramParameteriARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ProgramParameteriARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribDivisorARB) { + void ** procp = (void **) &disp->VertexAttribDivisorARB; snprintf(symboln, sizeof(symboln), "%sVertexAttribDivisorARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribDivisorARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->FlushMappedBufferRange) { + void ** procp = (void **) &disp->FlushMappedBufferRange; snprintf(symboln, sizeof(symboln), "%sFlushMappedBufferRange", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->FlushMappedBufferRange; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MapBufferRange) { + void ** procp = (void **) &disp->MapBufferRange; snprintf(symboln, sizeof(symboln), "%sMapBufferRange", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MapBufferRange; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexBufferARB) { + void ** procp = (void **) &disp->TexBufferARB; snprintf(symboln, sizeof(symboln), "%sTexBufferARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexBufferARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BindVertexArray) { + void ** procp = (void **) &disp->BindVertexArray; snprintf(symboln, sizeof(symboln), "%sBindVertexArray", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BindVertexArray; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GenVertexArrays) { + void ** procp = (void **) &disp->GenVertexArrays; snprintf(symboln, sizeof(symboln), "%sGenVertexArrays", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GenVertexArrays; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CopyBufferSubData) { + void ** procp = (void **) &disp->CopyBufferSubData; snprintf(symboln, sizeof(symboln), "%sCopyBufferSubData", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CopyBufferSubData; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ClientWaitSync) { + void ** procp = (void **) &disp->ClientWaitSync; snprintf(symboln, sizeof(symboln), "%sClientWaitSync", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ClientWaitSync; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DeleteSync) { + void ** procp = (void **) &disp->DeleteSync; snprintf(symboln, sizeof(symboln), "%sDeleteSync", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DeleteSync; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->FenceSync) { + void ** procp = (void **) &disp->FenceSync; snprintf(symboln, sizeof(symboln), "%sFenceSync", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->FenceSync; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetInteger64v) { + void ** procp = (void **) &disp->GetInteger64v; snprintf(symboln, sizeof(symboln), "%sGetInteger64v", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetInteger64v; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetSynciv) { + void ** procp = (void **) &disp->GetSynciv; snprintf(symboln, sizeof(symboln), "%sGetSynciv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetSynciv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->IsSync) { + void ** procp = (void **) &disp->IsSync; snprintf(symboln, sizeof(symboln), "%sIsSync", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->IsSync; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WaitSync) { + void ** procp = (void **) &disp->WaitSync; snprintf(symboln, sizeof(symboln), "%sWaitSync", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WaitSync; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DrawElementsBaseVertex) { + void ** procp = (void **) &disp->DrawElementsBaseVertex; snprintf(symboln, sizeof(symboln), "%sDrawElementsBaseVertex", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DrawElementsBaseVertex; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DrawElementsInstancedBaseVertex) { + void ** procp = (void **) &disp->DrawElementsInstancedBaseVertex; snprintf(symboln, sizeof(symboln), "%sDrawElementsInstancedBaseVertex", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DrawElementsInstancedBaseVertex; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DrawRangeElementsBaseVertex) { + void ** procp = (void **) &disp->DrawRangeElementsBaseVertex; snprintf(symboln, sizeof(symboln), "%sDrawRangeElementsBaseVertex", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DrawRangeElementsBaseVertex; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiDrawElementsBaseVertex) { + void ** procp = (void **) &disp->MultiDrawElementsBaseVertex; snprintf(symboln, sizeof(symboln), "%sMultiDrawElementsBaseVertex", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiDrawElementsBaseVertex; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BlendEquationSeparateiARB) { + void ** procp = (void **) &disp->BlendEquationSeparateiARB; snprintf(symboln, sizeof(symboln), "%sBlendEquationSeparateiARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BlendEquationSeparateiARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BlendEquationSeparateiARB) { + void ** procp = (void **) &disp->BlendEquationSeparateiARB; snprintf(symboln, sizeof(symboln), "%sBlendEquationSeparateIndexedAMD", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BlendEquationSeparateiARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BlendEquationiARB) { + void ** procp = (void **) &disp->BlendEquationiARB; snprintf(symboln, sizeof(symboln), "%sBlendEquationiARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BlendEquationiARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BlendEquationiARB) { + void ** procp = (void **) &disp->BlendEquationiARB; snprintf(symboln, sizeof(symboln), "%sBlendEquationIndexedAMD", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BlendEquationiARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BlendFuncSeparateiARB) { + void ** procp = (void **) &disp->BlendFuncSeparateiARB; snprintf(symboln, sizeof(symboln), "%sBlendFuncSeparateiARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BlendFuncSeparateiARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BlendFuncSeparateiARB) { + void ** procp = (void **) &disp->BlendFuncSeparateiARB; snprintf(symboln, sizeof(symboln), "%sBlendFuncSeparateIndexedAMD", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BlendFuncSeparateiARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BlendFunciARB) { + void ** procp = (void **) &disp->BlendFunciARB; snprintf(symboln, sizeof(symboln), "%sBlendFunciARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BlendFunciARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BlendFunciARB) { + void ** procp = (void **) &disp->BlendFunciARB; snprintf(symboln, sizeof(symboln), "%sBlendFuncIndexedAMD", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BlendFunciARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BindSampler) { + void ** procp = (void **) &disp->BindSampler; snprintf(symboln, sizeof(symboln), "%sBindSampler", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BindSampler; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DeleteSamplers) { + void ** procp = (void **) &disp->DeleteSamplers; snprintf(symboln, sizeof(symboln), "%sDeleteSamplers", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DeleteSamplers; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GenSamplers) { + void ** procp = (void **) &disp->GenSamplers; snprintf(symboln, sizeof(symboln), "%sGenSamplers", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GenSamplers; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetSamplerParameterIiv) { + void ** procp = (void **) &disp->GetSamplerParameterIiv; snprintf(symboln, sizeof(symboln), "%sGetSamplerParameterIiv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetSamplerParameterIiv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetSamplerParameterIuiv) { + void ** procp = (void **) &disp->GetSamplerParameterIuiv; snprintf(symboln, sizeof(symboln), "%sGetSamplerParameterIuiv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetSamplerParameterIuiv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetSamplerParameterfv) { + void ** procp = (void **) &disp->GetSamplerParameterfv; snprintf(symboln, sizeof(symboln), "%sGetSamplerParameterfv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetSamplerParameterfv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetSamplerParameteriv) { + void ** procp = (void **) &disp->GetSamplerParameteriv; snprintf(symboln, sizeof(symboln), "%sGetSamplerParameteriv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetSamplerParameteriv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->IsSampler) { + void ** procp = (void **) &disp->IsSampler; snprintf(symboln, sizeof(symboln), "%sIsSampler", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->IsSampler; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SamplerParameterIiv) { + void ** procp = (void **) &disp->SamplerParameterIiv; snprintf(symboln, sizeof(symboln), "%sSamplerParameterIiv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SamplerParameterIiv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SamplerParameterIuiv) { + void ** procp = (void **) &disp->SamplerParameterIuiv; snprintf(symboln, sizeof(symboln), "%sSamplerParameterIuiv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SamplerParameterIuiv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SamplerParameterf) { + void ** procp = (void **) &disp->SamplerParameterf; snprintf(symboln, sizeof(symboln), "%sSamplerParameterf", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SamplerParameterf; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SamplerParameterfv) { + void ** procp = (void **) &disp->SamplerParameterfv; snprintf(symboln, sizeof(symboln), "%sSamplerParameterfv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SamplerParameterfv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SamplerParameteri) { + void ** procp = (void **) &disp->SamplerParameteri; snprintf(symboln, sizeof(symboln), "%sSamplerParameteri", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SamplerParameteri; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SamplerParameteriv) { + void ** procp = (void **) &disp->SamplerParameteriv; snprintf(symboln, sizeof(symboln), "%sSamplerParameteriv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SamplerParameteriv; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BindTransformFeedback) { + void ** procp = (void **) &disp->BindTransformFeedback; snprintf(symboln, sizeof(symboln), "%sBindTransformFeedback", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BindTransformFeedback; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DeleteTransformFeedbacks) { + void ** procp = (void **) &disp->DeleteTransformFeedbacks; snprintf(symboln, sizeof(symboln), "%sDeleteTransformFeedbacks", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DeleteTransformFeedbacks; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DrawTransformFeedback) { + void ** procp = (void **) &disp->DrawTransformFeedback; snprintf(symboln, sizeof(symboln), "%sDrawTransformFeedback", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DrawTransformFeedback; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GenTransformFeedbacks) { + void ** procp = (void **) &disp->GenTransformFeedbacks; snprintf(symboln, sizeof(symboln), "%sGenTransformFeedbacks", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GenTransformFeedbacks; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->IsTransformFeedback) { + void ** procp = (void **) &disp->IsTransformFeedback; snprintf(symboln, sizeof(symboln), "%sIsTransformFeedback", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->IsTransformFeedback; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PauseTransformFeedback) { + void ** procp = (void **) &disp->PauseTransformFeedback; snprintf(symboln, sizeof(symboln), "%sPauseTransformFeedback", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PauseTransformFeedback; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ResumeTransformFeedback) { + void ** procp = (void **) &disp->ResumeTransformFeedback; snprintf(symboln, sizeof(symboln), "%sResumeTransformFeedback", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ResumeTransformFeedback; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ClearDepthf) { + void ** procp = (void **) &disp->ClearDepthf; snprintf(symboln, sizeof(symboln), "%sClearDepthf", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ClearDepthf; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DepthRangef) { + void ** procp = (void **) &disp->DepthRangef; snprintf(symboln, sizeof(symboln), "%sDepthRangef", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DepthRangef; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetShaderPrecisionFormat) { + void ** procp = (void **) &disp->GetShaderPrecisionFormat; snprintf(symboln, sizeof(symboln), "%sGetShaderPrecisionFormat", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetShaderPrecisionFormat; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ReleaseShaderCompiler) { + void ** procp = (void **) &disp->ReleaseShaderCompiler; snprintf(symboln, sizeof(symboln), "%sReleaseShaderCompiler", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ReleaseShaderCompiler; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ShaderBinary) { + void ** procp = (void **) &disp->ShaderBinary; snprintf(symboln, sizeof(symboln), "%sShaderBinary", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ShaderBinary; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetGraphicsResetStatusARB) { + void ** procp = (void **) &disp->GetGraphicsResetStatusARB; snprintf(symboln, sizeof(symboln), "%sGetGraphicsResetStatusARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetGraphicsResetStatusARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetnColorTableARB) { + void ** procp = (void **) &disp->GetnColorTableARB; snprintf(symboln, sizeof(symboln), "%sGetnColorTableARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetnColorTableARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetnCompressedTexImageARB) { + void ** procp = (void **) &disp->GetnCompressedTexImageARB; snprintf(symboln, sizeof(symboln), "%sGetnCompressedTexImageARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetnCompressedTexImageARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetnConvolutionFilterARB) { + void ** procp = (void **) &disp->GetnConvolutionFilterARB; snprintf(symboln, sizeof(symboln), "%sGetnConvolutionFilterARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetnConvolutionFilterARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetnHistogramARB) { + void ** procp = (void **) &disp->GetnHistogramARB; snprintf(symboln, sizeof(symboln), "%sGetnHistogramARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetnHistogramARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetnMapdvARB) { + void ** procp = (void **) &disp->GetnMapdvARB; snprintf(symboln, sizeof(symboln), "%sGetnMapdvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetnMapdvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetnMapfvARB) { + void ** procp = (void **) &disp->GetnMapfvARB; snprintf(symboln, sizeof(symboln), "%sGetnMapfvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetnMapfvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetnMapivARB) { + void ** procp = (void **) &disp->GetnMapivARB; snprintf(symboln, sizeof(symboln), "%sGetnMapivARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetnMapivARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetnMinmaxARB) { + void ** procp = (void **) &disp->GetnMinmaxARB; snprintf(symboln, sizeof(symboln), "%sGetnMinmaxARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetnMinmaxARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetnPixelMapfvARB) { + void ** procp = (void **) &disp->GetnPixelMapfvARB; snprintf(symboln, sizeof(symboln), "%sGetnPixelMapfvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetnPixelMapfvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetnPixelMapuivARB) { + void ** procp = (void **) &disp->GetnPixelMapuivARB; snprintf(symboln, sizeof(symboln), "%sGetnPixelMapuivARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetnPixelMapuivARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetnPixelMapusvARB) { + void ** procp = (void **) &disp->GetnPixelMapusvARB; snprintf(symboln, sizeof(symboln), "%sGetnPixelMapusvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetnPixelMapusvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetnPolygonStippleARB) { + void ** procp = (void **) &disp->GetnPolygonStippleARB; snprintf(symboln, sizeof(symboln), "%sGetnPolygonStippleARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetnPolygonStippleARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetnSeparableFilterARB) { + void ** procp = (void **) &disp->GetnSeparableFilterARB; snprintf(symboln, sizeof(symboln), "%sGetnSeparableFilterARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetnSeparableFilterARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetnTexImageARB) { + void ** procp = (void **) &disp->GetnTexImageARB; snprintf(symboln, sizeof(symboln), "%sGetnTexImageARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetnTexImageARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetnUniformdvARB) { + void ** procp = (void **) &disp->GetnUniformdvARB; snprintf(symboln, sizeof(symboln), "%sGetnUniformdvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetnUniformdvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetnUniformfvARB) { + void ** procp = (void **) &disp->GetnUniformfvARB; snprintf(symboln, sizeof(symboln), "%sGetnUniformfvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetnUniformfvARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetnUniformivARB) { + void ** procp = (void **) &disp->GetnUniformivARB; snprintf(symboln, sizeof(symboln), "%sGetnUniformivARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetnUniformivARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetnUniformuivARB) { + void ** procp = (void **) &disp->GetnUniformuivARB; snprintf(symboln, sizeof(symboln), "%sGetnUniformuivARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetnUniformuivARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ReadnPixelsARB) { + void ** procp = (void **) &disp->ReadnPixelsARB; snprintf(symboln, sizeof(symboln), "%sReadnPixelsARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ReadnPixelsARB; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PolygonOffsetEXT) { + void ** procp = (void **) &disp->PolygonOffsetEXT; snprintf(symboln, sizeof(symboln), "%sPolygonOffsetEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PolygonOffsetEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetPixelTexGenParameterfvSGIS) { + void ** procp = (void **) &disp->GetPixelTexGenParameterfvSGIS; snprintf(symboln, sizeof(symboln), "%sGetPixelTexGenParameterfvSGIS", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetPixelTexGenParameterfvSGIS; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetPixelTexGenParameterivSGIS) { + void ** procp = (void **) &disp->GetPixelTexGenParameterivSGIS; snprintf(symboln, sizeof(symboln), "%sGetPixelTexGenParameterivSGIS", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetPixelTexGenParameterivSGIS; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PixelTexGenParameterfSGIS) { + void ** procp = (void **) &disp->PixelTexGenParameterfSGIS; snprintf(symboln, sizeof(symboln), "%sPixelTexGenParameterfSGIS", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PixelTexGenParameterfSGIS; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PixelTexGenParameterfvSGIS) { + void ** procp = (void **) &disp->PixelTexGenParameterfvSGIS; snprintf(symboln, sizeof(symboln), "%sPixelTexGenParameterfvSGIS", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PixelTexGenParameterfvSGIS; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PixelTexGenParameteriSGIS) { + void ** procp = (void **) &disp->PixelTexGenParameteriSGIS; snprintf(symboln, sizeof(symboln), "%sPixelTexGenParameteriSGIS", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PixelTexGenParameteriSGIS; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PixelTexGenParameterivSGIS) { + void ** procp = (void **) &disp->PixelTexGenParameterivSGIS; snprintf(symboln, sizeof(symboln), "%sPixelTexGenParameterivSGIS", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PixelTexGenParameterivSGIS; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SampleMaskSGIS) { + void ** procp = (void **) &disp->SampleMaskSGIS; snprintf(symboln, sizeof(symboln), "%sSampleMaskSGIS", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SampleMaskSGIS; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SampleMaskSGIS) { + void ** procp = (void **) &disp->SampleMaskSGIS; snprintf(symboln, sizeof(symboln), "%sSampleMaskEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SampleMaskSGIS; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SamplePatternSGIS) { + void ** procp = (void **) &disp->SamplePatternSGIS; snprintf(symboln, sizeof(symboln), "%sSamplePatternSGIS", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SamplePatternSGIS; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SamplePatternSGIS) { + void ** procp = (void **) &disp->SamplePatternSGIS; snprintf(symboln, sizeof(symboln), "%sSamplePatternEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SamplePatternSGIS; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ColorPointerEXT) { + void ** procp = (void **) &disp->ColorPointerEXT; snprintf(symboln, sizeof(symboln), "%sColorPointerEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ColorPointerEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->EdgeFlagPointerEXT) { + void ** procp = (void **) &disp->EdgeFlagPointerEXT; snprintf(symboln, sizeof(symboln), "%sEdgeFlagPointerEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->EdgeFlagPointerEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->IndexPointerEXT) { + void ** procp = (void **) &disp->IndexPointerEXT; snprintf(symboln, sizeof(symboln), "%sIndexPointerEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->IndexPointerEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->NormalPointerEXT) { + void ** procp = (void **) &disp->NormalPointerEXT; snprintf(symboln, sizeof(symboln), "%sNormalPointerEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->NormalPointerEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexCoordPointerEXT) { + void ** procp = (void **) &disp->TexCoordPointerEXT; snprintf(symboln, sizeof(symboln), "%sTexCoordPointerEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexCoordPointerEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexPointerEXT) { + void ** procp = (void **) &disp->VertexPointerEXT; snprintf(symboln, sizeof(symboln), "%sVertexPointerEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexPointerEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PointParameterfEXT) { + void ** procp = (void **) &disp->PointParameterfEXT; snprintf(symboln, sizeof(symboln), "%sPointParameterf", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PointParameterfEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PointParameterfEXT) { + void ** procp = (void **) &disp->PointParameterfEXT; snprintf(symboln, sizeof(symboln), "%sPointParameterfARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PointParameterfEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PointParameterfEXT) { + void ** procp = (void **) &disp->PointParameterfEXT; snprintf(symboln, sizeof(symboln), "%sPointParameterfEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PointParameterfEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PointParameterfEXT) { + void ** procp = (void **) &disp->PointParameterfEXT; snprintf(symboln, sizeof(symboln), "%sPointParameterfSGIS", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PointParameterfEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PointParameterfvEXT) { + void ** procp = (void **) &disp->PointParameterfvEXT; snprintf(symboln, sizeof(symboln), "%sPointParameterfv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PointParameterfvEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PointParameterfvEXT) { + void ** procp = (void **) &disp->PointParameterfvEXT; snprintf(symboln, sizeof(symboln), "%sPointParameterfvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PointParameterfvEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PointParameterfvEXT) { + void ** procp = (void **) &disp->PointParameterfvEXT; snprintf(symboln, sizeof(symboln), "%sPointParameterfvEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PointParameterfvEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PointParameterfvEXT) { + void ** procp = (void **) &disp->PointParameterfvEXT; snprintf(symboln, sizeof(symboln), "%sPointParameterfvSGIS", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PointParameterfvEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->LockArraysEXT) { + void ** procp = (void **) &disp->LockArraysEXT; snprintf(symboln, sizeof(symboln), "%sLockArraysEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->LockArraysEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->UnlockArraysEXT) { + void ** procp = (void **) &disp->UnlockArraysEXT; snprintf(symboln, sizeof(symboln), "%sUnlockArraysEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->UnlockArraysEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SecondaryColor3bEXT) { + void ** procp = (void **) &disp->SecondaryColor3bEXT; snprintf(symboln, sizeof(symboln), "%sSecondaryColor3b", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3bEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SecondaryColor3bEXT) { + void ** procp = (void **) &disp->SecondaryColor3bEXT; snprintf(symboln, sizeof(symboln), "%sSecondaryColor3bEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3bEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SecondaryColor3bvEXT) { + void ** procp = (void **) &disp->SecondaryColor3bvEXT; snprintf(symboln, sizeof(symboln), "%sSecondaryColor3bv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3bvEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SecondaryColor3bvEXT) { + void ** procp = (void **) &disp->SecondaryColor3bvEXT; snprintf(symboln, sizeof(symboln), "%sSecondaryColor3bvEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3bvEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SecondaryColor3dEXT) { + void ** procp = (void **) &disp->SecondaryColor3dEXT; snprintf(symboln, sizeof(symboln), "%sSecondaryColor3d", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3dEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SecondaryColor3dEXT) { + void ** procp = (void **) &disp->SecondaryColor3dEXT; snprintf(symboln, sizeof(symboln), "%sSecondaryColor3dEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3dEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SecondaryColor3dvEXT) { + void ** procp = (void **) &disp->SecondaryColor3dvEXT; snprintf(symboln, sizeof(symboln), "%sSecondaryColor3dv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3dvEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SecondaryColor3dvEXT) { + void ** procp = (void **) &disp->SecondaryColor3dvEXT; snprintf(symboln, sizeof(symboln), "%sSecondaryColor3dvEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3dvEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SecondaryColor3fEXT) { + void ** procp = (void **) &disp->SecondaryColor3fEXT; snprintf(symboln, sizeof(symboln), "%sSecondaryColor3f", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3fEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SecondaryColor3fEXT) { + void ** procp = (void **) &disp->SecondaryColor3fEXT; snprintf(symboln, sizeof(symboln), "%sSecondaryColor3fEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3fEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SecondaryColor3fvEXT) { + void ** procp = (void **) &disp->SecondaryColor3fvEXT; snprintf(symboln, sizeof(symboln), "%sSecondaryColor3fv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3fvEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SecondaryColor3fvEXT) { + void ** procp = (void **) &disp->SecondaryColor3fvEXT; snprintf(symboln, sizeof(symboln), "%sSecondaryColor3fvEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3fvEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SecondaryColor3iEXT) { + void ** procp = (void **) &disp->SecondaryColor3iEXT; snprintf(symboln, sizeof(symboln), "%sSecondaryColor3i", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3iEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SecondaryColor3iEXT) { + void ** procp = (void **) &disp->SecondaryColor3iEXT; snprintf(symboln, sizeof(symboln), "%sSecondaryColor3iEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3iEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SecondaryColor3ivEXT) { + void ** procp = (void **) &disp->SecondaryColor3ivEXT; snprintf(symboln, sizeof(symboln), "%sSecondaryColor3iv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3ivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SecondaryColor3ivEXT) { + void ** procp = (void **) &disp->SecondaryColor3ivEXT; snprintf(symboln, sizeof(symboln), "%sSecondaryColor3ivEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3ivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SecondaryColor3sEXT) { + void ** procp = (void **) &disp->SecondaryColor3sEXT; snprintf(symboln, sizeof(symboln), "%sSecondaryColor3s", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3sEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SecondaryColor3sEXT) { + void ** procp = (void **) &disp->SecondaryColor3sEXT; snprintf(symboln, sizeof(symboln), "%sSecondaryColor3sEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3sEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SecondaryColor3svEXT) { + void ** procp = (void **) &disp->SecondaryColor3svEXT; snprintf(symboln, sizeof(symboln), "%sSecondaryColor3sv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3svEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SecondaryColor3svEXT) { + void ** procp = (void **) &disp->SecondaryColor3svEXT; snprintf(symboln, sizeof(symboln), "%sSecondaryColor3svEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3svEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SecondaryColor3ubEXT) { + void ** procp = (void **) &disp->SecondaryColor3ubEXT; snprintf(symboln, sizeof(symboln), "%sSecondaryColor3ub", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3ubEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SecondaryColor3ubEXT) { + void ** procp = (void **) &disp->SecondaryColor3ubEXT; snprintf(symboln, sizeof(symboln), "%sSecondaryColor3ubEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3ubEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SecondaryColor3ubvEXT) { + void ** procp = (void **) &disp->SecondaryColor3ubvEXT; snprintf(symboln, sizeof(symboln), "%sSecondaryColor3ubv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3ubvEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SecondaryColor3ubvEXT) { + void ** procp = (void **) &disp->SecondaryColor3ubvEXT; snprintf(symboln, sizeof(symboln), "%sSecondaryColor3ubvEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3ubvEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SecondaryColor3uiEXT) { + void ** procp = (void **) &disp->SecondaryColor3uiEXT; snprintf(symboln, sizeof(symboln), "%sSecondaryColor3ui", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3uiEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SecondaryColor3uiEXT) { + void ** procp = (void **) &disp->SecondaryColor3uiEXT; snprintf(symboln, sizeof(symboln), "%sSecondaryColor3uiEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3uiEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SecondaryColor3uivEXT) { + void ** procp = (void **) &disp->SecondaryColor3uivEXT; snprintf(symboln, sizeof(symboln), "%sSecondaryColor3uiv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3uivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SecondaryColor3uivEXT) { + void ** procp = (void **) &disp->SecondaryColor3uivEXT; snprintf(symboln, sizeof(symboln), "%sSecondaryColor3uivEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3uivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SecondaryColor3usEXT) { + void ** procp = (void **) &disp->SecondaryColor3usEXT; snprintf(symboln, sizeof(symboln), "%sSecondaryColor3us", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3usEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SecondaryColor3usEXT) { + void ** procp = (void **) &disp->SecondaryColor3usEXT; snprintf(symboln, sizeof(symboln), "%sSecondaryColor3usEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3usEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SecondaryColor3usvEXT) { + void ** procp = (void **) &disp->SecondaryColor3usvEXT; snprintf(symboln, sizeof(symboln), "%sSecondaryColor3usv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3usvEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SecondaryColor3usvEXT) { + void ** procp = (void **) &disp->SecondaryColor3usvEXT; snprintf(symboln, sizeof(symboln), "%sSecondaryColor3usvEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColor3usvEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SecondaryColorPointerEXT) { + void ** procp = (void **) &disp->SecondaryColorPointerEXT; snprintf(symboln, sizeof(symboln), "%sSecondaryColorPointer", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColorPointerEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SecondaryColorPointerEXT) { + void ** procp = (void **) &disp->SecondaryColorPointerEXT; snprintf(symboln, sizeof(symboln), "%sSecondaryColorPointerEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SecondaryColorPointerEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiDrawArraysEXT) { + void ** procp = (void **) &disp->MultiDrawArraysEXT; snprintf(symboln, sizeof(symboln), "%sMultiDrawArrays", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiDrawArraysEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiDrawArraysEXT) { + void ** procp = (void **) &disp->MultiDrawArraysEXT; snprintf(symboln, sizeof(symboln), "%sMultiDrawArraysEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiDrawArraysEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiDrawElementsEXT) { + void ** procp = (void **) &disp->MultiDrawElementsEXT; snprintf(symboln, sizeof(symboln), "%sMultiDrawElements", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiDrawElementsEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiDrawElementsEXT) { + void ** procp = (void **) &disp->MultiDrawElementsEXT; snprintf(symboln, sizeof(symboln), "%sMultiDrawElementsEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiDrawElementsEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->FogCoordPointerEXT) { + void ** procp = (void **) &disp->FogCoordPointerEXT; snprintf(symboln, sizeof(symboln), "%sFogCoordPointer", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->FogCoordPointerEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->FogCoordPointerEXT) { + void ** procp = (void **) &disp->FogCoordPointerEXT; snprintf(symboln, sizeof(symboln), "%sFogCoordPointerEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->FogCoordPointerEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->FogCoorddEXT) { + void ** procp = (void **) &disp->FogCoorddEXT; snprintf(symboln, sizeof(symboln), "%sFogCoordd", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->FogCoorddEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->FogCoorddEXT) { + void ** procp = (void **) &disp->FogCoorddEXT; snprintf(symboln, sizeof(symboln), "%sFogCoorddEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->FogCoorddEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->FogCoorddvEXT) { + void ** procp = (void **) &disp->FogCoorddvEXT; snprintf(symboln, sizeof(symboln), "%sFogCoorddv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->FogCoorddvEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->FogCoorddvEXT) { + void ** procp = (void **) &disp->FogCoorddvEXT; snprintf(symboln, sizeof(symboln), "%sFogCoorddvEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->FogCoorddvEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->FogCoordfEXT) { + void ** procp = (void **) &disp->FogCoordfEXT; snprintf(symboln, sizeof(symboln), "%sFogCoordf", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->FogCoordfEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->FogCoordfEXT) { + void ** procp = (void **) &disp->FogCoordfEXT; snprintf(symboln, sizeof(symboln), "%sFogCoordfEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->FogCoordfEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->FogCoordfvEXT) { + void ** procp = (void **) &disp->FogCoordfvEXT; snprintf(symboln, sizeof(symboln), "%sFogCoordfv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->FogCoordfvEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->FogCoordfvEXT) { + void ** procp = (void **) &disp->FogCoordfvEXT; snprintf(symboln, sizeof(symboln), "%sFogCoordfvEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->FogCoordfvEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PixelTexGenSGIX) { + void ** procp = (void **) &disp->PixelTexGenSGIX; snprintf(symboln, sizeof(symboln), "%sPixelTexGenSGIX", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PixelTexGenSGIX; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BlendFuncSeparateEXT) { + void ** procp = (void **) &disp->BlendFuncSeparateEXT; snprintf(symboln, sizeof(symboln), "%sBlendFuncSeparate", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BlendFuncSeparateEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BlendFuncSeparateEXT) { + void ** procp = (void **) &disp->BlendFuncSeparateEXT; snprintf(symboln, sizeof(symboln), "%sBlendFuncSeparateEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BlendFuncSeparateEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BlendFuncSeparateEXT) { + void ** procp = (void **) &disp->BlendFuncSeparateEXT; snprintf(symboln, sizeof(symboln), "%sBlendFuncSeparateINGR", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BlendFuncSeparateEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->FlushVertexArrayRangeNV) { + void ** procp = (void **) &disp->FlushVertexArrayRangeNV; snprintf(symboln, sizeof(symboln), "%sFlushVertexArrayRangeNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->FlushVertexArrayRangeNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexArrayRangeNV) { + void ** procp = (void **) &disp->VertexArrayRangeNV; snprintf(symboln, sizeof(symboln), "%sVertexArrayRangeNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexArrayRangeNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CombinerInputNV) { + void ** procp = (void **) &disp->CombinerInputNV; snprintf(symboln, sizeof(symboln), "%sCombinerInputNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CombinerInputNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CombinerOutputNV) { + void ** procp = (void **) &disp->CombinerOutputNV; snprintf(symboln, sizeof(symboln), "%sCombinerOutputNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CombinerOutputNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CombinerParameterfNV) { + void ** procp = (void **) &disp->CombinerParameterfNV; snprintf(symboln, sizeof(symboln), "%sCombinerParameterfNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CombinerParameterfNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CombinerParameterfvNV) { + void ** procp = (void **) &disp->CombinerParameterfvNV; snprintf(symboln, sizeof(symboln), "%sCombinerParameterfvNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CombinerParameterfvNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CombinerParameteriNV) { + void ** procp = (void **) &disp->CombinerParameteriNV; snprintf(symboln, sizeof(symboln), "%sCombinerParameteriNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CombinerParameteriNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CombinerParameterivNV) { + void ** procp = (void **) &disp->CombinerParameterivNV; snprintf(symboln, sizeof(symboln), "%sCombinerParameterivNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CombinerParameterivNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->FinalCombinerInputNV) { + void ** procp = (void **) &disp->FinalCombinerInputNV; snprintf(symboln, sizeof(symboln), "%sFinalCombinerInputNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->FinalCombinerInputNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetCombinerInputParameterfvNV) { + void ** procp = (void **) &disp->GetCombinerInputParameterfvNV; snprintf(symboln, sizeof(symboln), "%sGetCombinerInputParameterfvNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetCombinerInputParameterfvNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetCombinerInputParameterivNV) { + void ** procp = (void **) &disp->GetCombinerInputParameterivNV; snprintf(symboln, sizeof(symboln), "%sGetCombinerInputParameterivNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetCombinerInputParameterivNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetCombinerOutputParameterfvNV) { + void ** procp = (void **) &disp->GetCombinerOutputParameterfvNV; snprintf(symboln, sizeof(symboln), "%sGetCombinerOutputParameterfvNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetCombinerOutputParameterfvNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetCombinerOutputParameterivNV) { + void ** procp = (void **) &disp->GetCombinerOutputParameterivNV; snprintf(symboln, sizeof(symboln), "%sGetCombinerOutputParameterivNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetCombinerOutputParameterivNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetFinalCombinerInputParameterfvNV) { + void ** procp = (void **) &disp->GetFinalCombinerInputParameterfvNV; snprintf(symboln, sizeof(symboln), "%sGetFinalCombinerInputParameterfvNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetFinalCombinerInputParameterfvNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetFinalCombinerInputParameterivNV) { + void ** procp = (void **) &disp->GetFinalCombinerInputParameterivNV; snprintf(symboln, sizeof(symboln), "%sGetFinalCombinerInputParameterivNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetFinalCombinerInputParameterivNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ResizeBuffersMESA) { + void ** procp = (void **) &disp->ResizeBuffersMESA; snprintf(symboln, sizeof(symboln), "%sResizeBuffersMESA", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ResizeBuffersMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos2dMESA) { + void ** procp = (void **) &disp->WindowPos2dMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos2d", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2dMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos2dMESA) { + void ** procp = (void **) &disp->WindowPos2dMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos2dARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2dMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos2dMESA) { + void ** procp = (void **) &disp->WindowPos2dMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos2dMESA", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2dMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos2dvMESA) { + void ** procp = (void **) &disp->WindowPos2dvMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos2dv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2dvMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos2dvMESA) { + void ** procp = (void **) &disp->WindowPos2dvMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos2dvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2dvMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos2dvMESA) { + void ** procp = (void **) &disp->WindowPos2dvMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos2dvMESA", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2dvMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos2fMESA) { + void ** procp = (void **) &disp->WindowPos2fMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos2f", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2fMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos2fMESA) { + void ** procp = (void **) &disp->WindowPos2fMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos2fARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2fMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos2fMESA) { + void ** procp = (void **) &disp->WindowPos2fMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos2fMESA", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2fMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos2fvMESA) { + void ** procp = (void **) &disp->WindowPos2fvMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos2fv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2fvMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos2fvMESA) { + void ** procp = (void **) &disp->WindowPos2fvMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos2fvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2fvMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos2fvMESA) { + void ** procp = (void **) &disp->WindowPos2fvMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos2fvMESA", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2fvMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos2iMESA) { + void ** procp = (void **) &disp->WindowPos2iMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos2i", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2iMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos2iMESA) { + void ** procp = (void **) &disp->WindowPos2iMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos2iARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2iMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos2iMESA) { + void ** procp = (void **) &disp->WindowPos2iMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos2iMESA", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2iMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos2ivMESA) { + void ** procp = (void **) &disp->WindowPos2ivMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos2iv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2ivMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos2ivMESA) { + void ** procp = (void **) &disp->WindowPos2ivMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos2ivARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2ivMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos2ivMESA) { + void ** procp = (void **) &disp->WindowPos2ivMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos2ivMESA", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2ivMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos2sMESA) { + void ** procp = (void **) &disp->WindowPos2sMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos2s", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2sMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos2sMESA) { + void ** procp = (void **) &disp->WindowPos2sMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos2sARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2sMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos2sMESA) { + void ** procp = (void **) &disp->WindowPos2sMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos2sMESA", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2sMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos2svMESA) { + void ** procp = (void **) &disp->WindowPos2svMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos2sv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2svMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos2svMESA) { + void ** procp = (void **) &disp->WindowPos2svMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos2svARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2svMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos2svMESA) { + void ** procp = (void **) &disp->WindowPos2svMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos2svMESA", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos2svMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos3dMESA) { + void ** procp = (void **) &disp->WindowPos3dMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos3d", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3dMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos3dMESA) { + void ** procp = (void **) &disp->WindowPos3dMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos3dARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3dMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos3dMESA) { + void ** procp = (void **) &disp->WindowPos3dMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos3dMESA", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3dMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos3dvMESA) { + void ** procp = (void **) &disp->WindowPos3dvMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos3dv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3dvMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos3dvMESA) { + void ** procp = (void **) &disp->WindowPos3dvMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos3dvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3dvMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos3dvMESA) { + void ** procp = (void **) &disp->WindowPos3dvMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos3dvMESA", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3dvMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos3fMESA) { + void ** procp = (void **) &disp->WindowPos3fMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos3f", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3fMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos3fMESA) { + void ** procp = (void **) &disp->WindowPos3fMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos3fARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3fMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos3fMESA) { + void ** procp = (void **) &disp->WindowPos3fMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos3fMESA", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3fMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos3fvMESA) { + void ** procp = (void **) &disp->WindowPos3fvMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos3fv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3fvMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos3fvMESA) { + void ** procp = (void **) &disp->WindowPos3fvMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos3fvARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3fvMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos3fvMESA) { + void ** procp = (void **) &disp->WindowPos3fvMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos3fvMESA", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3fvMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos3iMESA) { + void ** procp = (void **) &disp->WindowPos3iMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos3i", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3iMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos3iMESA) { + void ** procp = (void **) &disp->WindowPos3iMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos3iARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3iMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos3iMESA) { + void ** procp = (void **) &disp->WindowPos3iMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos3iMESA", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3iMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos3ivMESA) { + void ** procp = (void **) &disp->WindowPos3ivMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos3iv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3ivMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos3ivMESA) { + void ** procp = (void **) &disp->WindowPos3ivMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos3ivARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3ivMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos3ivMESA) { + void ** procp = (void **) &disp->WindowPos3ivMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos3ivMESA", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3ivMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos3sMESA) { + void ** procp = (void **) &disp->WindowPos3sMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos3s", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3sMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos3sMESA) { + void ** procp = (void **) &disp->WindowPos3sMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos3sARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3sMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos3sMESA) { + void ** procp = (void **) &disp->WindowPos3sMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos3sMESA", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3sMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos3svMESA) { + void ** procp = (void **) &disp->WindowPos3svMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos3sv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3svMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos3svMESA) { + void ** procp = (void **) &disp->WindowPos3svMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos3svARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3svMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos3svMESA) { + void ** procp = (void **) &disp->WindowPos3svMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos3svMESA", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos3svMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos4dMESA) { + void ** procp = (void **) &disp->WindowPos4dMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos4dMESA", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos4dMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos4dvMESA) { + void ** procp = (void **) &disp->WindowPos4dvMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos4dvMESA", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos4dvMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos4fMESA) { + void ** procp = (void **) &disp->WindowPos4fMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos4fMESA", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos4fMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos4fvMESA) { + void ** procp = (void **) &disp->WindowPos4fvMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos4fvMESA", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos4fvMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos4iMESA) { + void ** procp = (void **) &disp->WindowPos4iMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos4iMESA", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos4iMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos4ivMESA) { + void ** procp = (void **) &disp->WindowPos4ivMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos4ivMESA", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos4ivMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos4sMESA) { + void ** procp = (void **) &disp->WindowPos4sMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos4sMESA", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos4sMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->WindowPos4svMESA) { + void ** procp = (void **) &disp->WindowPos4svMESA; snprintf(symboln, sizeof(symboln), "%sWindowPos4svMESA", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->WindowPos4svMESA; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiModeDrawArraysIBM) { + void ** procp = (void **) &disp->MultiModeDrawArraysIBM; snprintf(symboln, sizeof(symboln), "%sMultiModeDrawArraysIBM", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiModeDrawArraysIBM; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->MultiModeDrawElementsIBM) { + void ** procp = (void **) &disp->MultiModeDrawElementsIBM; snprintf(symboln, sizeof(symboln), "%sMultiModeDrawElementsIBM", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->MultiModeDrawElementsIBM; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DeleteFencesNV) { + void ** procp = (void **) &disp->DeleteFencesNV; snprintf(symboln, sizeof(symboln), "%sDeleteFencesNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DeleteFencesNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->FinishFenceNV) { + void ** procp = (void **) &disp->FinishFenceNV; snprintf(symboln, sizeof(symboln), "%sFinishFenceNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->FinishFenceNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GenFencesNV) { + void ** procp = (void **) &disp->GenFencesNV; snprintf(symboln, sizeof(symboln), "%sGenFencesNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GenFencesNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetFenceivNV) { + void ** procp = (void **) &disp->GetFenceivNV; snprintf(symboln, sizeof(symboln), "%sGetFenceivNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetFenceivNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->IsFenceNV) { + void ** procp = (void **) &disp->IsFenceNV; snprintf(symboln, sizeof(symboln), "%sIsFenceNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->IsFenceNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SetFenceNV) { + void ** procp = (void **) &disp->SetFenceNV; snprintf(symboln, sizeof(symboln), "%sSetFenceNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SetFenceNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TestFenceNV) { + void ** procp = (void **) &disp->TestFenceNV; snprintf(symboln, sizeof(symboln), "%sTestFenceNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TestFenceNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->AreProgramsResidentNV) { + void ** procp = (void **) &disp->AreProgramsResidentNV; snprintf(symboln, sizeof(symboln), "%sAreProgramsResidentNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->AreProgramsResidentNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BindProgramNV) { + void ** procp = (void **) &disp->BindProgramNV; snprintf(symboln, sizeof(symboln), "%sBindProgramARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BindProgramNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BindProgramNV) { + void ** procp = (void **) &disp->BindProgramNV; snprintf(symboln, sizeof(symboln), "%sBindProgramNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BindProgramNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DeleteProgramsNV) { + void ** procp = (void **) &disp->DeleteProgramsNV; snprintf(symboln, sizeof(symboln), "%sDeleteProgramsARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DeleteProgramsNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DeleteProgramsNV) { + void ** procp = (void **) &disp->DeleteProgramsNV; snprintf(symboln, sizeof(symboln), "%sDeleteProgramsNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DeleteProgramsNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ExecuteProgramNV) { + void ** procp = (void **) &disp->ExecuteProgramNV; snprintf(symboln, sizeof(symboln), "%sExecuteProgramNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ExecuteProgramNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GenProgramsNV) { + void ** procp = (void **) &disp->GenProgramsNV; snprintf(symboln, sizeof(symboln), "%sGenProgramsARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GenProgramsNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GenProgramsNV) { + void ** procp = (void **) &disp->GenProgramsNV; snprintf(symboln, sizeof(symboln), "%sGenProgramsNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GenProgramsNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetProgramParameterdvNV) { + void ** procp = (void **) &disp->GetProgramParameterdvNV; snprintf(symboln, sizeof(symboln), "%sGetProgramParameterdvNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetProgramParameterdvNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetProgramParameterfvNV) { + void ** procp = (void **) &disp->GetProgramParameterfvNV; snprintf(symboln, sizeof(symboln), "%sGetProgramParameterfvNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetProgramParameterfvNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetProgramStringNV) { + void ** procp = (void **) &disp->GetProgramStringNV; snprintf(symboln, sizeof(symboln), "%sGetProgramStringNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetProgramStringNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetProgramivNV) { + void ** procp = (void **) &disp->GetProgramivNV; snprintf(symboln, sizeof(symboln), "%sGetProgramivNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetProgramivNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetTrackMatrixivNV) { + void ** procp = (void **) &disp->GetTrackMatrixivNV; snprintf(symboln, sizeof(symboln), "%sGetTrackMatrixivNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetTrackMatrixivNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetVertexAttribPointervNV) { + void ** procp = (void **) &disp->GetVertexAttribPointervNV; snprintf(symboln, sizeof(symboln), "%sGetVertexAttribPointerv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetVertexAttribPointervNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetVertexAttribPointervNV) { + void ** procp = (void **) &disp->GetVertexAttribPointervNV; snprintf(symboln, sizeof(symboln), "%sGetVertexAttribPointervARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetVertexAttribPointervNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetVertexAttribPointervNV) { + void ** procp = (void **) &disp->GetVertexAttribPointervNV; snprintf(symboln, sizeof(symboln), "%sGetVertexAttribPointervNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetVertexAttribPointervNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetVertexAttribdvNV) { + void ** procp = (void **) &disp->GetVertexAttribdvNV; snprintf(symboln, sizeof(symboln), "%sGetVertexAttribdvNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetVertexAttribdvNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetVertexAttribfvNV) { + void ** procp = (void **) &disp->GetVertexAttribfvNV; snprintf(symboln, sizeof(symboln), "%sGetVertexAttribfvNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetVertexAttribfvNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetVertexAttribivNV) { + void ** procp = (void **) &disp->GetVertexAttribivNV; snprintf(symboln, sizeof(symboln), "%sGetVertexAttribivNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetVertexAttribivNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->IsProgramNV) { + void ** procp = (void **) &disp->IsProgramNV; snprintf(symboln, sizeof(symboln), "%sIsProgramARB", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->IsProgramNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->IsProgramNV) { + void ** procp = (void **) &disp->IsProgramNV; snprintf(symboln, sizeof(symboln), "%sIsProgramNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->IsProgramNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->LoadProgramNV) { + void ** procp = (void **) &disp->LoadProgramNV; snprintf(symboln, sizeof(symboln), "%sLoadProgramNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->LoadProgramNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ProgramParameters4dvNV) { + void ** procp = (void **) &disp->ProgramParameters4dvNV; snprintf(symboln, sizeof(symboln), "%sProgramParameters4dvNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ProgramParameters4dvNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ProgramParameters4fvNV) { + void ** procp = (void **) &disp->ProgramParameters4fvNV; snprintf(symboln, sizeof(symboln), "%sProgramParameters4fvNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ProgramParameters4fvNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->RequestResidentProgramsNV) { + void ** procp = (void **) &disp->RequestResidentProgramsNV; snprintf(symboln, sizeof(symboln), "%sRequestResidentProgramsNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->RequestResidentProgramsNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TrackMatrixNV) { + void ** procp = (void **) &disp->TrackMatrixNV; snprintf(symboln, sizeof(symboln), "%sTrackMatrixNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TrackMatrixNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib1dNV) { + void ** procp = (void **) &disp->VertexAttrib1dNV; snprintf(symboln, sizeof(symboln), "%sVertexAttrib1dNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib1dNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib1dvNV) { + void ** procp = (void **) &disp->VertexAttrib1dvNV; snprintf(symboln, sizeof(symboln), "%sVertexAttrib1dvNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib1dvNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib1fNV) { + void ** procp = (void **) &disp->VertexAttrib1fNV; snprintf(symboln, sizeof(symboln), "%sVertexAttrib1fNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib1fNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib1fvNV) { + void ** procp = (void **) &disp->VertexAttrib1fvNV; snprintf(symboln, sizeof(symboln), "%sVertexAttrib1fvNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib1fvNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib1sNV) { + void ** procp = (void **) &disp->VertexAttrib1sNV; snprintf(symboln, sizeof(symboln), "%sVertexAttrib1sNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib1sNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib1svNV) { + void ** procp = (void **) &disp->VertexAttrib1svNV; snprintf(symboln, sizeof(symboln), "%sVertexAttrib1svNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib1svNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib2dNV) { + void ** procp = (void **) &disp->VertexAttrib2dNV; snprintf(symboln, sizeof(symboln), "%sVertexAttrib2dNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib2dNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib2dvNV) { + void ** procp = (void **) &disp->VertexAttrib2dvNV; snprintf(symboln, sizeof(symboln), "%sVertexAttrib2dvNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib2dvNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib2fNV) { + void ** procp = (void **) &disp->VertexAttrib2fNV; snprintf(symboln, sizeof(symboln), "%sVertexAttrib2fNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib2fNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib2fvNV) { + void ** procp = (void **) &disp->VertexAttrib2fvNV; snprintf(symboln, sizeof(symboln), "%sVertexAttrib2fvNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib2fvNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib2sNV) { + void ** procp = (void **) &disp->VertexAttrib2sNV; snprintf(symboln, sizeof(symboln), "%sVertexAttrib2sNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib2sNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib2svNV) { + void ** procp = (void **) &disp->VertexAttrib2svNV; snprintf(symboln, sizeof(symboln), "%sVertexAttrib2svNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib2svNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib3dNV) { + void ** procp = (void **) &disp->VertexAttrib3dNV; snprintf(symboln, sizeof(symboln), "%sVertexAttrib3dNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib3dNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib3dvNV) { + void ** procp = (void **) &disp->VertexAttrib3dvNV; snprintf(symboln, sizeof(symboln), "%sVertexAttrib3dvNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib3dvNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib3fNV) { + void ** procp = (void **) &disp->VertexAttrib3fNV; snprintf(symboln, sizeof(symboln), "%sVertexAttrib3fNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib3fNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib3fvNV) { + void ** procp = (void **) &disp->VertexAttrib3fvNV; snprintf(symboln, sizeof(symboln), "%sVertexAttrib3fvNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib3fvNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib3sNV) { + void ** procp = (void **) &disp->VertexAttrib3sNV; snprintf(symboln, sizeof(symboln), "%sVertexAttrib3sNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib3sNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib3svNV) { + void ** procp = (void **) &disp->VertexAttrib3svNV; snprintf(symboln, sizeof(symboln), "%sVertexAttrib3svNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib3svNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib4dNV) { + void ** procp = (void **) &disp->VertexAttrib4dNV; snprintf(symboln, sizeof(symboln), "%sVertexAttrib4dNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4dNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib4dvNV) { + void ** procp = (void **) &disp->VertexAttrib4dvNV; snprintf(symboln, sizeof(symboln), "%sVertexAttrib4dvNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4dvNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib4fNV) { + void ** procp = (void **) &disp->VertexAttrib4fNV; snprintf(symboln, sizeof(symboln), "%sVertexAttrib4fNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4fNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib4fvNV) { + void ** procp = (void **) &disp->VertexAttrib4fvNV; snprintf(symboln, sizeof(symboln), "%sVertexAttrib4fvNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4fvNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib4sNV) { + void ** procp = (void **) &disp->VertexAttrib4sNV; snprintf(symboln, sizeof(symboln), "%sVertexAttrib4sNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4sNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib4svNV) { + void ** procp = (void **) &disp->VertexAttrib4svNV; snprintf(symboln, sizeof(symboln), "%sVertexAttrib4svNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4svNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib4ubNV) { + void ** procp = (void **) &disp->VertexAttrib4ubNV; snprintf(symboln, sizeof(symboln), "%sVertexAttrib4ubNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4ubNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttrib4ubvNV) { + void ** procp = (void **) &disp->VertexAttrib4ubvNV; snprintf(symboln, sizeof(symboln), "%sVertexAttrib4ubvNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttrib4ubvNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribPointerNV) { + void ** procp = (void **) &disp->VertexAttribPointerNV; snprintf(symboln, sizeof(symboln), "%sVertexAttribPointerNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribPointerNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribs1dvNV) { + void ** procp = (void **) &disp->VertexAttribs1dvNV; snprintf(symboln, sizeof(symboln), "%sVertexAttribs1dvNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribs1dvNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribs1fvNV) { + void ** procp = (void **) &disp->VertexAttribs1fvNV; snprintf(symboln, sizeof(symboln), "%sVertexAttribs1fvNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribs1fvNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribs1svNV) { + void ** procp = (void **) &disp->VertexAttribs1svNV; snprintf(symboln, sizeof(symboln), "%sVertexAttribs1svNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribs1svNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribs2dvNV) { + void ** procp = (void **) &disp->VertexAttribs2dvNV; snprintf(symboln, sizeof(symboln), "%sVertexAttribs2dvNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribs2dvNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribs2fvNV) { + void ** procp = (void **) &disp->VertexAttribs2fvNV; snprintf(symboln, sizeof(symboln), "%sVertexAttribs2fvNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribs2fvNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribs2svNV) { + void ** procp = (void **) &disp->VertexAttribs2svNV; snprintf(symboln, sizeof(symboln), "%sVertexAttribs2svNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribs2svNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribs3dvNV) { + void ** procp = (void **) &disp->VertexAttribs3dvNV; snprintf(symboln, sizeof(symboln), "%sVertexAttribs3dvNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribs3dvNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribs3fvNV) { + void ** procp = (void **) &disp->VertexAttribs3fvNV; snprintf(symboln, sizeof(symboln), "%sVertexAttribs3fvNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribs3fvNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribs3svNV) { + void ** procp = (void **) &disp->VertexAttribs3svNV; snprintf(symboln, sizeof(symboln), "%sVertexAttribs3svNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribs3svNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribs4dvNV) { + void ** procp = (void **) &disp->VertexAttribs4dvNV; snprintf(symboln, sizeof(symboln), "%sVertexAttribs4dvNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribs4dvNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribs4fvNV) { + void ** procp = (void **) &disp->VertexAttribs4fvNV; snprintf(symboln, sizeof(symboln), "%sVertexAttribs4fvNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribs4fvNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribs4svNV) { + void ** procp = (void **) &disp->VertexAttribs4svNV; snprintf(symboln, sizeof(symboln), "%sVertexAttribs4svNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribs4svNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribs4ubvNV) { + void ** procp = (void **) &disp->VertexAttribs4ubvNV; snprintf(symboln, sizeof(symboln), "%sVertexAttribs4ubvNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribs4ubvNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetTexBumpParameterfvATI) { + void ** procp = (void **) &disp->GetTexBumpParameterfvATI; snprintf(symboln, sizeof(symboln), "%sGetTexBumpParameterfvATI", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetTexBumpParameterfvATI; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetTexBumpParameterivATI) { + void ** procp = (void **) &disp->GetTexBumpParameterivATI; snprintf(symboln, sizeof(symboln), "%sGetTexBumpParameterivATI", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetTexBumpParameterivATI; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexBumpParameterfvATI) { + void ** procp = (void **) &disp->TexBumpParameterfvATI; snprintf(symboln, sizeof(symboln), "%sTexBumpParameterfvATI", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexBumpParameterfvATI; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexBumpParameterivATI) { + void ** procp = (void **) &disp->TexBumpParameterivATI; snprintf(symboln, sizeof(symboln), "%sTexBumpParameterivATI", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexBumpParameterivATI; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->AlphaFragmentOp1ATI) { + void ** procp = (void **) &disp->AlphaFragmentOp1ATI; snprintf(symboln, sizeof(symboln), "%sAlphaFragmentOp1ATI", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->AlphaFragmentOp1ATI; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->AlphaFragmentOp2ATI) { + void ** procp = (void **) &disp->AlphaFragmentOp2ATI; snprintf(symboln, sizeof(symboln), "%sAlphaFragmentOp2ATI", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->AlphaFragmentOp2ATI; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->AlphaFragmentOp3ATI) { + void ** procp = (void **) &disp->AlphaFragmentOp3ATI; snprintf(symboln, sizeof(symboln), "%sAlphaFragmentOp3ATI", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->AlphaFragmentOp3ATI; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BeginFragmentShaderATI) { + void ** procp = (void **) &disp->BeginFragmentShaderATI; snprintf(symboln, sizeof(symboln), "%sBeginFragmentShaderATI", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BeginFragmentShaderATI; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BindFragmentShaderATI) { + void ** procp = (void **) &disp->BindFragmentShaderATI; snprintf(symboln, sizeof(symboln), "%sBindFragmentShaderATI", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BindFragmentShaderATI; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ColorFragmentOp1ATI) { + void ** procp = (void **) &disp->ColorFragmentOp1ATI; snprintf(symboln, sizeof(symboln), "%sColorFragmentOp1ATI", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ColorFragmentOp1ATI; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ColorFragmentOp2ATI) { + void ** procp = (void **) &disp->ColorFragmentOp2ATI; snprintf(symboln, sizeof(symboln), "%sColorFragmentOp2ATI", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ColorFragmentOp2ATI; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ColorFragmentOp3ATI) { + void ** procp = (void **) &disp->ColorFragmentOp3ATI; snprintf(symboln, sizeof(symboln), "%sColorFragmentOp3ATI", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ColorFragmentOp3ATI; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DeleteFragmentShaderATI) { + void ** procp = (void **) &disp->DeleteFragmentShaderATI; snprintf(symboln, sizeof(symboln), "%sDeleteFragmentShaderATI", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DeleteFragmentShaderATI; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->EndFragmentShaderATI) { + void ** procp = (void **) &disp->EndFragmentShaderATI; snprintf(symboln, sizeof(symboln), "%sEndFragmentShaderATI", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->EndFragmentShaderATI; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GenFragmentShadersATI) { + void ** procp = (void **) &disp->GenFragmentShadersATI; snprintf(symboln, sizeof(symboln), "%sGenFragmentShadersATI", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GenFragmentShadersATI; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PassTexCoordATI) { + void ** procp = (void **) &disp->PassTexCoordATI; snprintf(symboln, sizeof(symboln), "%sPassTexCoordATI", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PassTexCoordATI; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SampleMapATI) { + void ** procp = (void **) &disp->SampleMapATI; snprintf(symboln, sizeof(symboln), "%sSampleMapATI", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SampleMapATI; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->SetFragmentShaderConstantATI) { + void ** procp = (void **) &disp->SetFragmentShaderConstantATI; snprintf(symboln, sizeof(symboln), "%sSetFragmentShaderConstantATI", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->SetFragmentShaderConstantATI; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PointParameteriNV) { + void ** procp = (void **) &disp->PointParameteriNV; snprintf(symboln, sizeof(symboln), "%sPointParameteri", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PointParameteriNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PointParameteriNV) { + void ** procp = (void **) &disp->PointParameteriNV; snprintf(symboln, sizeof(symboln), "%sPointParameteriNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PointParameteriNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PointParameterivNV) { + void ** procp = (void **) &disp->PointParameterivNV; snprintf(symboln, sizeof(symboln), "%sPointParameteriv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PointParameterivNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PointParameterivNV) { + void ** procp = (void **) &disp->PointParameterivNV; snprintf(symboln, sizeof(symboln), "%sPointParameterivNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PointParameterivNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ActiveStencilFaceEXT) { + void ** procp = (void **) &disp->ActiveStencilFaceEXT; snprintf(symboln, sizeof(symboln), "%sActiveStencilFaceEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ActiveStencilFaceEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BindVertexArrayAPPLE) { + void ** procp = (void **) &disp->BindVertexArrayAPPLE; snprintf(symboln, sizeof(symboln), "%sBindVertexArrayAPPLE", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BindVertexArrayAPPLE; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DeleteVertexArraysAPPLE) { + void ** procp = (void **) &disp->DeleteVertexArraysAPPLE; snprintf(symboln, sizeof(symboln), "%sDeleteVertexArrays", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DeleteVertexArraysAPPLE; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DeleteVertexArraysAPPLE) { + void ** procp = (void **) &disp->DeleteVertexArraysAPPLE; snprintf(symboln, sizeof(symboln), "%sDeleteVertexArraysAPPLE", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DeleteVertexArraysAPPLE; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GenVertexArraysAPPLE) { + void ** procp = (void **) &disp->GenVertexArraysAPPLE; snprintf(symboln, sizeof(symboln), "%sGenVertexArraysAPPLE", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GenVertexArraysAPPLE; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->IsVertexArrayAPPLE) { + void ** procp = (void **) &disp->IsVertexArrayAPPLE; snprintf(symboln, sizeof(symboln), "%sIsVertexArray", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->IsVertexArrayAPPLE; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->IsVertexArrayAPPLE) { + void ** procp = (void **) &disp->IsVertexArrayAPPLE; snprintf(symboln, sizeof(symboln), "%sIsVertexArrayAPPLE", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->IsVertexArrayAPPLE; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetProgramNamedParameterdvNV) { + void ** procp = (void **) &disp->GetProgramNamedParameterdvNV; snprintf(symboln, sizeof(symboln), "%sGetProgramNamedParameterdvNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetProgramNamedParameterdvNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetProgramNamedParameterfvNV) { + void ** procp = (void **) &disp->GetProgramNamedParameterfvNV; snprintf(symboln, sizeof(symboln), "%sGetProgramNamedParameterfvNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetProgramNamedParameterfvNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ProgramNamedParameter4dNV) { + void ** procp = (void **) &disp->ProgramNamedParameter4dNV; snprintf(symboln, sizeof(symboln), "%sProgramNamedParameter4dNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ProgramNamedParameter4dNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ProgramNamedParameter4dvNV) { + void ** procp = (void **) &disp->ProgramNamedParameter4dvNV; snprintf(symboln, sizeof(symboln), "%sProgramNamedParameter4dvNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ProgramNamedParameter4dvNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ProgramNamedParameter4fNV) { + void ** procp = (void **) &disp->ProgramNamedParameter4fNV; snprintf(symboln, sizeof(symboln), "%sProgramNamedParameter4fNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ProgramNamedParameter4fNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ProgramNamedParameter4fvNV) { + void ** procp = (void **) &disp->ProgramNamedParameter4fvNV; snprintf(symboln, sizeof(symboln), "%sProgramNamedParameter4fvNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ProgramNamedParameter4fvNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PrimitiveRestartIndexNV) { + void ** procp = (void **) &disp->PrimitiveRestartIndexNV; snprintf(symboln, sizeof(symboln), "%sPrimitiveRestartIndexNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PrimitiveRestartIndexNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PrimitiveRestartIndexNV) { + void ** procp = (void **) &disp->PrimitiveRestartIndexNV; snprintf(symboln, sizeof(symboln), "%sPrimitiveRestartIndex", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PrimitiveRestartIndexNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->PrimitiveRestartNV) { + void ** procp = (void **) &disp->PrimitiveRestartNV; snprintf(symboln, sizeof(symboln), "%sPrimitiveRestartNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->PrimitiveRestartNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DepthBoundsEXT) { + void ** procp = (void **) &disp->DepthBoundsEXT; snprintf(symboln, sizeof(symboln), "%sDepthBoundsEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DepthBoundsEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BlendEquationSeparateEXT) { + void ** procp = (void **) &disp->BlendEquationSeparateEXT; snprintf(symboln, sizeof(symboln), "%sBlendEquationSeparate", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BlendEquationSeparateEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BlendEquationSeparateEXT) { + void ** procp = (void **) &disp->BlendEquationSeparateEXT; snprintf(symboln, sizeof(symboln), "%sBlendEquationSeparateEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BlendEquationSeparateEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BlendEquationSeparateEXT) { + void ** procp = (void **) &disp->BlendEquationSeparateEXT; snprintf(symboln, sizeof(symboln), "%sBlendEquationSeparateATI", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BlendEquationSeparateEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BindFramebufferEXT) { + void ** procp = (void **) &disp->BindFramebufferEXT; snprintf(symboln, sizeof(symboln), "%sBindFramebuffer", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BindFramebufferEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BindFramebufferEXT) { + void ** procp = (void **) &disp->BindFramebufferEXT; snprintf(symboln, sizeof(symboln), "%sBindFramebufferEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BindFramebufferEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BindRenderbufferEXT) { + void ** procp = (void **) &disp->BindRenderbufferEXT; snprintf(symboln, sizeof(symboln), "%sBindRenderbuffer", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BindRenderbufferEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BindRenderbufferEXT) { + void ** procp = (void **) &disp->BindRenderbufferEXT; snprintf(symboln, sizeof(symboln), "%sBindRenderbufferEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BindRenderbufferEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CheckFramebufferStatusEXT) { + void ** procp = (void **) &disp->CheckFramebufferStatusEXT; snprintf(symboln, sizeof(symboln), "%sCheckFramebufferStatus", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CheckFramebufferStatusEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CheckFramebufferStatusEXT) { + void ** procp = (void **) &disp->CheckFramebufferStatusEXT; snprintf(symboln, sizeof(symboln), "%sCheckFramebufferStatusEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CheckFramebufferStatusEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DeleteFramebuffersEXT) { + void ** procp = (void **) &disp->DeleteFramebuffersEXT; snprintf(symboln, sizeof(symboln), "%sDeleteFramebuffers", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DeleteFramebuffersEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DeleteFramebuffersEXT) { + void ** procp = (void **) &disp->DeleteFramebuffersEXT; snprintf(symboln, sizeof(symboln), "%sDeleteFramebuffersEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DeleteFramebuffersEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DeleteRenderbuffersEXT) { + void ** procp = (void **) &disp->DeleteRenderbuffersEXT; snprintf(symboln, sizeof(symboln), "%sDeleteRenderbuffers", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DeleteRenderbuffersEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DeleteRenderbuffersEXT) { + void ** procp = (void **) &disp->DeleteRenderbuffersEXT; snprintf(symboln, sizeof(symboln), "%sDeleteRenderbuffersEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DeleteRenderbuffersEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->FramebufferRenderbufferEXT) { + void ** procp = (void **) &disp->FramebufferRenderbufferEXT; snprintf(symboln, sizeof(symboln), "%sFramebufferRenderbuffer", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->FramebufferRenderbufferEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->FramebufferRenderbufferEXT) { + void ** procp = (void **) &disp->FramebufferRenderbufferEXT; snprintf(symboln, sizeof(symboln), "%sFramebufferRenderbufferEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->FramebufferRenderbufferEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->FramebufferTexture1DEXT) { + void ** procp = (void **) &disp->FramebufferTexture1DEXT; snprintf(symboln, sizeof(symboln), "%sFramebufferTexture1D", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->FramebufferTexture1DEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->FramebufferTexture1DEXT) { + void ** procp = (void **) &disp->FramebufferTexture1DEXT; snprintf(symboln, sizeof(symboln), "%sFramebufferTexture1DEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->FramebufferTexture1DEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->FramebufferTexture2DEXT) { + void ** procp = (void **) &disp->FramebufferTexture2DEXT; snprintf(symboln, sizeof(symboln), "%sFramebufferTexture2D", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->FramebufferTexture2DEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->FramebufferTexture2DEXT) { + void ** procp = (void **) &disp->FramebufferTexture2DEXT; snprintf(symboln, sizeof(symboln), "%sFramebufferTexture2DEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->FramebufferTexture2DEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->FramebufferTexture3DEXT) { + void ** procp = (void **) &disp->FramebufferTexture3DEXT; snprintf(symboln, sizeof(symboln), "%sFramebufferTexture3D", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->FramebufferTexture3DEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->FramebufferTexture3DEXT) { + void ** procp = (void **) &disp->FramebufferTexture3DEXT; snprintf(symboln, sizeof(symboln), "%sFramebufferTexture3DEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->FramebufferTexture3DEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GenFramebuffersEXT) { + void ** procp = (void **) &disp->GenFramebuffersEXT; snprintf(symboln, sizeof(symboln), "%sGenFramebuffers", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GenFramebuffersEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GenFramebuffersEXT) { + void ** procp = (void **) &disp->GenFramebuffersEXT; snprintf(symboln, sizeof(symboln), "%sGenFramebuffersEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GenFramebuffersEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GenRenderbuffersEXT) { + void ** procp = (void **) &disp->GenRenderbuffersEXT; snprintf(symboln, sizeof(symboln), "%sGenRenderbuffers", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GenRenderbuffersEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GenRenderbuffersEXT) { + void ** procp = (void **) &disp->GenRenderbuffersEXT; snprintf(symboln, sizeof(symboln), "%sGenRenderbuffersEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GenRenderbuffersEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GenerateMipmapEXT) { + void ** procp = (void **) &disp->GenerateMipmapEXT; snprintf(symboln, sizeof(symboln), "%sGenerateMipmap", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GenerateMipmapEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GenerateMipmapEXT) { + void ** procp = (void **) &disp->GenerateMipmapEXT; snprintf(symboln, sizeof(symboln), "%sGenerateMipmapEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GenerateMipmapEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetFramebufferAttachmentParameterivEXT) { + void ** procp = (void **) &disp->GetFramebufferAttachmentParameterivEXT; snprintf(symboln, sizeof(symboln), "%sGetFramebufferAttachmentParameteriv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetFramebufferAttachmentParameterivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetFramebufferAttachmentParameterivEXT) { + void ** procp = (void **) &disp->GetFramebufferAttachmentParameterivEXT; snprintf(symboln, sizeof(symboln), "%sGetFramebufferAttachmentParameterivEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetFramebufferAttachmentParameterivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetRenderbufferParameterivEXT) { + void ** procp = (void **) &disp->GetRenderbufferParameterivEXT; snprintf(symboln, sizeof(symboln), "%sGetRenderbufferParameteriv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetRenderbufferParameterivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetRenderbufferParameterivEXT) { + void ** procp = (void **) &disp->GetRenderbufferParameterivEXT; snprintf(symboln, sizeof(symboln), "%sGetRenderbufferParameterivEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetRenderbufferParameterivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->IsFramebufferEXT) { + void ** procp = (void **) &disp->IsFramebufferEXT; snprintf(symboln, sizeof(symboln), "%sIsFramebuffer", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->IsFramebufferEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->IsFramebufferEXT) { + void ** procp = (void **) &disp->IsFramebufferEXT; snprintf(symboln, sizeof(symboln), "%sIsFramebufferEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->IsFramebufferEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->IsRenderbufferEXT) { + void ** procp = (void **) &disp->IsRenderbufferEXT; snprintf(symboln, sizeof(symboln), "%sIsRenderbuffer", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->IsRenderbufferEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->IsRenderbufferEXT) { + void ** procp = (void **) &disp->IsRenderbufferEXT; snprintf(symboln, sizeof(symboln), "%sIsRenderbufferEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->IsRenderbufferEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->RenderbufferStorageEXT) { + void ** procp = (void **) &disp->RenderbufferStorageEXT; snprintf(symboln, sizeof(symboln), "%sRenderbufferStorage", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->RenderbufferStorageEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->RenderbufferStorageEXT) { + void ** procp = (void **) &disp->RenderbufferStorageEXT; snprintf(symboln, sizeof(symboln), "%sRenderbufferStorageEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->RenderbufferStorageEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BlitFramebufferEXT) { + void ** procp = (void **) &disp->BlitFramebufferEXT; snprintf(symboln, sizeof(symboln), "%sBlitFramebuffer", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BlitFramebufferEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BlitFramebufferEXT) { + void ** procp = (void **) &disp->BlitFramebufferEXT; snprintf(symboln, sizeof(symboln), "%sBlitFramebufferEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BlitFramebufferEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BufferParameteriAPPLE) { + void ** procp = (void **) &disp->BufferParameteriAPPLE; snprintf(symboln, sizeof(symboln), "%sBufferParameteriAPPLE", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BufferParameteriAPPLE; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->FlushMappedBufferRangeAPPLE) { + void ** procp = (void **) &disp->FlushMappedBufferRangeAPPLE; snprintf(symboln, sizeof(symboln), "%sFlushMappedBufferRangeAPPLE", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->FlushMappedBufferRangeAPPLE; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BindFragDataLocationEXT) { + void ** procp = (void **) &disp->BindFragDataLocationEXT; snprintf(symboln, sizeof(symboln), "%sBindFragDataLocationEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BindFragDataLocationEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BindFragDataLocationEXT) { + void ** procp = (void **) &disp->BindFragDataLocationEXT; snprintf(symboln, sizeof(symboln), "%sBindFragDataLocation", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BindFragDataLocationEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetFragDataLocationEXT) { + void ** procp = (void **) &disp->GetFragDataLocationEXT; snprintf(symboln, sizeof(symboln), "%sGetFragDataLocationEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetFragDataLocationEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetFragDataLocationEXT) { + void ** procp = (void **) &disp->GetFragDataLocationEXT; snprintf(symboln, sizeof(symboln), "%sGetFragDataLocation", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetFragDataLocationEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetUniformuivEXT) { + void ** procp = (void **) &disp->GetUniformuivEXT; snprintf(symboln, sizeof(symboln), "%sGetUniformuivEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetUniformuivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetUniformuivEXT) { + void ** procp = (void **) &disp->GetUniformuivEXT; snprintf(symboln, sizeof(symboln), "%sGetUniformuiv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetUniformuivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetVertexAttribIivEXT) { + void ** procp = (void **) &disp->GetVertexAttribIivEXT; snprintf(symboln, sizeof(symboln), "%sGetVertexAttribIivEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetVertexAttribIivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetVertexAttribIivEXT) { + void ** procp = (void **) &disp->GetVertexAttribIivEXT; snprintf(symboln, sizeof(symboln), "%sGetVertexAttribIiv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetVertexAttribIivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetVertexAttribIuivEXT) { + void ** procp = (void **) &disp->GetVertexAttribIuivEXT; snprintf(symboln, sizeof(symboln), "%sGetVertexAttribIuivEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetVertexAttribIuivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetVertexAttribIuivEXT) { + void ** procp = (void **) &disp->GetVertexAttribIuivEXT; snprintf(symboln, sizeof(symboln), "%sGetVertexAttribIuiv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetVertexAttribIuivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform1uiEXT) { + void ** procp = (void **) &disp->Uniform1uiEXT; snprintf(symboln, sizeof(symboln), "%sUniform1uiEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform1uiEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform1uiEXT) { + void ** procp = (void **) &disp->Uniform1uiEXT; snprintf(symboln, sizeof(symboln), "%sUniform1ui", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform1uiEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform1uivEXT) { + void ** procp = (void **) &disp->Uniform1uivEXT; snprintf(symboln, sizeof(symboln), "%sUniform1uivEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform1uivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform1uivEXT) { + void ** procp = (void **) &disp->Uniform1uivEXT; snprintf(symboln, sizeof(symboln), "%sUniform1uiv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform1uivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform2uiEXT) { + void ** procp = (void **) &disp->Uniform2uiEXT; snprintf(symboln, sizeof(symboln), "%sUniform2uiEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform2uiEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform2uiEXT) { + void ** procp = (void **) &disp->Uniform2uiEXT; snprintf(symboln, sizeof(symboln), "%sUniform2ui", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform2uiEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform2uivEXT) { + void ** procp = (void **) &disp->Uniform2uivEXT; snprintf(symboln, sizeof(symboln), "%sUniform2uivEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform2uivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform2uivEXT) { + void ** procp = (void **) &disp->Uniform2uivEXT; snprintf(symboln, sizeof(symboln), "%sUniform2uiv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform2uivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform3uiEXT) { + void ** procp = (void **) &disp->Uniform3uiEXT; snprintf(symboln, sizeof(symboln), "%sUniform3uiEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform3uiEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform3uiEXT) { + void ** procp = (void **) &disp->Uniform3uiEXT; snprintf(symboln, sizeof(symboln), "%sUniform3ui", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform3uiEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform3uivEXT) { + void ** procp = (void **) &disp->Uniform3uivEXT; snprintf(symboln, sizeof(symboln), "%sUniform3uivEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform3uivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform3uivEXT) { + void ** procp = (void **) &disp->Uniform3uivEXT; snprintf(symboln, sizeof(symboln), "%sUniform3uiv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform3uivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform4uiEXT) { + void ** procp = (void **) &disp->Uniform4uiEXT; snprintf(symboln, sizeof(symboln), "%sUniform4uiEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform4uiEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform4uiEXT) { + void ** procp = (void **) &disp->Uniform4uiEXT; snprintf(symboln, sizeof(symboln), "%sUniform4ui", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform4uiEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform4uivEXT) { + void ** procp = (void **) &disp->Uniform4uivEXT; snprintf(symboln, sizeof(symboln), "%sUniform4uivEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform4uivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->Uniform4uivEXT) { + void ** procp = (void **) &disp->Uniform4uivEXT; snprintf(symboln, sizeof(symboln), "%sUniform4uiv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->Uniform4uivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribI1iEXT) { + void ** procp = (void **) &disp->VertexAttribI1iEXT; snprintf(symboln, sizeof(symboln), "%sVertexAttribI1iEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI1iEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribI1iEXT) { + void ** procp = (void **) &disp->VertexAttribI1iEXT; snprintf(symboln, sizeof(symboln), "%sVertexAttribI1i", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI1iEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribI1ivEXT) { + void ** procp = (void **) &disp->VertexAttribI1ivEXT; snprintf(symboln, sizeof(symboln), "%sVertexAttribI1ivEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI1ivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribI1ivEXT) { + void ** procp = (void **) &disp->VertexAttribI1ivEXT; snprintf(symboln, sizeof(symboln), "%sVertexAttribI1iv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI1ivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribI1uiEXT) { + void ** procp = (void **) &disp->VertexAttribI1uiEXT; snprintf(symboln, sizeof(symboln), "%sVertexAttribI1uiEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI1uiEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribI1uiEXT) { + void ** procp = (void **) &disp->VertexAttribI1uiEXT; snprintf(symboln, sizeof(symboln), "%sVertexAttribI1ui", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI1uiEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribI1uivEXT) { + void ** procp = (void **) &disp->VertexAttribI1uivEXT; snprintf(symboln, sizeof(symboln), "%sVertexAttribI1uivEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI1uivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribI1uivEXT) { + void ** procp = (void **) &disp->VertexAttribI1uivEXT; snprintf(symboln, sizeof(symboln), "%sVertexAttribI1uiv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI1uivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribI2iEXT) { + void ** procp = (void **) &disp->VertexAttribI2iEXT; snprintf(symboln, sizeof(symboln), "%sVertexAttribI2iEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI2iEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribI2iEXT) { + void ** procp = (void **) &disp->VertexAttribI2iEXT; snprintf(symboln, sizeof(symboln), "%sVertexAttribI2i", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI2iEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribI2ivEXT) { + void ** procp = (void **) &disp->VertexAttribI2ivEXT; snprintf(symboln, sizeof(symboln), "%sVertexAttribI2ivEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI2ivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribI2ivEXT) { + void ** procp = (void **) &disp->VertexAttribI2ivEXT; snprintf(symboln, sizeof(symboln), "%sVertexAttribI2iv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI2ivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribI2uiEXT) { + void ** procp = (void **) &disp->VertexAttribI2uiEXT; snprintf(symboln, sizeof(symboln), "%sVertexAttribI2uiEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI2uiEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribI2uiEXT) { + void ** procp = (void **) &disp->VertexAttribI2uiEXT; snprintf(symboln, sizeof(symboln), "%sVertexAttribI2ui", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI2uiEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribI2uivEXT) { + void ** procp = (void **) &disp->VertexAttribI2uivEXT; snprintf(symboln, sizeof(symboln), "%sVertexAttribI2uivEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI2uivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribI2uivEXT) { + void ** procp = (void **) &disp->VertexAttribI2uivEXT; snprintf(symboln, sizeof(symboln), "%sVertexAttribI2uiv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI2uivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribI3iEXT) { + void ** procp = (void **) &disp->VertexAttribI3iEXT; snprintf(symboln, sizeof(symboln), "%sVertexAttribI3iEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI3iEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribI3iEXT) { + void ** procp = (void **) &disp->VertexAttribI3iEXT; snprintf(symboln, sizeof(symboln), "%sVertexAttribI3i", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI3iEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribI3ivEXT) { + void ** procp = (void **) &disp->VertexAttribI3ivEXT; snprintf(symboln, sizeof(symboln), "%sVertexAttribI3ivEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI3ivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribI3ivEXT) { + void ** procp = (void **) &disp->VertexAttribI3ivEXT; snprintf(symboln, sizeof(symboln), "%sVertexAttribI3iv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI3ivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribI3uiEXT) { + void ** procp = (void **) &disp->VertexAttribI3uiEXT; snprintf(symboln, sizeof(symboln), "%sVertexAttribI3uiEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI3uiEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribI3uiEXT) { + void ** procp = (void **) &disp->VertexAttribI3uiEXT; snprintf(symboln, sizeof(symboln), "%sVertexAttribI3ui", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI3uiEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribI3uivEXT) { + void ** procp = (void **) &disp->VertexAttribI3uivEXT; snprintf(symboln, sizeof(symboln), "%sVertexAttribI3uivEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI3uivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribI3uivEXT) { + void ** procp = (void **) &disp->VertexAttribI3uivEXT; snprintf(symboln, sizeof(symboln), "%sVertexAttribI3uiv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI3uivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribI4bvEXT) { + void ** procp = (void **) &disp->VertexAttribI4bvEXT; snprintf(symboln, sizeof(symboln), "%sVertexAttribI4bvEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI4bvEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribI4bvEXT) { + void ** procp = (void **) &disp->VertexAttribI4bvEXT; snprintf(symboln, sizeof(symboln), "%sVertexAttribI4bv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI4bvEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribI4iEXT) { + void ** procp = (void **) &disp->VertexAttribI4iEXT; snprintf(symboln, sizeof(symboln), "%sVertexAttribI4iEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI4iEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribI4iEXT) { + void ** procp = (void **) &disp->VertexAttribI4iEXT; snprintf(symboln, sizeof(symboln), "%sVertexAttribI4i", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI4iEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribI4ivEXT) { + void ** procp = (void **) &disp->VertexAttribI4ivEXT; snprintf(symboln, sizeof(symboln), "%sVertexAttribI4ivEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI4ivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribI4ivEXT) { + void ** procp = (void **) &disp->VertexAttribI4ivEXT; snprintf(symboln, sizeof(symboln), "%sVertexAttribI4iv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI4ivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribI4svEXT) { + void ** procp = (void **) &disp->VertexAttribI4svEXT; snprintf(symboln, sizeof(symboln), "%sVertexAttribI4svEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI4svEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribI4svEXT) { + void ** procp = (void **) &disp->VertexAttribI4svEXT; snprintf(symboln, sizeof(symboln), "%sVertexAttribI4sv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI4svEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribI4ubvEXT) { + void ** procp = (void **) &disp->VertexAttribI4ubvEXT; snprintf(symboln, sizeof(symboln), "%sVertexAttribI4ubvEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI4ubvEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribI4ubvEXT) { + void ** procp = (void **) &disp->VertexAttribI4ubvEXT; snprintf(symboln, sizeof(symboln), "%sVertexAttribI4ubv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI4ubvEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribI4uiEXT) { + void ** procp = (void **) &disp->VertexAttribI4uiEXT; snprintf(symboln, sizeof(symboln), "%sVertexAttribI4uiEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI4uiEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribI4uiEXT) { + void ** procp = (void **) &disp->VertexAttribI4uiEXT; snprintf(symboln, sizeof(symboln), "%sVertexAttribI4ui", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI4uiEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribI4uivEXT) { + void ** procp = (void **) &disp->VertexAttribI4uivEXT; snprintf(symboln, sizeof(symboln), "%sVertexAttribI4uivEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI4uivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribI4uivEXT) { + void ** procp = (void **) &disp->VertexAttribI4uivEXT; snprintf(symboln, sizeof(symboln), "%sVertexAttribI4uiv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI4uivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribI4usvEXT) { + void ** procp = (void **) &disp->VertexAttribI4usvEXT; snprintf(symboln, sizeof(symboln), "%sVertexAttribI4usvEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI4usvEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribI4usvEXT) { + void ** procp = (void **) &disp->VertexAttribI4usvEXT; snprintf(symboln, sizeof(symboln), "%sVertexAttribI4usv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribI4usvEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribIPointerEXT) { + void ** procp = (void **) &disp->VertexAttribIPointerEXT; snprintf(symboln, sizeof(symboln), "%sVertexAttribIPointerEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribIPointerEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->VertexAttribIPointerEXT) { + void ** procp = (void **) &disp->VertexAttribIPointerEXT; snprintf(symboln, sizeof(symboln), "%sVertexAttribIPointer", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->VertexAttribIPointerEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->FramebufferTextureLayerEXT) { + void ** procp = (void **) &disp->FramebufferTextureLayerEXT; snprintf(symboln, sizeof(symboln), "%sFramebufferTextureLayer", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->FramebufferTextureLayerEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->FramebufferTextureLayerEXT) { + void ** procp = (void **) &disp->FramebufferTextureLayerEXT; snprintf(symboln, sizeof(symboln), "%sFramebufferTextureLayerEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->FramebufferTextureLayerEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ColorMaskIndexedEXT) { + void ** procp = (void **) &disp->ColorMaskIndexedEXT; snprintf(symboln, sizeof(symboln), "%sColorMaskIndexedEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ColorMaskIndexedEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ColorMaskIndexedEXT) { + void ** procp = (void **) &disp->ColorMaskIndexedEXT; snprintf(symboln, sizeof(symboln), "%sColorMaski", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ColorMaskIndexedEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DisableIndexedEXT) { + void ** procp = (void **) &disp->DisableIndexedEXT; snprintf(symboln, sizeof(symboln), "%sDisableIndexedEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DisableIndexedEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->DisableIndexedEXT) { + void ** procp = (void **) &disp->DisableIndexedEXT; snprintf(symboln, sizeof(symboln), "%sDisablei", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->DisableIndexedEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->EnableIndexedEXT) { + void ** procp = (void **) &disp->EnableIndexedEXT; snprintf(symboln, sizeof(symboln), "%sEnableIndexedEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->EnableIndexedEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->EnableIndexedEXT) { + void ** procp = (void **) &disp->EnableIndexedEXT; snprintf(symboln, sizeof(symboln), "%sEnablei", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->EnableIndexedEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetBooleanIndexedvEXT) { + void ** procp = (void **) &disp->GetBooleanIndexedvEXT; snprintf(symboln, sizeof(symboln), "%sGetBooleanIndexedvEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetBooleanIndexedvEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetBooleanIndexedvEXT) { + void ** procp = (void **) &disp->GetBooleanIndexedvEXT; snprintf(symboln, sizeof(symboln), "%sGetBooleani_v", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetBooleanIndexedvEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetIntegerIndexedvEXT) { + void ** procp = (void **) &disp->GetIntegerIndexedvEXT; snprintf(symboln, sizeof(symboln), "%sGetIntegerIndexedvEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetIntegerIndexedvEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetIntegerIndexedvEXT) { + void ** procp = (void **) &disp->GetIntegerIndexedvEXT; snprintf(symboln, sizeof(symboln), "%sGetIntegeri_v", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetIntegerIndexedvEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->IsEnabledIndexedEXT) { + void ** procp = (void **) &disp->IsEnabledIndexedEXT; snprintf(symboln, sizeof(symboln), "%sIsEnabledIndexedEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->IsEnabledIndexedEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->IsEnabledIndexedEXT) { + void ** procp = (void **) &disp->IsEnabledIndexedEXT; snprintf(symboln, sizeof(symboln), "%sIsEnabledi", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->IsEnabledIndexedEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ClearColorIiEXT) { + void ** procp = (void **) &disp->ClearColorIiEXT; snprintf(symboln, sizeof(symboln), "%sClearColorIiEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ClearColorIiEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ClearColorIuiEXT) { + void ** procp = (void **) &disp->ClearColorIuiEXT; snprintf(symboln, sizeof(symboln), "%sClearColorIuiEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ClearColorIuiEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetTexParameterIivEXT) { + void ** procp = (void **) &disp->GetTexParameterIivEXT; snprintf(symboln, sizeof(symboln), "%sGetTexParameterIivEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetTexParameterIivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetTexParameterIivEXT) { + void ** procp = (void **) &disp->GetTexParameterIivEXT; snprintf(symboln, sizeof(symboln), "%sGetTexParameterIiv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetTexParameterIivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetTexParameterIuivEXT) { + void ** procp = (void **) &disp->GetTexParameterIuivEXT; snprintf(symboln, sizeof(symboln), "%sGetTexParameterIuivEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetTexParameterIuivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetTexParameterIuivEXT) { + void ** procp = (void **) &disp->GetTexParameterIuivEXT; snprintf(symboln, sizeof(symboln), "%sGetTexParameterIuiv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetTexParameterIuivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexParameterIivEXT) { + void ** procp = (void **) &disp->TexParameterIivEXT; snprintf(symboln, sizeof(symboln), "%sTexParameterIivEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexParameterIivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexParameterIivEXT) { + void ** procp = (void **) &disp->TexParameterIivEXT; snprintf(symboln, sizeof(symboln), "%sTexParameterIiv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexParameterIivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexParameterIuivEXT) { + void ** procp = (void **) &disp->TexParameterIuivEXT; snprintf(symboln, sizeof(symboln), "%sTexParameterIuivEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexParameterIuivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TexParameterIuivEXT) { + void ** procp = (void **) &disp->TexParameterIuivEXT; snprintf(symboln, sizeof(symboln), "%sTexParameterIuiv", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TexParameterIuivEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BeginConditionalRenderNV) { + void ** procp = (void **) &disp->BeginConditionalRenderNV; snprintf(symboln, sizeof(symboln), "%sBeginConditionalRenderNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BeginConditionalRenderNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BeginConditionalRenderNV) { + void ** procp = (void **) &disp->BeginConditionalRenderNV; snprintf(symboln, sizeof(symboln), "%sBeginConditionalRender", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BeginConditionalRenderNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->EndConditionalRenderNV) { + void ** procp = (void **) &disp->EndConditionalRenderNV; snprintf(symboln, sizeof(symboln), "%sEndConditionalRenderNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->EndConditionalRenderNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->EndConditionalRenderNV) { + void ** procp = (void **) &disp->EndConditionalRenderNV; snprintf(symboln, sizeof(symboln), "%sEndConditionalRender", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->EndConditionalRenderNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BeginTransformFeedbackEXT) { + void ** procp = (void **) &disp->BeginTransformFeedbackEXT; snprintf(symboln, sizeof(symboln), "%sBeginTransformFeedbackEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BeginTransformFeedbackEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BeginTransformFeedbackEXT) { + void ** procp = (void **) &disp->BeginTransformFeedbackEXT; snprintf(symboln, sizeof(symboln), "%sBeginTransformFeedback", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BeginTransformFeedbackEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BindBufferBaseEXT) { + void ** procp = (void **) &disp->BindBufferBaseEXT; snprintf(symboln, sizeof(symboln), "%sBindBufferBaseEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BindBufferBaseEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BindBufferBaseEXT) { + void ** procp = (void **) &disp->BindBufferBaseEXT; snprintf(symboln, sizeof(symboln), "%sBindBufferBase", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BindBufferBaseEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BindBufferOffsetEXT) { + void ** procp = (void **) &disp->BindBufferOffsetEXT; snprintf(symboln, sizeof(symboln), "%sBindBufferOffsetEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BindBufferOffsetEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BindBufferRangeEXT) { + void ** procp = (void **) &disp->BindBufferRangeEXT; snprintf(symboln, sizeof(symboln), "%sBindBufferRangeEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BindBufferRangeEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->BindBufferRangeEXT) { + void ** procp = (void **) &disp->BindBufferRangeEXT; snprintf(symboln, sizeof(symboln), "%sBindBufferRange", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->BindBufferRangeEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->EndTransformFeedbackEXT) { + void ** procp = (void **) &disp->EndTransformFeedbackEXT; snprintf(symboln, sizeof(symboln), "%sEndTransformFeedbackEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->EndTransformFeedbackEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->EndTransformFeedbackEXT) { + void ** procp = (void **) &disp->EndTransformFeedbackEXT; snprintf(symboln, sizeof(symboln), "%sEndTransformFeedback", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->EndTransformFeedbackEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetTransformFeedbackVaryingEXT) { + void ** procp = (void **) &disp->GetTransformFeedbackVaryingEXT; snprintf(symboln, sizeof(symboln), "%sGetTransformFeedbackVaryingEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetTransformFeedbackVaryingEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetTransformFeedbackVaryingEXT) { + void ** procp = (void **) &disp->GetTransformFeedbackVaryingEXT; snprintf(symboln, sizeof(symboln), "%sGetTransformFeedbackVarying", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetTransformFeedbackVaryingEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TransformFeedbackVaryingsEXT) { + void ** procp = (void **) &disp->TransformFeedbackVaryingsEXT; snprintf(symboln, sizeof(symboln), "%sTransformFeedbackVaryingsEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TransformFeedbackVaryingsEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TransformFeedbackVaryingsEXT) { + void ** procp = (void **) &disp->TransformFeedbackVaryingsEXT; snprintf(symboln, sizeof(symboln), "%sTransformFeedbackVaryings", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TransformFeedbackVaryingsEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ProvokingVertexEXT) { + void ** procp = (void **) &disp->ProvokingVertexEXT; snprintf(symboln, sizeof(symboln), "%sProvokingVertexEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ProvokingVertexEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ProvokingVertexEXT) { + void ** procp = (void **) &disp->ProvokingVertexEXT; snprintf(symboln, sizeof(symboln), "%sProvokingVertex", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ProvokingVertexEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetTexParameterPointervAPPLE) { + void ** procp = (void **) &disp->GetTexParameterPointervAPPLE; snprintf(symboln, sizeof(symboln), "%sGetTexParameterPointervAPPLE", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetTexParameterPointervAPPLE; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TextureRangeAPPLE) { + void ** procp = (void **) &disp->TextureRangeAPPLE; snprintf(symboln, sizeof(symboln), "%sTextureRangeAPPLE", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TextureRangeAPPLE; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetObjectParameterivAPPLE) { + void ** procp = (void **) &disp->GetObjectParameterivAPPLE; snprintf(symboln, sizeof(symboln), "%sGetObjectParameterivAPPLE", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetObjectParameterivAPPLE; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ObjectPurgeableAPPLE) { + void ** procp = (void **) &disp->ObjectPurgeableAPPLE; snprintf(symboln, sizeof(symboln), "%sObjectPurgeableAPPLE", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ObjectPurgeableAPPLE; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ObjectUnpurgeableAPPLE) { + void ** procp = (void **) &disp->ObjectUnpurgeableAPPLE; snprintf(symboln, sizeof(symboln), "%sObjectUnpurgeableAPPLE", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ObjectUnpurgeableAPPLE; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ActiveProgramEXT) { + void ** procp = (void **) &disp->ActiveProgramEXT; snprintf(symboln, sizeof(symboln), "%sActiveProgramEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ActiveProgramEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->CreateShaderProgramEXT) { + void ** procp = (void **) &disp->CreateShaderProgramEXT; snprintf(symboln, sizeof(symboln), "%sCreateShaderProgramEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->CreateShaderProgramEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->UseShaderProgramEXT) { + void ** procp = (void **) &disp->UseShaderProgramEXT; snprintf(symboln, sizeof(symboln), "%sUseShaderProgramEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->UseShaderProgramEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->TextureBarrierNV) { + void ** procp = (void **) &disp->TextureBarrierNV; snprintf(symboln, sizeof(symboln), "%sTextureBarrierNV", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->TextureBarrierNV; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->StencilFuncSeparateATI) { + void ** procp = (void **) &disp->StencilFuncSeparateATI; snprintf(symboln, sizeof(symboln), "%sStencilFuncSeparateATI", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->StencilFuncSeparateATI; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ProgramEnvParameters4fvEXT) { + void ** procp = (void **) &disp->ProgramEnvParameters4fvEXT; snprintf(symboln, sizeof(symboln), "%sProgramEnvParameters4fvEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ProgramEnvParameters4fvEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->ProgramLocalParameters4fvEXT) { + void ** procp = (void **) &disp->ProgramLocalParameters4fvEXT; snprintf(symboln, sizeof(symboln), "%sProgramLocalParameters4fvEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->ProgramLocalParameters4fvEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetQueryObjecti64vEXT) { + void ** procp = (void **) &disp->GetQueryObjecti64vEXT; snprintf(symboln, sizeof(symboln), "%sGetQueryObjecti64vEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetQueryObjecti64vEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->GetQueryObjectui64vEXT) { + void ** procp = (void **) &disp->GetQueryObjectui64vEXT; snprintf(symboln, sizeof(symboln), "%sGetQueryObjectui64vEXT", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->GetQueryObjectui64vEXT; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->EGLImageTargetRenderbufferStorageOES) { + void ** procp = (void **) &disp->EGLImageTargetRenderbufferStorageOES; snprintf(symboln, sizeof(symboln), "%sEGLImageTargetRenderbufferStorageOES", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->EGLImageTargetRenderbufferStorageOES; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } if(!disp->EGLImageTargetTexture2DOES) { + void ** procp = (void **) &disp->EGLImageTargetTexture2DOES; snprintf(symboln, sizeof(symboln), "%sEGLImageTargetTexture2DOES", symbol_prefix); - _glapi_proc *procp = (_glapi_proc *)&disp->EGLImageTargetTexture2DOES; - *procp = (_glapi_proc) dlsym(handle, symboln); + *procp = dlsym(handle, symboln); } + __glapi_gentable_set_remaining_noop(disp); + return disp; } diff --git a/mesalib/src/mesa/main/mipmap.c b/mesalib/src/mesa/main/mipmap.c index ed93cbc6c..f2724dbca 100644 --- a/mesalib/src/mesa/main/mipmap.c +++ b/mesalib/src/mesa/main/mipmap.c @@ -1,2202 +1,2240 @@ -/*
- * Mesa 3-D graphics library
- * Version: 7.1
- *
- * Copyright (C) 1999-2007 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 mipmap.c mipmap generation and teximage resizing functions.
- */
-
-#include "imports.h"
-#include "formats.h"
-#include "mipmap.h"
-#include "mtypes.h"
-#include "teximage.h"
-#include "texstore.h"
-#include "image.h"
-#include "macros.h"
-#include "../../gallium/auxiliary/util/u_format_rgb9e5.h"
-#include "../../gallium/auxiliary/util/u_format_r11g11b10f.h"
-
-
-
-static GLint
-bytes_per_pixel(GLenum datatype, GLuint comps)
-{
- GLint b = _mesa_sizeof_packed_type(datatype);
- assert(b >= 0);
-
- if (_mesa_type_is_packed(datatype))
- return b;
- else
- return b * comps;
-}
-
-
-/**
- * \name Support macros for do_row and do_row_3d
- *
- * The macro madness is here for two reasons. First, it compacts the code
- * slightly. Second, it makes it much easier to adjust the specifics of the
- * filter to tune the rounding characteristics.
- */
-/*@{*/
-#define DECLARE_ROW_POINTERS(t, e) \
- const t(*rowA)[e] = (const t(*)[e]) srcRowA; \
- const t(*rowB)[e] = (const t(*)[e]) srcRowB; \
- const t(*rowC)[e] = (const t(*)[e]) srcRowC; \
- const t(*rowD)[e] = (const t(*)[e]) srcRowD; \
- t(*dst)[e] = (t(*)[e]) dstRow
-
-#define DECLARE_ROW_POINTERS0(t) \
- const t *rowA = (const t *) srcRowA; \
- const t *rowB = (const t *) srcRowB; \
- const t *rowC = (const t *) srcRowC; \
- const t *rowD = (const t *) srcRowD; \
- t *dst = (t *) dstRow
-
-#define FILTER_SUM_3D(Aj, Ak, Bj, Bk, Cj, Ck, Dj, Dk) \
- ((unsigned) Aj + (unsigned) Ak \
- + (unsigned) Bj + (unsigned) Bk \
- + (unsigned) Cj + (unsigned) Ck \
- + (unsigned) Dj + (unsigned) Dk \
- + 4) >> 3
-
-#define FILTER_3D(e) \
- do { \
- dst[i][e] = FILTER_SUM_3D(rowA[j][e], rowA[k][e], \
- rowB[j][e], rowB[k][e], \
- rowC[j][e], rowC[k][e], \
- rowD[j][e], rowD[k][e]); \
- } while(0)
-
-#define FILTER_SUM_3D_SIGNED(Aj, Ak, Bj, Bk, Cj, Ck, Dj, Dk) \
- (Aj + Ak \
- + Bj + Bk \
- + Cj + Ck \
- + Dj + Dk \
- + 4) / 8
-
-#define FILTER_3D_SIGNED(e) \
- do { \
- dst[i][e] = FILTER_SUM_3D_SIGNED(rowA[j][e], rowA[k][e], \
- rowB[j][e], rowB[k][e], \
- rowC[j][e], rowC[k][e], \
- rowD[j][e], rowD[k][e]); \
- } while(0)
-
-#define FILTER_F_3D(e) \
- do { \
- dst[i][e] = (rowA[j][e] + rowA[k][e] \
- + rowB[j][e] + rowB[k][e] \
- + rowC[j][e] + rowC[k][e] \
- + rowD[j][e] + rowD[k][e]) * 0.125F; \
- } while(0)
-
-#define FILTER_HF_3D(e) \
- do { \
- const GLfloat aj = _mesa_half_to_float(rowA[j][e]); \
- const GLfloat ak = _mesa_half_to_float(rowA[k][e]); \
- const GLfloat bj = _mesa_half_to_float(rowB[j][e]); \
- const GLfloat bk = _mesa_half_to_float(rowB[k][e]); \
- const GLfloat cj = _mesa_half_to_float(rowC[j][e]); \
- const GLfloat ck = _mesa_half_to_float(rowC[k][e]); \
- const GLfloat dj = _mesa_half_to_float(rowD[j][e]); \
- const GLfloat dk = _mesa_half_to_float(rowD[k][e]); \
- dst[i][e] = _mesa_float_to_half((aj + ak + bj + bk + cj + ck + dj + dk) \
- * 0.125F); \
- } while(0)
-/*@}*/
-
-
-/**
- * Average together two rows of a source image to produce a single new
- * row in the dest image. It's legal for the two source rows to point
- * to the same data. The source width must be equal to either the
- * dest width or two times the dest width.
- * \param datatype GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, GL_FLOAT, etc.
- * \param comps number of components per pixel (1..4)
- */
-static void
-do_row(GLenum datatype, GLuint comps, GLint srcWidth,
- const GLvoid *srcRowA, const GLvoid *srcRowB,
- GLint dstWidth, GLvoid *dstRow)
-{
- const GLuint k0 = (srcWidth == dstWidth) ? 0 : 1;
- const GLuint colStride = (srcWidth == dstWidth) ? 1 : 2;
-
- ASSERT(comps >= 1);
- ASSERT(comps <= 4);
-
- /* This assertion is no longer valid with non-power-of-2 textures
- assert(srcWidth == dstWidth || srcWidth == 2 * dstWidth);
- */
-
- if (datatype == GL_UNSIGNED_BYTE && comps == 4) {
- GLuint i, j, k;
- const GLubyte(*rowA)[4] = (const GLubyte(*)[4]) srcRowA;
- const GLubyte(*rowB)[4] = (const GLubyte(*)[4]) srcRowB;
- GLubyte(*dst)[4] = (GLubyte(*)[4]) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- dst[i][0] = (rowA[j][0] + rowA[k][0] + rowB[j][0] + rowB[k][0]) / 4;
- dst[i][1] = (rowA[j][1] + rowA[k][1] + rowB[j][1] + rowB[k][1]) / 4;
- dst[i][2] = (rowA[j][2] + rowA[k][2] + rowB[j][2] + rowB[k][2]) / 4;
- dst[i][3] = (rowA[j][3] + rowA[k][3] + rowB[j][3] + rowB[k][3]) / 4;
- }
- }
- else if (datatype == GL_UNSIGNED_BYTE && comps == 3) {
- GLuint i, j, k;
- const GLubyte(*rowA)[3] = (const GLubyte(*)[3]) srcRowA;
- const GLubyte(*rowB)[3] = (const GLubyte(*)[3]) srcRowB;
- GLubyte(*dst)[3] = (GLubyte(*)[3]) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- dst[i][0] = (rowA[j][0] + rowA[k][0] + rowB[j][0] + rowB[k][0]) / 4;
- dst[i][1] = (rowA[j][1] + rowA[k][1] + rowB[j][1] + rowB[k][1]) / 4;
- dst[i][2] = (rowA[j][2] + rowA[k][2] + rowB[j][2] + rowB[k][2]) / 4;
- }
- }
- else if (datatype == GL_UNSIGNED_BYTE && comps == 2) {
- GLuint i, j, k;
- const GLubyte(*rowA)[2] = (const GLubyte(*)[2]) srcRowA;
- const GLubyte(*rowB)[2] = (const GLubyte(*)[2]) srcRowB;
- GLubyte(*dst)[2] = (GLubyte(*)[2]) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- dst[i][0] = (rowA[j][0] + rowA[k][0] + rowB[j][0] + rowB[k][0]) >> 2;
- dst[i][1] = (rowA[j][1] + rowA[k][1] + rowB[j][1] + rowB[k][1]) >> 2;
- }
- }
- else if (datatype == GL_UNSIGNED_BYTE && comps == 1) {
- GLuint i, j, k;
- const GLubyte *rowA = (const GLubyte *) srcRowA;
- const GLubyte *rowB = (const GLubyte *) srcRowB;
- GLubyte *dst = (GLubyte *) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- dst[i] = (rowA[j] + rowA[k] + rowB[j] + rowB[k]) >> 2;
- }
- }
-
- else if (datatype == GL_BYTE && comps == 4) {
- GLuint i, j, k;
- const GLbyte(*rowA)[4] = (const GLbyte(*)[4]) srcRowA;
- const GLbyte(*rowB)[4] = (const GLbyte(*)[4]) srcRowB;
- GLbyte(*dst)[4] = (GLbyte(*)[4]) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- dst[i][0] = (rowA[j][0] + rowA[k][0] + rowB[j][0] + rowB[k][0]) / 4;
- dst[i][1] = (rowA[j][1] + rowA[k][1] + rowB[j][1] + rowB[k][1]) / 4;
- dst[i][2] = (rowA[j][2] + rowA[k][2] + rowB[j][2] + rowB[k][2]) / 4;
- dst[i][3] = (rowA[j][3] + rowA[k][3] + rowB[j][3] + rowB[k][3]) / 4;
- }
- }
- else if (datatype == GL_BYTE && comps == 3) {
- GLuint i, j, k;
- const GLbyte(*rowA)[3] = (const GLbyte(*)[3]) srcRowA;
- const GLbyte(*rowB)[3] = (const GLbyte(*)[3]) srcRowB;
- GLbyte(*dst)[3] = (GLbyte(*)[3]) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- dst[i][0] = (rowA[j][0] + rowA[k][0] + rowB[j][0] + rowB[k][0]) / 4;
- dst[i][1] = (rowA[j][1] + rowA[k][1] + rowB[j][1] + rowB[k][1]) / 4;
- dst[i][2] = (rowA[j][2] + rowA[k][2] + rowB[j][2] + rowB[k][2]) / 4;
- }
- }
- else if (datatype == GL_BYTE && comps == 2) {
- GLuint i, j, k;
- const GLbyte(*rowA)[2] = (const GLbyte(*)[2]) srcRowA;
- const GLbyte(*rowB)[2] = (const GLbyte(*)[2]) srcRowB;
- GLbyte(*dst)[2] = (GLbyte(*)[2]) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- dst[i][0] = (rowA[j][0] + rowA[k][0] + rowB[j][0] + rowB[k][0]) / 4;
- dst[i][1] = (rowA[j][1] + rowA[k][1] + rowB[j][1] + rowB[k][1]) / 4;
- }
- }
- else if (datatype == GL_BYTE && comps == 1) {
- GLuint i, j, k;
- const GLbyte *rowA = (const GLbyte *) srcRowA;
- const GLbyte *rowB = (const GLbyte *) srcRowB;
- GLbyte *dst = (GLbyte *) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- dst[i] = (rowA[j] + rowA[k] + rowB[j] + rowB[k]) / 4;
- }
- }
-
- else if (datatype == GL_UNSIGNED_SHORT && comps == 4) {
- GLuint i, j, k;
- const GLushort(*rowA)[4] = (const GLushort(*)[4]) srcRowA;
- const GLushort(*rowB)[4] = (const GLushort(*)[4]) srcRowB;
- GLushort(*dst)[4] = (GLushort(*)[4]) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- dst[i][0] = (rowA[j][0] + rowA[k][0] + rowB[j][0] + rowB[k][0]) / 4;
- dst[i][1] = (rowA[j][1] + rowA[k][1] + rowB[j][1] + rowB[k][1]) / 4;
- dst[i][2] = (rowA[j][2] + rowA[k][2] + rowB[j][2] + rowB[k][2]) / 4;
- dst[i][3] = (rowA[j][3] + rowA[k][3] + rowB[j][3] + rowB[k][3]) / 4;
- }
- }
- else if (datatype == GL_UNSIGNED_SHORT && comps == 3) {
- GLuint i, j, k;
- const GLushort(*rowA)[3] = (const GLushort(*)[3]) srcRowA;
- const GLushort(*rowB)[3] = (const GLushort(*)[3]) srcRowB;
- GLushort(*dst)[3] = (GLushort(*)[3]) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- dst[i][0] = (rowA[j][0] + rowA[k][0] + rowB[j][0] + rowB[k][0]) / 4;
- dst[i][1] = (rowA[j][1] + rowA[k][1] + rowB[j][1] + rowB[k][1]) / 4;
- dst[i][2] = (rowA[j][2] + rowA[k][2] + rowB[j][2] + rowB[k][2]) / 4;
- }
- }
- else if (datatype == GL_UNSIGNED_SHORT && comps == 2) {
- GLuint i, j, k;
- const GLushort(*rowA)[2] = (const GLushort(*)[2]) srcRowA;
- const GLushort(*rowB)[2] = (const GLushort(*)[2]) srcRowB;
- GLushort(*dst)[2] = (GLushort(*)[2]) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- dst[i][0] = (rowA[j][0] + rowA[k][0] + rowB[j][0] + rowB[k][0]) / 4;
- dst[i][1] = (rowA[j][1] + rowA[k][1] + rowB[j][1] + rowB[k][1]) / 4;
- }
- }
- else if (datatype == GL_UNSIGNED_SHORT && comps == 1) {
- GLuint i, j, k;
- const GLushort *rowA = (const GLushort *) srcRowA;
- const GLushort *rowB = (const GLushort *) srcRowB;
- GLushort *dst = (GLushort *) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- dst[i] = (rowA[j] + rowA[k] + rowB[j] + rowB[k]) / 4;
- }
- }
-
- else if (datatype == GL_SHORT && comps == 4) {
- GLuint i, j, k;
- const GLshort(*rowA)[4] = (const GLshort(*)[4]) srcRowA;
- const GLshort(*rowB)[4] = (const GLshort(*)[4]) srcRowB;
- GLshort(*dst)[4] = (GLshort(*)[4]) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- dst[i][0] = (rowA[j][0] + rowA[k][0] + rowB[j][0] + rowB[k][0]) / 4;
- dst[i][1] = (rowA[j][1] + rowA[k][1] + rowB[j][1] + rowB[k][1]) / 4;
- dst[i][2] = (rowA[j][2] + rowA[k][2] + rowB[j][2] + rowB[k][2]) / 4;
- dst[i][3] = (rowA[j][3] + rowA[k][3] + rowB[j][3] + rowB[k][3]) / 4;
- }
- }
- else if (datatype == GL_SHORT && comps == 3) {
- GLuint i, j, k;
- const GLshort(*rowA)[3] = (const GLshort(*)[3]) srcRowA;
- const GLshort(*rowB)[3] = (const GLshort(*)[3]) srcRowB;
- GLshort(*dst)[3] = (GLshort(*)[3]) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- dst[i][0] = (rowA[j][0] + rowA[k][0] + rowB[j][0] + rowB[k][0]) / 4;
- dst[i][1] = (rowA[j][1] + rowA[k][1] + rowB[j][1] + rowB[k][1]) / 4;
- dst[i][2] = (rowA[j][2] + rowA[k][2] + rowB[j][2] + rowB[k][2]) / 4;
- }
- }
- else if (datatype == GL_SHORT && comps == 2) {
- GLuint i, j, k;
- const GLshort(*rowA)[2] = (const GLshort(*)[2]) srcRowA;
- const GLshort(*rowB)[2] = (const GLshort(*)[2]) srcRowB;
- GLshort(*dst)[2] = (GLshort(*)[2]) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- dst[i][0] = (rowA[j][0] + rowA[k][0] + rowB[j][0] + rowB[k][0]) / 4;
- dst[i][1] = (rowA[j][1] + rowA[k][1] + rowB[j][1] + rowB[k][1]) / 4;
- }
- }
- else if (datatype == GL_SHORT && comps == 1) {
- GLuint i, j, k;
- const GLshort *rowA = (const GLshort *) srcRowA;
- const GLshort *rowB = (const GLshort *) srcRowB;
- GLshort *dst = (GLshort *) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- dst[i] = (rowA[j] + rowA[k] + rowB[j] + rowB[k]) / 4;
- }
- }
-
- else if (datatype == GL_FLOAT && comps == 4) {
- GLuint i, j, k;
- const GLfloat(*rowA)[4] = (const GLfloat(*)[4]) srcRowA;
- const GLfloat(*rowB)[4] = (const GLfloat(*)[4]) srcRowB;
- GLfloat(*dst)[4] = (GLfloat(*)[4]) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- dst[i][0] = (rowA[j][0] + rowA[k][0] +
- rowB[j][0] + rowB[k][0]) * 0.25F;
- dst[i][1] = (rowA[j][1] + rowA[k][1] +
- rowB[j][1] + rowB[k][1]) * 0.25F;
- dst[i][2] = (rowA[j][2] + rowA[k][2] +
- rowB[j][2] + rowB[k][2]) * 0.25F;
- dst[i][3] = (rowA[j][3] + rowA[k][3] +
- rowB[j][3] + rowB[k][3]) * 0.25F;
- }
- }
- else if (datatype == GL_FLOAT && comps == 3) {
- GLuint i, j, k;
- const GLfloat(*rowA)[3] = (const GLfloat(*)[3]) srcRowA;
- const GLfloat(*rowB)[3] = (const GLfloat(*)[3]) srcRowB;
- GLfloat(*dst)[3] = (GLfloat(*)[3]) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- dst[i][0] = (rowA[j][0] + rowA[k][0] +
- rowB[j][0] + rowB[k][0]) * 0.25F;
- dst[i][1] = (rowA[j][1] + rowA[k][1] +
- rowB[j][1] + rowB[k][1]) * 0.25F;
- dst[i][2] = (rowA[j][2] + rowA[k][2] +
- rowB[j][2] + rowB[k][2]) * 0.25F;
- }
- }
- else if (datatype == GL_FLOAT && comps == 2) {
- GLuint i, j, k;
- const GLfloat(*rowA)[2] = (const GLfloat(*)[2]) srcRowA;
- const GLfloat(*rowB)[2] = (const GLfloat(*)[2]) srcRowB;
- GLfloat(*dst)[2] = (GLfloat(*)[2]) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- dst[i][0] = (rowA[j][0] + rowA[k][0] +
- rowB[j][0] + rowB[k][0]) * 0.25F;
- dst[i][1] = (rowA[j][1] + rowA[k][1] +
- rowB[j][1] + rowB[k][1]) * 0.25F;
- }
- }
- else if (datatype == GL_FLOAT && comps == 1) {
- GLuint i, j, k;
- const GLfloat *rowA = (const GLfloat *) srcRowA;
- const GLfloat *rowB = (const GLfloat *) srcRowB;
- GLfloat *dst = (GLfloat *) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- dst[i] = (rowA[j] + rowA[k] + rowB[j] + rowB[k]) * 0.25F;
- }
- }
-
- else if (datatype == GL_HALF_FLOAT_ARB && comps == 4) {
- GLuint i, j, k, comp;
- const GLhalfARB(*rowA)[4] = (const GLhalfARB(*)[4]) srcRowA;
- const GLhalfARB(*rowB)[4] = (const GLhalfARB(*)[4]) srcRowB;
- GLhalfARB(*dst)[4] = (GLhalfARB(*)[4]) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- for (comp = 0; comp < 4; comp++) {
- GLfloat aj, ak, bj, bk;
- aj = _mesa_half_to_float(rowA[j][comp]);
- ak = _mesa_half_to_float(rowA[k][comp]);
- bj = _mesa_half_to_float(rowB[j][comp]);
- bk = _mesa_half_to_float(rowB[k][comp]);
- dst[i][comp] = _mesa_float_to_half((aj + ak + bj + bk) * 0.25F);
- }
- }
- }
- else if (datatype == GL_HALF_FLOAT_ARB && comps == 3) {
- GLuint i, j, k, comp;
- const GLhalfARB(*rowA)[3] = (const GLhalfARB(*)[3]) srcRowA;
- const GLhalfARB(*rowB)[3] = (const GLhalfARB(*)[3]) srcRowB;
- GLhalfARB(*dst)[3] = (GLhalfARB(*)[3]) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- for (comp = 0; comp < 3; comp++) {
- GLfloat aj, ak, bj, bk;
- aj = _mesa_half_to_float(rowA[j][comp]);
- ak = _mesa_half_to_float(rowA[k][comp]);
- bj = _mesa_half_to_float(rowB[j][comp]);
- bk = _mesa_half_to_float(rowB[k][comp]);
- dst[i][comp] = _mesa_float_to_half((aj + ak + bj + bk) * 0.25F);
- }
- }
- }
- else if (datatype == GL_HALF_FLOAT_ARB && comps == 2) {
- GLuint i, j, k, comp;
- const GLhalfARB(*rowA)[2] = (const GLhalfARB(*)[2]) srcRowA;
- const GLhalfARB(*rowB)[2] = (const GLhalfARB(*)[2]) srcRowB;
- GLhalfARB(*dst)[2] = (GLhalfARB(*)[2]) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- for (comp = 0; comp < 2; comp++) {
- GLfloat aj, ak, bj, bk;
- aj = _mesa_half_to_float(rowA[j][comp]);
- ak = _mesa_half_to_float(rowA[k][comp]);
- bj = _mesa_half_to_float(rowB[j][comp]);
- bk = _mesa_half_to_float(rowB[k][comp]);
- dst[i][comp] = _mesa_float_to_half((aj + ak + bj + bk) * 0.25F);
- }
- }
- }
- else if (datatype == GL_HALF_FLOAT_ARB && comps == 1) {
- GLuint i, j, k;
- const GLhalfARB *rowA = (const GLhalfARB *) srcRowA;
- const GLhalfARB *rowB = (const GLhalfARB *) srcRowB;
- GLhalfARB *dst = (GLhalfARB *) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- GLfloat aj, ak, bj, bk;
- aj = _mesa_half_to_float(rowA[j]);
- ak = _mesa_half_to_float(rowA[k]);
- bj = _mesa_half_to_float(rowB[j]);
- bk = _mesa_half_to_float(rowB[k]);
- dst[i] = _mesa_float_to_half((aj + ak + bj + bk) * 0.25F);
- }
- }
-
- else if (datatype == GL_UNSIGNED_INT && comps == 1) {
- GLuint i, j, k;
- const GLuint *rowA = (const GLuint *) srcRowA;
- const GLuint *rowB = (const GLuint *) srcRowB;
- GLuint *dst = (GLuint *) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- dst[i] = (GLfloat)(rowA[j] / 4 + rowA[k] / 4 + rowB[j] / 4 + rowB[k] / 4);
- }
- }
-
- else if (datatype == GL_UNSIGNED_SHORT_5_6_5 && comps == 3) {
- GLuint i, j, k;
- const GLushort *rowA = (const GLushort *) srcRowA;
- const GLushort *rowB = (const GLushort *) srcRowB;
- GLushort *dst = (GLushort *) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- const GLint rowAr0 = rowA[j] & 0x1f;
- const GLint rowAr1 = rowA[k] & 0x1f;
- const GLint rowBr0 = rowB[j] & 0x1f;
- const GLint rowBr1 = rowB[k] & 0x1f;
- const GLint rowAg0 = (rowA[j] >> 5) & 0x3f;
- const GLint rowAg1 = (rowA[k] >> 5) & 0x3f;
- const GLint rowBg0 = (rowB[j] >> 5) & 0x3f;
- const GLint rowBg1 = (rowB[k] >> 5) & 0x3f;
- const GLint rowAb0 = (rowA[j] >> 11) & 0x1f;
- const GLint rowAb1 = (rowA[k] >> 11) & 0x1f;
- const GLint rowBb0 = (rowB[j] >> 11) & 0x1f;
- const GLint rowBb1 = (rowB[k] >> 11) & 0x1f;
- const GLint red = (rowAr0 + rowAr1 + rowBr0 + rowBr1) >> 2;
- const GLint green = (rowAg0 + rowAg1 + rowBg0 + rowBg1) >> 2;
- const GLint blue = (rowAb0 + rowAb1 + rowBb0 + rowBb1) >> 2;
- dst[i] = (blue << 11) | (green << 5) | red;
- }
- }
- else if (datatype == GL_UNSIGNED_SHORT_4_4_4_4 && comps == 4) {
- GLuint i, j, k;
- const GLushort *rowA = (const GLushort *) srcRowA;
- const GLushort *rowB = (const GLushort *) srcRowB;
- GLushort *dst = (GLushort *) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- const GLint rowAr0 = rowA[j] & 0xf;
- const GLint rowAr1 = rowA[k] & 0xf;
- const GLint rowBr0 = rowB[j] & 0xf;
- const GLint rowBr1 = rowB[k] & 0xf;
- const GLint rowAg0 = (rowA[j] >> 4) & 0xf;
- const GLint rowAg1 = (rowA[k] >> 4) & 0xf;
- const GLint rowBg0 = (rowB[j] >> 4) & 0xf;
- const GLint rowBg1 = (rowB[k] >> 4) & 0xf;
- const GLint rowAb0 = (rowA[j] >> 8) & 0xf;
- const GLint rowAb1 = (rowA[k] >> 8) & 0xf;
- const GLint rowBb0 = (rowB[j] >> 8) & 0xf;
- const GLint rowBb1 = (rowB[k] >> 8) & 0xf;
- const GLint rowAa0 = (rowA[j] >> 12) & 0xf;
- const GLint rowAa1 = (rowA[k] >> 12) & 0xf;
- const GLint rowBa0 = (rowB[j] >> 12) & 0xf;
- const GLint rowBa1 = (rowB[k] >> 12) & 0xf;
- const GLint red = (rowAr0 + rowAr1 + rowBr0 + rowBr1) >> 2;
- const GLint green = (rowAg0 + rowAg1 + rowBg0 + rowBg1) >> 2;
- const GLint blue = (rowAb0 + rowAb1 + rowBb0 + rowBb1) >> 2;
- const GLint alpha = (rowAa0 + rowAa1 + rowBa0 + rowBa1) >> 2;
- dst[i] = (alpha << 12) | (blue << 8) | (green << 4) | red;
- }
- }
- else if (datatype == GL_UNSIGNED_SHORT_1_5_5_5_REV && comps == 4) {
- GLuint i, j, k;
- const GLushort *rowA = (const GLushort *) srcRowA;
- const GLushort *rowB = (const GLushort *) srcRowB;
- GLushort *dst = (GLushort *) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- const GLint rowAr0 = rowA[j] & 0x1f;
- const GLint rowAr1 = rowA[k] & 0x1f;
- const GLint rowBr0 = rowB[j] & 0x1f;
- const GLint rowBr1 = rowB[k] & 0x1f;
- const GLint rowAg0 = (rowA[j] >> 5) & 0x1f;
- const GLint rowAg1 = (rowA[k] >> 5) & 0x1f;
- const GLint rowBg0 = (rowB[j] >> 5) & 0x1f;
- const GLint rowBg1 = (rowB[k] >> 5) & 0x1f;
- const GLint rowAb0 = (rowA[j] >> 10) & 0x1f;
- const GLint rowAb1 = (rowA[k] >> 10) & 0x1f;
- const GLint rowBb0 = (rowB[j] >> 10) & 0x1f;
- const GLint rowBb1 = (rowB[k] >> 10) & 0x1f;
- const GLint rowAa0 = (rowA[j] >> 15) & 0x1;
- const GLint rowAa1 = (rowA[k] >> 15) & 0x1;
- const GLint rowBa0 = (rowB[j] >> 15) & 0x1;
- const GLint rowBa1 = (rowB[k] >> 15) & 0x1;
- const GLint red = (rowAr0 + rowAr1 + rowBr0 + rowBr1) >> 2;
- const GLint green = (rowAg0 + rowAg1 + rowBg0 + rowBg1) >> 2;
- const GLint blue = (rowAb0 + rowAb1 + rowBb0 + rowBb1) >> 2;
- const GLint alpha = (rowAa0 + rowAa1 + rowBa0 + rowBa1) >> 2;
- dst[i] = (alpha << 15) | (blue << 10) | (green << 5) | red;
- }
- }
- else if (datatype == GL_UNSIGNED_SHORT_5_5_5_1 && comps == 4) {
- GLuint i, j, k;
- const GLushort *rowA = (const GLushort *) srcRowA;
- const GLushort *rowB = (const GLushort *) srcRowB;
- GLushort *dst = (GLushort *) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- const GLint rowAr0 = (rowA[j] >> 11) & 0x1f;
- const GLint rowAr1 = (rowA[k] >> 11) & 0x1f;
- const GLint rowBr0 = (rowB[j] >> 11) & 0x1f;
- const GLint rowBr1 = (rowB[k] >> 11) & 0x1f;
- const GLint rowAg0 = (rowA[j] >> 6) & 0x1f;
- const GLint rowAg1 = (rowA[k] >> 6) & 0x1f;
- const GLint rowBg0 = (rowB[j] >> 6) & 0x1f;
- const GLint rowBg1 = (rowB[k] >> 6) & 0x1f;
- const GLint rowAb0 = (rowA[j] >> 1) & 0x1f;
- const GLint rowAb1 = (rowA[k] >> 1) & 0x1f;
- const GLint rowBb0 = (rowB[j] >> 1) & 0x1f;
- const GLint rowBb1 = (rowB[k] >> 1) & 0x1f;
- const GLint rowAa0 = (rowA[j] & 0x1);
- const GLint rowAa1 = (rowA[k] & 0x1);
- const GLint rowBa0 = (rowB[j] & 0x1);
- const GLint rowBa1 = (rowB[k] & 0x1);
- const GLint red = (rowAr0 + rowAr1 + rowBr0 + rowBr1) >> 2;
- const GLint green = (rowAg0 + rowAg1 + rowBg0 + rowBg1) >> 2;
- const GLint blue = (rowAb0 + rowAb1 + rowBb0 + rowBb1) >> 2;
- const GLint alpha = (rowAa0 + rowAa1 + rowBa0 + rowBa1) >> 2;
- dst[i] = (red << 11) | (green << 6) | (blue << 1) | alpha;
- }
- }
-
- else if (datatype == GL_UNSIGNED_BYTE_3_3_2 && comps == 3) {
- GLuint i, j, k;
- const GLubyte *rowA = (const GLubyte *) srcRowA;
- const GLubyte *rowB = (const GLubyte *) srcRowB;
- GLubyte *dst = (GLubyte *) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- const GLint rowAr0 = rowA[j] & 0x3;
- const GLint rowAr1 = rowA[k] & 0x3;
- const GLint rowBr0 = rowB[j] & 0x3;
- const GLint rowBr1 = rowB[k] & 0x3;
- const GLint rowAg0 = (rowA[j] >> 2) & 0x7;
- const GLint rowAg1 = (rowA[k] >> 2) & 0x7;
- const GLint rowBg0 = (rowB[j] >> 2) & 0x7;
- const GLint rowBg1 = (rowB[k] >> 2) & 0x7;
- const GLint rowAb0 = (rowA[j] >> 5) & 0x7;
- const GLint rowAb1 = (rowA[k] >> 5) & 0x7;
- const GLint rowBb0 = (rowB[j] >> 5) & 0x7;
- const GLint rowBb1 = (rowB[k] >> 5) & 0x7;
- const GLint red = (rowAr0 + rowAr1 + rowBr0 + rowBr1) >> 2;
- const GLint green = (rowAg0 + rowAg1 + rowBg0 + rowBg1) >> 2;
- const GLint blue = (rowAb0 + rowAb1 + rowBb0 + rowBb1) >> 2;
- dst[i] = (blue << 5) | (green << 2) | red;
- }
- }
-
- else if (datatype == MESA_UNSIGNED_BYTE_4_4 && comps == 2) {
- GLuint i, j, k;
- const GLubyte *rowA = (const GLubyte *) srcRowA;
- const GLubyte *rowB = (const GLubyte *) srcRowB;
- GLubyte *dst = (GLubyte *) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- const GLint rowAr0 = rowA[j] & 0xf;
- const GLint rowAr1 = rowA[k] & 0xf;
- const GLint rowBr0 = rowB[j] & 0xf;
- const GLint rowBr1 = rowB[k] & 0xf;
- const GLint rowAg0 = (rowA[j] >> 4) & 0xf;
- const GLint rowAg1 = (rowA[k] >> 4) & 0xf;
- const GLint rowBg0 = (rowB[j] >> 4) & 0xf;
- const GLint rowBg1 = (rowB[k] >> 4) & 0xf;
- const GLint r = (rowAr0 + rowAr1 + rowBr0 + rowBr1) >> 2;
- const GLint g = (rowAg0 + rowAg1 + rowBg0 + rowBg1) >> 2;
- dst[i] = (g << 4) | r;
- }
- }
-
- else if (datatype == GL_UNSIGNED_INT_2_10_10_10_REV && comps == 4) {
- GLuint i, j, k;
- const GLuint *rowA = (const GLuint *) srcRowA;
- const GLuint *rowB = (const GLuint *) srcRowB;
- GLuint *dst = (GLuint *) dstRow;
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- const GLint rowAr0 = rowA[j] & 0x3ff;
- const GLint rowAr1 = rowA[k] & 0x3ff;
- const GLint rowBr0 = rowB[j] & 0x3ff;
- const GLint rowBr1 = rowB[k] & 0x3ff;
- const GLint rowAg0 = (rowA[j] >> 10) & 0x3ff;
- const GLint rowAg1 = (rowA[k] >> 10) & 0x3ff;
- const GLint rowBg0 = (rowB[j] >> 10) & 0x3ff;
- const GLint rowBg1 = (rowB[k] >> 10) & 0x3ff;
- const GLint rowAb0 = (rowA[j] >> 20) & 0x3ff;
- const GLint rowAb1 = (rowA[k] >> 20) & 0x3ff;
- const GLint rowBb0 = (rowB[j] >> 20) & 0x3ff;
- const GLint rowBb1 = (rowB[k] >> 20) & 0x3ff;
- const GLint rowAa0 = (rowA[j] >> 30) & 0x3;
- const GLint rowAa1 = (rowA[k] >> 30) & 0x3;
- const GLint rowBa0 = (rowB[j] >> 30) & 0x3;
- const GLint rowBa1 = (rowB[k] >> 30) & 0x3;
- const GLint red = (rowAr0 + rowAr1 + rowBr0 + rowBr1) >> 2;
- const GLint green = (rowAg0 + rowAg1 + rowBg0 + rowBg1) >> 2;
- const GLint blue = (rowAb0 + rowAb1 + rowBb0 + rowBb1) >> 2;
- const GLint alpha = (rowAa0 + rowAa1 + rowBa0 + rowBa1) >> 2;
- dst[i] = (alpha << 30) | (blue << 20) | (green << 10) | red;
- }
- }
-
- else if (datatype == GL_UNSIGNED_INT_5_9_9_9_REV && comps == 3) {
- GLuint i, j, k;
- const GLuint *rowA = (const GLuint*) srcRowA;
- const GLuint *rowB = (const GLuint*) srcRowB;
- GLuint *dst = (GLuint*)dstRow;
- GLfloat res[3], rowAj[3], rowBj[3], rowAk[3], rowBk[3];
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- rgb9e5_to_float3(rowA[j], rowAj);
- rgb9e5_to_float3(rowB[j], rowBj);
- rgb9e5_to_float3(rowA[k], rowAk);
- rgb9e5_to_float3(rowB[k], rowBk);
- res[0] = (rowAj[0] + rowAk[0] + rowBj[0] + rowBk[0]) * 0.25F;
- res[1] = (rowAj[1] + rowAk[1] + rowBj[1] + rowBk[1]) * 0.25F;
- res[2] = (rowAj[2] + rowAk[2] + rowBj[2] + rowBk[2]) * 0.25F;
- dst[i] = float3_to_rgb9e5(res);
- }
- }
-
- else if (datatype == GL_UNSIGNED_INT_10F_11F_11F_REV && comps == 3) {
- GLuint i, j, k;
- const GLuint *rowA = (const GLuint*) srcRowA;
- const GLuint *rowB = (const GLuint*) srcRowB;
- GLuint *dst = (GLuint*)dstRow;
- GLfloat res[3], rowAj[3], rowBj[3], rowAk[3], rowBk[3];
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- r11g11b10f_to_float3(rowA[j], rowAj);
- r11g11b10f_to_float3(rowB[j], rowBj);
- r11g11b10f_to_float3(rowA[k], rowAk);
- r11g11b10f_to_float3(rowB[k], rowBk);
- res[0] = (rowAj[0] + rowAk[0] + rowBj[0] + rowBk[0]) * 0.25F;
- res[1] = (rowAj[1] + rowAk[1] + rowBj[1] + rowBk[1]) * 0.25F;
- res[2] = (rowAj[2] + rowAk[2] + rowBj[2] + rowBk[2]) * 0.25F;
- dst[i] = float3_to_r11g11b10f(res);
- }
- }
-
- else {
- _mesa_problem(NULL, "bad format in do_row()");
- }
-}
-
-
-/**
- * Average together four rows of a source image to produce a single new
- * row in the dest image. It's legal for the two source rows to point
- * to the same data. The source width must be equal to either the
- * dest width or two times the dest width.
- *
- * \param datatype GL pixel type \c GL_UNSIGNED_BYTE, \c GL_UNSIGNED_SHORT,
- * \c GL_FLOAT, etc.
- * \param comps number of components per pixel (1..4)
- * \param srcWidth Width of a row in the source data
- * \param srcRowA Pointer to one of the rows of source data
- * \param srcRowB Pointer to one of the rows of source data
- * \param srcRowC Pointer to one of the rows of source data
- * \param srcRowD Pointer to one of the rows of source data
- * \param dstWidth Width of a row in the destination data
- * \param srcRowA Pointer to the row of destination data
- */
-static void
-do_row_3D(GLenum datatype, GLuint comps, GLint srcWidth,
- const GLvoid *srcRowA, const GLvoid *srcRowB,
- const GLvoid *srcRowC, const GLvoid *srcRowD,
- GLint dstWidth, GLvoid *dstRow)
-{
- const GLuint k0 = (srcWidth == dstWidth) ? 0 : 1;
- const GLuint colStride = (srcWidth == dstWidth) ? 1 : 2;
- GLuint i, j, k;
-
- ASSERT(comps >= 1);
- ASSERT(comps <= 4);
-
- if ((datatype == GL_UNSIGNED_BYTE) && (comps == 4)) {
- DECLARE_ROW_POINTERS(GLubyte, 4);
-
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- FILTER_3D(0);
- FILTER_3D(1);
- FILTER_3D(2);
- FILTER_3D(3);
- }
- }
- else if ((datatype == GL_UNSIGNED_BYTE) && (comps == 3)) {
- DECLARE_ROW_POINTERS(GLubyte, 3);
-
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- FILTER_3D(0);
- FILTER_3D(1);
- FILTER_3D(2);
- }
- }
- else if ((datatype == GL_UNSIGNED_BYTE) && (comps == 2)) {
- DECLARE_ROW_POINTERS(GLubyte, 2);
-
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- FILTER_3D(0);
- FILTER_3D(1);
- }
- }
- else if ((datatype == GL_UNSIGNED_BYTE) && (comps == 1)) {
- DECLARE_ROW_POINTERS(GLubyte, 1);
-
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- FILTER_3D(0);
- }
- }
- else if ((datatype == GL_BYTE) && (comps == 4)) {
- DECLARE_ROW_POINTERS(GLbyte, 4);
-
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- FILTER_3D_SIGNED(0);
- FILTER_3D_SIGNED(1);
- FILTER_3D_SIGNED(2);
- FILTER_3D_SIGNED(3);
- }
- }
- else if ((datatype == GL_BYTE) && (comps == 3)) {
- DECLARE_ROW_POINTERS(GLbyte, 3);
-
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- FILTER_3D_SIGNED(0);
- FILTER_3D_SIGNED(1);
- FILTER_3D_SIGNED(2);
- }
- }
- else if ((datatype == GL_BYTE) && (comps == 2)) {
- DECLARE_ROW_POINTERS(GLbyte, 2);
-
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- FILTER_3D_SIGNED(0);
- FILTER_3D_SIGNED(1);
- }
- }
- else if ((datatype == GL_BYTE) && (comps == 1)) {
- DECLARE_ROW_POINTERS(GLbyte, 1);
-
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- FILTER_3D_SIGNED(0);
- }
- }
- else if ((datatype == GL_UNSIGNED_SHORT) && (comps == 4)) {
- DECLARE_ROW_POINTERS(GLushort, 4);
-
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- FILTER_3D(0);
- FILTER_3D(1);
- FILTER_3D(2);
- FILTER_3D(3);
- }
- }
- else if ((datatype == GL_UNSIGNED_SHORT) && (comps == 3)) {
- DECLARE_ROW_POINTERS(GLushort, 3);
-
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- FILTER_3D(0);
- FILTER_3D(1);
- FILTER_3D(2);
- }
- }
- else if ((datatype == GL_UNSIGNED_SHORT) && (comps == 2)) {
- DECLARE_ROW_POINTERS(GLushort, 2);
-
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- FILTER_3D(0);
- FILTER_3D(1);
- }
- }
- else if ((datatype == GL_UNSIGNED_SHORT) && (comps == 1)) {
- DECLARE_ROW_POINTERS(GLushort, 1);
-
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- FILTER_3D(0);
- }
- }
- else if ((datatype == GL_SHORT) && (comps == 4)) {
- DECLARE_ROW_POINTERS(GLshort, 4);
-
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- FILTER_3D(0);
- FILTER_3D(1);
- FILTER_3D(2);
- FILTER_3D(3);
- }
- }
- else if ((datatype == GL_SHORT) && (comps == 3)) {
- DECLARE_ROW_POINTERS(GLshort, 3);
-
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- FILTER_3D(0);
- FILTER_3D(1);
- FILTER_3D(2);
- }
- }
- else if ((datatype == GL_SHORT) && (comps == 2)) {
- DECLARE_ROW_POINTERS(GLshort, 2);
-
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- FILTER_3D(0);
- FILTER_3D(1);
- }
- }
- else if ((datatype == GL_SHORT) && (comps == 1)) {
- DECLARE_ROW_POINTERS(GLshort, 1);
-
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- FILTER_3D(0);
- }
- }
- else if ((datatype == GL_FLOAT) && (comps == 4)) {
- DECLARE_ROW_POINTERS(GLfloat, 4);
-
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- FILTER_F_3D(0);
- FILTER_F_3D(1);
- FILTER_F_3D(2);
- FILTER_F_3D(3);
- }
- }
- else if ((datatype == GL_FLOAT) && (comps == 3)) {
- DECLARE_ROW_POINTERS(GLfloat, 3);
-
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- FILTER_F_3D(0);
- FILTER_F_3D(1);
- FILTER_F_3D(2);
- }
- }
- else if ((datatype == GL_FLOAT) && (comps == 2)) {
- DECLARE_ROW_POINTERS(GLfloat, 2);
-
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- FILTER_F_3D(0);
- FILTER_F_3D(1);
- }
- }
- else if ((datatype == GL_FLOAT) && (comps == 1)) {
- DECLARE_ROW_POINTERS(GLfloat, 1);
-
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- FILTER_F_3D(0);
- }
- }
- else if ((datatype == GL_HALF_FLOAT_ARB) && (comps == 4)) {
- DECLARE_ROW_POINTERS(GLhalfARB, 4);
-
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- FILTER_HF_3D(0);
- FILTER_HF_3D(1);
- FILTER_HF_3D(2);
- FILTER_HF_3D(3);
- }
- }
- else if ((datatype == GL_HALF_FLOAT_ARB) && (comps == 3)) {
- DECLARE_ROW_POINTERS(GLhalfARB, 4);
-
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- FILTER_HF_3D(0);
- FILTER_HF_3D(1);
- FILTER_HF_3D(2);
- }
- }
- else if ((datatype == GL_HALF_FLOAT_ARB) && (comps == 2)) {
- DECLARE_ROW_POINTERS(GLhalfARB, 4);
-
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- FILTER_HF_3D(0);
- FILTER_HF_3D(1);
- }
- }
- else if ((datatype == GL_HALF_FLOAT_ARB) && (comps == 1)) {
- DECLARE_ROW_POINTERS(GLhalfARB, 4);
-
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- FILTER_HF_3D(0);
- }
- }
- else if ((datatype == GL_UNSIGNED_INT) && (comps == 1)) {
- const GLuint *rowA = (const GLuint *) srcRowA;
- const GLuint *rowB = (const GLuint *) srcRowB;
- const GLuint *rowC = (const GLuint *) srcRowC;
- const GLuint *rowD = (const GLuint *) srcRowD;
- GLfloat *dst = (GLfloat *) dstRow;
-
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- const uint64_t tmp = (((uint64_t) rowA[j] + (uint64_t) rowA[k])
- + ((uint64_t) rowB[j] + (uint64_t) rowB[k])
- + ((uint64_t) rowC[j] + (uint64_t) rowC[k])
- + ((uint64_t) rowD[j] + (uint64_t) rowD[k]));
- dst[i] = (GLfloat)((double) tmp * 0.125);
- }
- }
- else if ((datatype == GL_UNSIGNED_SHORT_5_6_5) && (comps == 3)) {
- DECLARE_ROW_POINTERS0(GLushort);
-
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- const GLint rowAr0 = rowA[j] & 0x1f;
- const GLint rowAr1 = rowA[k] & 0x1f;
- const GLint rowBr0 = rowB[j] & 0x1f;
- const GLint rowBr1 = rowB[k] & 0x1f;
- const GLint rowCr0 = rowC[j] & 0x1f;
- const GLint rowCr1 = rowC[k] & 0x1f;
- const GLint rowDr0 = rowD[j] & 0x1f;
- const GLint rowDr1 = rowD[k] & 0x1f;
- const GLint rowAg0 = (rowA[j] >> 5) & 0x3f;
- const GLint rowAg1 = (rowA[k] >> 5) & 0x3f;
- const GLint rowBg0 = (rowB[j] >> 5) & 0x3f;
- const GLint rowBg1 = (rowB[k] >> 5) & 0x3f;
- const GLint rowCg0 = (rowC[j] >> 5) & 0x3f;
- const GLint rowCg1 = (rowC[k] >> 5) & 0x3f;
- const GLint rowDg0 = (rowD[j] >> 5) & 0x3f;
- const GLint rowDg1 = (rowD[k] >> 5) & 0x3f;
- const GLint rowAb0 = (rowA[j] >> 11) & 0x1f;
- const GLint rowAb1 = (rowA[k] >> 11) & 0x1f;
- const GLint rowBb0 = (rowB[j] >> 11) & 0x1f;
- const GLint rowBb1 = (rowB[k] >> 11) & 0x1f;
- const GLint rowCb0 = (rowC[j] >> 11) & 0x1f;
- const GLint rowCb1 = (rowC[k] >> 11) & 0x1f;
- const GLint rowDb0 = (rowD[j] >> 11) & 0x1f;
- const GLint rowDb1 = (rowD[k] >> 11) & 0x1f;
- const GLint r = FILTER_SUM_3D(rowAr0, rowAr1, rowBr0, rowBr1,
- rowCr0, rowCr1, rowDr0, rowDr1);
- const GLint g = FILTER_SUM_3D(rowAg0, rowAg1, rowBg0, rowBg1,
- rowCg0, rowCg1, rowDg0, rowDg1);
- const GLint b = FILTER_SUM_3D(rowAb0, rowAb1, rowBb0, rowBb1,
- rowCb0, rowCb1, rowDb0, rowDb1);
- dst[i] = (b << 11) | (g << 5) | r;
- }
- }
- else if ((datatype == GL_UNSIGNED_SHORT_4_4_4_4) && (comps == 4)) {
- DECLARE_ROW_POINTERS0(GLushort);
-
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- const GLint rowAr0 = rowA[j] & 0xf;
- const GLint rowAr1 = rowA[k] & 0xf;
- const GLint rowBr0 = rowB[j] & 0xf;
- const GLint rowBr1 = rowB[k] & 0xf;
- const GLint rowCr0 = rowC[j] & 0xf;
- const GLint rowCr1 = rowC[k] & 0xf;
- const GLint rowDr0 = rowD[j] & 0xf;
- const GLint rowDr1 = rowD[k] & 0xf;
- const GLint rowAg0 = (rowA[j] >> 4) & 0xf;
- const GLint rowAg1 = (rowA[k] >> 4) & 0xf;
- const GLint rowBg0 = (rowB[j] >> 4) & 0xf;
- const GLint rowBg1 = (rowB[k] >> 4) & 0xf;
- const GLint rowCg0 = (rowC[j] >> 4) & 0xf;
- const GLint rowCg1 = (rowC[k] >> 4) & 0xf;
- const GLint rowDg0 = (rowD[j] >> 4) & 0xf;
- const GLint rowDg1 = (rowD[k] >> 4) & 0xf;
- const GLint rowAb0 = (rowA[j] >> 8) & 0xf;
- const GLint rowAb1 = (rowA[k] >> 8) & 0xf;
- const GLint rowBb0 = (rowB[j] >> 8) & 0xf;
- const GLint rowBb1 = (rowB[k] >> 8) & 0xf;
- const GLint rowCb0 = (rowC[j] >> 8) & 0xf;
- const GLint rowCb1 = (rowC[k] >> 8) & 0xf;
- const GLint rowDb0 = (rowD[j] >> 8) & 0xf;
- const GLint rowDb1 = (rowD[k] >> 8) & 0xf;
- const GLint rowAa0 = (rowA[j] >> 12) & 0xf;
- const GLint rowAa1 = (rowA[k] >> 12) & 0xf;
- const GLint rowBa0 = (rowB[j] >> 12) & 0xf;
- const GLint rowBa1 = (rowB[k] >> 12) & 0xf;
- const GLint rowCa0 = (rowC[j] >> 12) & 0xf;
- const GLint rowCa1 = (rowC[k] >> 12) & 0xf;
- const GLint rowDa0 = (rowD[j] >> 12) & 0xf;
- const GLint rowDa1 = (rowD[k] >> 12) & 0xf;
- const GLint r = FILTER_SUM_3D(rowAr0, rowAr1, rowBr0, rowBr1,
- rowCr0, rowCr1, rowDr0, rowDr1);
- const GLint g = FILTER_SUM_3D(rowAg0, rowAg1, rowBg0, rowBg1,
- rowCg0, rowCg1, rowDg0, rowDg1);
- const GLint b = FILTER_SUM_3D(rowAb0, rowAb1, rowBb0, rowBb1,
- rowCb0, rowCb1, rowDb0, rowDb1);
- const GLint a = FILTER_SUM_3D(rowAa0, rowAa1, rowBa0, rowBa1,
- rowCa0, rowCa1, rowDa0, rowDa1);
-
- dst[i] = (a << 12) | (b << 8) | (g << 4) | r;
- }
- }
- else if ((datatype == GL_UNSIGNED_SHORT_1_5_5_5_REV) && (comps == 4)) {
- DECLARE_ROW_POINTERS0(GLushort);
-
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- const GLint rowAr0 = rowA[j] & 0x1f;
- const GLint rowAr1 = rowA[k] & 0x1f;
- const GLint rowBr0 = rowB[j] & 0x1f;
- const GLint rowBr1 = rowB[k] & 0x1f;
- const GLint rowCr0 = rowC[j] & 0x1f;
- const GLint rowCr1 = rowC[k] & 0x1f;
- const GLint rowDr0 = rowD[j] & 0x1f;
- const GLint rowDr1 = rowD[k] & 0x1f;
- const GLint rowAg0 = (rowA[j] >> 5) & 0x1f;
- const GLint rowAg1 = (rowA[k] >> 5) & 0x1f;
- const GLint rowBg0 = (rowB[j] >> 5) & 0x1f;
- const GLint rowBg1 = (rowB[k] >> 5) & 0x1f;
- const GLint rowCg0 = (rowC[j] >> 5) & 0x1f;
- const GLint rowCg1 = (rowC[k] >> 5) & 0x1f;
- const GLint rowDg0 = (rowD[j] >> 5) & 0x1f;
- const GLint rowDg1 = (rowD[k] >> 5) & 0x1f;
- const GLint rowAb0 = (rowA[j] >> 10) & 0x1f;
- const GLint rowAb1 = (rowA[k] >> 10) & 0x1f;
- const GLint rowBb0 = (rowB[j] >> 10) & 0x1f;
- const GLint rowBb1 = (rowB[k] >> 10) & 0x1f;
- const GLint rowCb0 = (rowC[j] >> 10) & 0x1f;
- const GLint rowCb1 = (rowC[k] >> 10) & 0x1f;
- const GLint rowDb0 = (rowD[j] >> 10) & 0x1f;
- const GLint rowDb1 = (rowD[k] >> 10) & 0x1f;
- const GLint rowAa0 = (rowA[j] >> 15) & 0x1;
- const GLint rowAa1 = (rowA[k] >> 15) & 0x1;
- const GLint rowBa0 = (rowB[j] >> 15) & 0x1;
- const GLint rowBa1 = (rowB[k] >> 15) & 0x1;
- const GLint rowCa0 = (rowC[j] >> 15) & 0x1;
- const GLint rowCa1 = (rowC[k] >> 15) & 0x1;
- const GLint rowDa0 = (rowD[j] >> 15) & 0x1;
- const GLint rowDa1 = (rowD[k] >> 15) & 0x1;
- const GLint r = FILTER_SUM_3D(rowAr0, rowAr1, rowBr0, rowBr1,
- rowCr0, rowCr1, rowDr0, rowDr1);
- const GLint g = FILTER_SUM_3D(rowAg0, rowAg1, rowBg0, rowBg1,
- rowCg0, rowCg1, rowDg0, rowDg1);
- const GLint b = FILTER_SUM_3D(rowAb0, rowAb1, rowBb0, rowBb1,
- rowCb0, rowCb1, rowDb0, rowDb1);
- const GLint a = FILTER_SUM_3D(rowAa0, rowAa1, rowBa0, rowBa1,
- rowCa0, rowCa1, rowDa0, rowDa1);
-
- dst[i] = (a << 15) | (b << 10) | (g << 5) | r;
- }
- }
- else if ((datatype == GL_UNSIGNED_SHORT_5_5_5_1) && (comps == 4)) {
- DECLARE_ROW_POINTERS0(GLushort);
-
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- const GLint rowAr0 = (rowA[j] >> 11) & 0x1f;
- const GLint rowAr1 = (rowA[k] >> 11) & 0x1f;
- const GLint rowBr0 = (rowB[j] >> 11) & 0x1f;
- const GLint rowBr1 = (rowB[k] >> 11) & 0x1f;
- const GLint rowCr0 = (rowC[j] >> 11) & 0x1f;
- const GLint rowCr1 = (rowC[k] >> 11) & 0x1f;
- const GLint rowDr0 = (rowD[j] >> 11) & 0x1f;
- const GLint rowDr1 = (rowD[k] >> 11) & 0x1f;
- const GLint rowAg0 = (rowA[j] >> 6) & 0x1f;
- const GLint rowAg1 = (rowA[k] >> 6) & 0x1f;
- const GLint rowBg0 = (rowB[j] >> 6) & 0x1f;
- const GLint rowBg1 = (rowB[k] >> 6) & 0x1f;
- const GLint rowCg0 = (rowC[j] >> 6) & 0x1f;
- const GLint rowCg1 = (rowC[k] >> 6) & 0x1f;
- const GLint rowDg0 = (rowD[j] >> 6) & 0x1f;
- const GLint rowDg1 = (rowD[k] >> 6) & 0x1f;
- const GLint rowAb0 = (rowA[j] >> 1) & 0x1f;
- const GLint rowAb1 = (rowA[k] >> 1) & 0x1f;
- const GLint rowBb0 = (rowB[j] >> 1) & 0x1f;
- const GLint rowBb1 = (rowB[k] >> 1) & 0x1f;
- const GLint rowCb0 = (rowC[j] >> 1) & 0x1f;
- const GLint rowCb1 = (rowC[k] >> 1) & 0x1f;
- const GLint rowDb0 = (rowD[j] >> 1) & 0x1f;
- const GLint rowDb1 = (rowD[k] >> 1) & 0x1f;
- const GLint rowAa0 = (rowA[j] & 0x1);
- const GLint rowAa1 = (rowA[k] & 0x1);
- const GLint rowBa0 = (rowB[j] & 0x1);
- const GLint rowBa1 = (rowB[k] & 0x1);
- const GLint rowCa0 = (rowC[j] & 0x1);
- const GLint rowCa1 = (rowC[k] & 0x1);
- const GLint rowDa0 = (rowD[j] & 0x1);
- const GLint rowDa1 = (rowD[k] & 0x1);
- const GLint r = FILTER_SUM_3D(rowAr0, rowAr1, rowBr0, rowBr1,
- rowCr0, rowCr1, rowDr0, rowDr1);
- const GLint g = FILTER_SUM_3D(rowAg0, rowAg1, rowBg0, rowBg1,
- rowCg0, rowCg1, rowDg0, rowDg1);
- const GLint b = FILTER_SUM_3D(rowAb0, rowAb1, rowBb0, rowBb1,
- rowCb0, rowCb1, rowDb0, rowDb1);
- const GLint a = FILTER_SUM_3D(rowAa0, rowAa1, rowBa0, rowBa1,
- rowCa0, rowCa1, rowDa0, rowDa1);
-
- dst[i] = (r << 11) | (g << 6) | (b << 1) | a;
- }
- }
- else if ((datatype == GL_UNSIGNED_BYTE_3_3_2) && (comps == 3)) {
- DECLARE_ROW_POINTERS0(GLubyte);
-
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- const GLint rowAr0 = rowA[j] & 0x3;
- const GLint rowAr1 = rowA[k] & 0x3;
- const GLint rowBr0 = rowB[j] & 0x3;
- const GLint rowBr1 = rowB[k] & 0x3;
- const GLint rowCr0 = rowC[j] & 0x3;
- const GLint rowCr1 = rowC[k] & 0x3;
- const GLint rowDr0 = rowD[j] & 0x3;
- const GLint rowDr1 = rowD[k] & 0x3;
- const GLint rowAg0 = (rowA[j] >> 2) & 0x7;
- const GLint rowAg1 = (rowA[k] >> 2) & 0x7;
- const GLint rowBg0 = (rowB[j] >> 2) & 0x7;
- const GLint rowBg1 = (rowB[k] >> 2) & 0x7;
- const GLint rowCg0 = (rowC[j] >> 2) & 0x7;
- const GLint rowCg1 = (rowC[k] >> 2) & 0x7;
- const GLint rowDg0 = (rowD[j] >> 2) & 0x7;
- const GLint rowDg1 = (rowD[k] >> 2) & 0x7;
- const GLint rowAb0 = (rowA[j] >> 5) & 0x7;
- const GLint rowAb1 = (rowA[k] >> 5) & 0x7;
- const GLint rowBb0 = (rowB[j] >> 5) & 0x7;
- const GLint rowBb1 = (rowB[k] >> 5) & 0x7;
- const GLint rowCb0 = (rowC[j] >> 5) & 0x7;
- const GLint rowCb1 = (rowC[k] >> 5) & 0x7;
- const GLint rowDb0 = (rowD[j] >> 5) & 0x7;
- const GLint rowDb1 = (rowD[k] >> 5) & 0x7;
- const GLint r = FILTER_SUM_3D(rowAr0, rowAr1, rowBr0, rowBr1,
- rowCr0, rowCr1, rowDr0, rowDr1);
- const GLint g = FILTER_SUM_3D(rowAg0, rowAg1, rowBg0, rowBg1,
- rowCg0, rowCg1, rowDg0, rowDg1);
- const GLint b = FILTER_SUM_3D(rowAb0, rowAb1, rowBb0, rowBb1,
- rowCb0, rowCb1, rowDb0, rowDb1);
- dst[i] = (b << 5) | (g << 2) | r;
- }
- }
- else if (datatype == MESA_UNSIGNED_BYTE_4_4 && comps == 2) {
- DECLARE_ROW_POINTERS0(GLubyte);
-
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- const GLint rowAr0 = rowA[j] & 0xf;
- const GLint rowAr1 = rowA[k] & 0xf;
- const GLint rowBr0 = rowB[j] & 0xf;
- const GLint rowBr1 = rowB[k] & 0xf;
- const GLint rowCr0 = rowC[j] & 0xf;
- const GLint rowCr1 = rowC[k] & 0xf;
- const GLint rowDr0 = rowD[j] & 0xf;
- const GLint rowDr1 = rowD[k] & 0xf;
- const GLint rowAg0 = (rowA[j] >> 4) & 0xf;
- const GLint rowAg1 = (rowA[k] >> 4) & 0xf;
- const GLint rowBg0 = (rowB[j] >> 4) & 0xf;
- const GLint rowBg1 = (rowB[k] >> 4) & 0xf;
- const GLint rowCg0 = (rowC[j] >> 4) & 0xf;
- const GLint rowCg1 = (rowC[k] >> 4) & 0xf;
- const GLint rowDg0 = (rowD[j] >> 4) & 0xf;
- const GLint rowDg1 = (rowD[k] >> 4) & 0xf;
- const GLint r = FILTER_SUM_3D(rowAr0, rowAr1, rowBr0, rowBr1,
- rowCr0, rowCr1, rowDr0, rowDr1);
- const GLint g = FILTER_SUM_3D(rowAg0, rowAg1, rowBg0, rowBg1,
- rowCg0, rowCg1, rowDg0, rowDg1);
- dst[i] = (g << 4) | r;
- }
- }
- else if ((datatype == GL_UNSIGNED_INT_2_10_10_10_REV) && (comps == 4)) {
- DECLARE_ROW_POINTERS0(GLuint);
-
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- const GLint rowAr0 = rowA[j] & 0x3ff;
- const GLint rowAr1 = rowA[k] & 0x3ff;
- const GLint rowBr0 = rowB[j] & 0x3ff;
- const GLint rowBr1 = rowB[k] & 0x3ff;
- const GLint rowCr0 = rowC[j] & 0x3ff;
- const GLint rowCr1 = rowC[k] & 0x3ff;
- const GLint rowDr0 = rowD[j] & 0x3ff;
- const GLint rowDr1 = rowD[k] & 0x3ff;
- const GLint rowAg0 = (rowA[j] >> 10) & 0x3ff;
- const GLint rowAg1 = (rowA[k] >> 10) & 0x3ff;
- const GLint rowBg0 = (rowB[j] >> 10) & 0x3ff;
- const GLint rowBg1 = (rowB[k] >> 10) & 0x3ff;
- const GLint rowCg0 = (rowC[j] >> 10) & 0x3ff;
- const GLint rowCg1 = (rowC[k] >> 10) & 0x3ff;
- const GLint rowDg0 = (rowD[j] >> 10) & 0x3ff;
- const GLint rowDg1 = (rowD[k] >> 10) & 0x3ff;
- const GLint rowAb0 = (rowA[j] >> 20) & 0x3ff;
- const GLint rowAb1 = (rowA[k] >> 20) & 0x3ff;
- const GLint rowBb0 = (rowB[j] >> 20) & 0x3ff;
- const GLint rowBb1 = (rowB[k] >> 20) & 0x3ff;
- const GLint rowCb0 = (rowC[j] >> 20) & 0x3ff;
- const GLint rowCb1 = (rowC[k] >> 20) & 0x3ff;
- const GLint rowDb0 = (rowD[j] >> 20) & 0x3ff;
- const GLint rowDb1 = (rowD[k] >> 20) & 0x3ff;
- const GLint rowAa0 = (rowA[j] >> 30) & 0x3;
- const GLint rowAa1 = (rowA[k] >> 30) & 0x3;
- const GLint rowBa0 = (rowB[j] >> 30) & 0x3;
- const GLint rowBa1 = (rowB[k] >> 30) & 0x3;
- const GLint rowCa0 = (rowC[j] >> 30) & 0x3;
- const GLint rowCa1 = (rowC[k] >> 30) & 0x3;
- const GLint rowDa0 = (rowD[j] >> 30) & 0x3;
- const GLint rowDa1 = (rowD[k] >> 30) & 0x3;
- const GLint r = FILTER_SUM_3D(rowAr0, rowAr1, rowBr0, rowBr1,
- rowCr0, rowCr1, rowDr0, rowDr1);
- const GLint g = FILTER_SUM_3D(rowAg0, rowAg1, rowBg0, rowBg1,
- rowCg0, rowCg1, rowDg0, rowDg1);
- const GLint b = FILTER_SUM_3D(rowAb0, rowAb1, rowBb0, rowBb1,
- rowCb0, rowCb1, rowDb0, rowDb1);
- const GLint a = FILTER_SUM_3D(rowAa0, rowAa1, rowBa0, rowBa1,
- rowCa0, rowCa1, rowDa0, rowDa1);
-
- dst[i] = (a << 30) | (b << 20) | (g << 10) | r;
- }
- }
-
- else if (datatype == GL_UNSIGNED_INT_5_9_9_9_REV && comps == 3) {
- DECLARE_ROW_POINTERS0(GLuint);
-
- GLfloat res[3];
- GLfloat rowAj[3], rowBj[3], rowCj[3], rowDj[3];
- GLfloat rowAk[3], rowBk[3], rowCk[3], rowDk[3];
-
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- rgb9e5_to_float3(rowA[j], rowAj);
- rgb9e5_to_float3(rowB[j], rowBj);
- rgb9e5_to_float3(rowC[j], rowCj);
- rgb9e5_to_float3(rowD[j], rowDj);
- rgb9e5_to_float3(rowA[k], rowAk);
- rgb9e5_to_float3(rowB[k], rowBk);
- rgb9e5_to_float3(rowC[k], rowCk);
- rgb9e5_to_float3(rowD[k], rowDk);
- res[0] = (rowAj[0] + rowAk[0] + rowBj[0] + rowBk[0] +
- rowCj[0] + rowCk[0] + rowDj[0] + rowDk[0]) * 0.125F;
- res[1] = (rowAj[1] + rowAk[1] + rowBj[1] + rowBk[1] +
- rowCj[1] + rowCk[1] + rowDj[1] + rowDk[1]) * 0.125F;
- res[2] = (rowAj[2] + rowAk[2] + rowBj[2] + rowBk[2] +
- rowCj[2] + rowCk[2] + rowDj[2] + rowDk[2]) * 0.125F;
- dst[i] = float3_to_rgb9e5(res);
- }
- }
-
- else if (datatype == GL_UNSIGNED_INT_10F_11F_11F_REV && comps == 3) {
- DECLARE_ROW_POINTERS0(GLuint);
-
- GLfloat res[3];
- GLfloat rowAj[3], rowBj[3], rowCj[3], rowDj[3];
- GLfloat rowAk[3], rowBk[3], rowCk[3], rowDk[3];
-
- for (i = j = 0, k = k0; i < (GLuint) dstWidth;
- i++, j += colStride, k += colStride) {
- r11g11b10f_to_float3(rowA[j], rowAj);
- r11g11b10f_to_float3(rowB[j], rowBj);
- r11g11b10f_to_float3(rowC[j], rowCj);
- r11g11b10f_to_float3(rowD[j], rowDj);
- r11g11b10f_to_float3(rowA[k], rowAk);
- r11g11b10f_to_float3(rowB[k], rowBk);
- r11g11b10f_to_float3(rowC[k], rowCk);
- r11g11b10f_to_float3(rowD[k], rowDk);
- res[0] = (rowAj[0] + rowAk[0] + rowBj[0] + rowBk[0] +
- rowCj[0] + rowCk[0] + rowDj[0] + rowDk[0]) * 0.125F;
- res[1] = (rowAj[1] + rowAk[1] + rowBj[1] + rowBk[1] +
- rowCj[1] + rowCk[1] + rowDj[1] + rowDk[1]) * 0.125F;
- res[2] = (rowAj[2] + rowAk[2] + rowBj[2] + rowBk[2] +
- rowCj[2] + rowCk[2] + rowDj[2] + rowDk[2]) * 0.125F;
- dst[i] = float3_to_r11g11b10f(res);
- }
- }
-
- else {
- _mesa_problem(NULL, "bad format in do_row()");
- }
-}
-
-
-/*
- * These functions generate a 1/2-size mipmap image from a source image.
- * Texture borders are handled by copying or averaging the source image's
- * border texels, depending on the scale-down factor.
- */
-
-static void
-make_1d_mipmap(GLenum datatype, GLuint comps, GLint border,
- GLint srcWidth, const GLubyte *srcPtr,
- GLint dstWidth, GLubyte *dstPtr)
-{
- const GLint bpt = bytes_per_pixel(datatype, comps);
- const GLubyte *src;
- GLubyte *dst;
-
- /* skip the border pixel, if any */
- src = srcPtr + border * bpt;
- dst = dstPtr + border * bpt;
-
- /* we just duplicate the input row, kind of hack, saves code */
- do_row(datatype, comps, srcWidth - 2 * border, src, src,
- dstWidth - 2 * border, dst);
-
- if (border) {
- /* copy left-most pixel from source */
- assert(dstPtr);
- assert(srcPtr);
- memcpy(dstPtr, srcPtr, bpt);
- /* copy right-most pixel from source */
- memcpy(dstPtr + (dstWidth - 1) * bpt,
- srcPtr + (srcWidth - 1) * bpt,
- bpt);
- }
-}
-
-
-static void
-make_2d_mipmap(GLenum datatype, GLuint comps, GLint border,
- GLint srcWidth, GLint srcHeight,
- const GLubyte *srcPtr, GLint srcRowStride,
- GLint dstWidth, GLint dstHeight,
- GLubyte *dstPtr, GLint dstRowStride)
-{
- const GLint bpt = bytes_per_pixel(datatype, comps);
- const GLint srcWidthNB = srcWidth - 2 * border; /* sizes w/out border */
- const GLint dstWidthNB = dstWidth - 2 * border;
- const GLint dstHeightNB = dstHeight - 2 * border;
- const GLint srcRowBytes = bpt * srcRowStride;
- const GLint dstRowBytes = bpt * dstRowStride;
- const GLubyte *srcA, *srcB;
- GLubyte *dst;
- GLint row, srcRowStep;
-
- /* Compute src and dst pointers, skipping any border */
- srcA = srcPtr + border * ((srcWidth + 1) * bpt);
- if (srcHeight > 1 && srcHeight > dstHeight) {
- /* sample from two source rows */
- srcB = srcA + srcRowBytes;
- srcRowStep = 2;
- }
- else {
- /* sample from one source row */
- srcB = srcA;
- srcRowStep = 1;
- }
-
- dst = dstPtr + border * ((dstWidth + 1) * bpt);
-
- for (row = 0; row < dstHeightNB; row++) {
- do_row(datatype, comps, srcWidthNB, srcA, srcB,
- dstWidthNB, dst);
- srcA += srcRowStep * srcRowBytes;
- srcB += srcRowStep * srcRowBytes;
- dst += dstRowBytes;
- }
-
- /* This is ugly but probably won't be used much */
- if (border > 0) {
- /* fill in dest border */
- /* lower-left border pixel */
- assert(dstPtr);
- assert(srcPtr);
- memcpy(dstPtr, srcPtr, bpt);
- /* lower-right border pixel */
- memcpy(dstPtr + (dstWidth - 1) * bpt,
- srcPtr + (srcWidth - 1) * bpt, bpt);
- /* upper-left border pixel */
- memcpy(dstPtr + dstWidth * (dstHeight - 1) * bpt,
- srcPtr + srcWidth * (srcHeight - 1) * bpt, bpt);
- /* upper-right border pixel */
- memcpy(dstPtr + (dstWidth * dstHeight - 1) * bpt,
- srcPtr + (srcWidth * srcHeight - 1) * bpt, bpt);
- /* lower border */
- do_row(datatype, comps, srcWidthNB,
- srcPtr + bpt,
- srcPtr + bpt,
- dstWidthNB, dstPtr + bpt);
- /* upper border */
- do_row(datatype, comps, srcWidthNB,
- srcPtr + (srcWidth * (srcHeight - 1) + 1) * bpt,
- srcPtr + (srcWidth * (srcHeight - 1) + 1) * bpt,
- dstWidthNB,
- dstPtr + (dstWidth * (dstHeight - 1) + 1) * bpt);
- /* left and right borders */
- if (srcHeight == dstHeight) {
- /* copy border pixel from src to dst */
- for (row = 1; row < srcHeight; row++) {
- memcpy(dstPtr + dstWidth * row * bpt,
- srcPtr + srcWidth * row * bpt, bpt);
- memcpy(dstPtr + (dstWidth * row + dstWidth - 1) * bpt,
- srcPtr + (srcWidth * row + srcWidth - 1) * bpt, bpt);
- }
- }
- else {
- /* average two src pixels each dest pixel */
- for (row = 0; row < dstHeightNB; row += 2) {
- do_row(datatype, comps, 1,
- srcPtr + (srcWidth * (row * 2 + 1)) * bpt,
- srcPtr + (srcWidth * (row * 2 + 2)) * bpt,
- 1, dstPtr + (dstWidth * row + 1) * bpt);
- do_row(datatype, comps, 1,
- srcPtr + (srcWidth * (row * 2 + 1) + srcWidth - 1) * bpt,
- srcPtr + (srcWidth * (row * 2 + 2) + srcWidth - 1) * bpt,
- 1, dstPtr + (dstWidth * row + 1 + dstWidth - 1) * bpt);
- }
- }
- }
-}
-
-
-static void
-make_3d_mipmap(GLenum datatype, GLuint comps, GLint border,
- GLint srcWidth, GLint srcHeight, GLint srcDepth,
- const GLubyte *srcPtr, GLint srcRowStride,
- GLint dstWidth, GLint dstHeight, GLint dstDepth,
- GLubyte *dstPtr, GLint dstRowStride)
-{
- const GLint bpt = bytes_per_pixel(datatype, comps);
- const GLint srcWidthNB = srcWidth - 2 * border; /* sizes w/out border */
- const GLint srcDepthNB = srcDepth - 2 * border;
- const GLint dstWidthNB = dstWidth - 2 * border;
- const GLint dstHeightNB = dstHeight - 2 * border;
- const GLint dstDepthNB = dstDepth - 2 * border;
- GLint img, row;
- GLint bytesPerSrcImage, bytesPerDstImage;
- GLint bytesPerSrcRow, bytesPerDstRow;
- GLint srcImageOffset, srcRowOffset;
-
- (void) srcDepthNB; /* silence warnings */
-
-
- bytesPerSrcImage = srcWidth * srcHeight * bpt;
- bytesPerDstImage = dstWidth * dstHeight * bpt;
-
- bytesPerSrcRow = srcWidth * bpt;
- bytesPerDstRow = dstWidth * bpt;
-
- /* Offset between adjacent src images to be averaged together */
- srcImageOffset = (srcDepth == dstDepth) ? 0 : bytesPerSrcImage;
-
- /* Offset between adjacent src rows to be averaged together */
- srcRowOffset = (srcHeight == dstHeight) ? 0 : srcWidth * bpt;
-
- /*
- * Need to average together up to 8 src pixels for each dest pixel.
- * Break that down into 3 operations:
- * 1. take two rows from source image and average them together.
- * 2. take two rows from next source image and average them together.
- * 3. take the two averaged rows and average them for the final dst row.
- */
-
- /*
- printf("mip3d %d x %d x %d -> %d x %d x %d\n",
- srcWidth, srcHeight, srcDepth, dstWidth, dstHeight, dstDepth);
- */
-
- for (img = 0; img < dstDepthNB; img++) {
- /* first source image pointer, skipping border */
- const GLubyte *imgSrcA = srcPtr
- + (bytesPerSrcImage + bytesPerSrcRow + border) * bpt * border
- + img * (bytesPerSrcImage + srcImageOffset);
- /* second source image pointer, skipping border */
- const GLubyte *imgSrcB = imgSrcA + srcImageOffset;
- /* address of the dest image, skipping border */
- GLubyte *imgDst = dstPtr
- + (bytesPerDstImage + bytesPerDstRow + border) * bpt * border
- + img * bytesPerDstImage;
-
- /* setup the four source row pointers and the dest row pointer */
- const GLubyte *srcImgARowA = imgSrcA;
- const GLubyte *srcImgARowB = imgSrcA + srcRowOffset;
- const GLubyte *srcImgBRowA = imgSrcB;
- const GLubyte *srcImgBRowB = imgSrcB + srcRowOffset;
- GLubyte *dstImgRow = imgDst;
-
- for (row = 0; row < dstHeightNB; row++) {
- do_row_3D(datatype, comps, srcWidthNB,
- srcImgARowA, srcImgARowB,
- srcImgBRowA, srcImgBRowB,
- dstWidthNB, dstImgRow);
-
- /* advance to next rows */
- srcImgARowA += bytesPerSrcRow + srcRowOffset;
- srcImgARowB += bytesPerSrcRow + srcRowOffset;
- srcImgBRowA += bytesPerSrcRow + srcRowOffset;
- srcImgBRowB += bytesPerSrcRow + srcRowOffset;
- dstImgRow += bytesPerDstRow;
- }
- }
-
-
- /* Luckily we can leverage the make_2d_mipmap() function here! */
- if (border > 0) {
- /* do front border image */
- make_2d_mipmap(datatype, comps, 1, srcWidth, srcHeight, srcPtr, srcRowStride,
- dstWidth, dstHeight, dstPtr, dstRowStride);
- /* do back border image */
- make_2d_mipmap(datatype, comps, 1, srcWidth, srcHeight,
- srcPtr + bytesPerSrcImage * (srcDepth - 1), srcRowStride,
- dstWidth, dstHeight,
- dstPtr + bytesPerDstImage * (dstDepth - 1), dstRowStride);
- /* do four remaining border edges that span the image slices */
- if (srcDepth == dstDepth) {
- /* just copy border pixels from src to dst */
- for (img = 0; img < dstDepthNB; img++) {
- const GLubyte *src;
- GLubyte *dst;
-
- /* do border along [img][row=0][col=0] */
- src = srcPtr + (img + 1) * bytesPerSrcImage;
- dst = dstPtr + (img + 1) * bytesPerDstImage;
- memcpy(dst, src, bpt);
-
- /* do border along [img][row=dstHeight-1][col=0] */
- src = srcPtr + (img * 2 + 1) * bytesPerSrcImage
- + (srcHeight - 1) * bytesPerSrcRow;
- dst = dstPtr + (img + 1) * bytesPerDstImage
- + (dstHeight - 1) * bytesPerDstRow;
- memcpy(dst, src, bpt);
-
- /* do border along [img][row=0][col=dstWidth-1] */
- src = srcPtr + (img * 2 + 1) * bytesPerSrcImage
- + (srcWidth - 1) * bpt;
- dst = dstPtr + (img + 1) * bytesPerDstImage
- + (dstWidth - 1) * bpt;
- memcpy(dst, src, bpt);
-
- /* do border along [img][row=dstHeight-1][col=dstWidth-1] */
- src = srcPtr + (img * 2 + 1) * bytesPerSrcImage
- + (bytesPerSrcImage - bpt);
- dst = dstPtr + (img + 1) * bytesPerDstImage
- + (bytesPerDstImage - bpt);
- memcpy(dst, src, bpt);
- }
- }
- else {
- /* average border pixels from adjacent src image pairs */
- ASSERT(srcDepthNB == 2 * dstDepthNB);
- for (img = 0; img < dstDepthNB; img++) {
- const GLubyte *src;
- GLubyte *dst;
-
- /* do border along [img][row=0][col=0] */
- src = srcPtr + (img * 2 + 1) * bytesPerSrcImage;
- dst = dstPtr + (img + 1) * bytesPerDstImage;
- do_row(datatype, comps, 1, src, src + srcImageOffset, 1, dst);
-
- /* do border along [img][row=dstHeight-1][col=0] */
- src = srcPtr + (img * 2 + 1) * bytesPerSrcImage
- + (srcHeight - 1) * bytesPerSrcRow;
- dst = dstPtr + (img + 1) * bytesPerDstImage
- + (dstHeight - 1) * bytesPerDstRow;
- do_row(datatype, comps, 1, src, src + srcImageOffset, 1, dst);
-
- /* do border along [img][row=0][col=dstWidth-1] */
- src = srcPtr + (img * 2 + 1) * bytesPerSrcImage
- + (srcWidth - 1) * bpt;
- dst = dstPtr + (img + 1) * bytesPerDstImage
- + (dstWidth - 1) * bpt;
- do_row(datatype, comps, 1, src, src + srcImageOffset, 1, dst);
-
- /* do border along [img][row=dstHeight-1][col=dstWidth-1] */
- src = srcPtr + (img * 2 + 1) * bytesPerSrcImage
- + (bytesPerSrcImage - bpt);
- dst = dstPtr + (img + 1) * bytesPerDstImage
- + (bytesPerDstImage - bpt);
- do_row(datatype, comps, 1, src, src + srcImageOffset, 1, dst);
- }
- }
- }
-}
-
-
-static void
-make_1d_stack_mipmap(GLenum datatype, GLuint comps, GLint border,
- GLint srcWidth, const GLubyte *srcPtr, GLuint srcRowStride,
- GLint dstWidth, GLint dstHeight,
- GLubyte *dstPtr, GLuint dstRowStride )
-{
- const GLint bpt = bytes_per_pixel(datatype, comps);
- const GLint srcWidthNB = srcWidth - 2 * border; /* sizes w/out border */
- const GLint dstWidthNB = dstWidth - 2 * border;
- const GLint dstHeightNB = dstHeight - 2 * border;
- const GLint srcRowBytes = bpt * srcRowStride;
- const GLint dstRowBytes = bpt * dstRowStride;
- const GLubyte *src;
- GLubyte *dst;
- GLint row;
-
- /* Compute src and dst pointers, skipping any border */
- src = srcPtr + border * ((srcWidth + 1) * bpt);
- dst = dstPtr + border * ((dstWidth + 1) * bpt);
-
- for (row = 0; row < dstHeightNB; row++) {
- do_row(datatype, comps, srcWidthNB, src, src,
- dstWidthNB, dst);
- src += srcRowBytes;
- dst += dstRowBytes;
- }
-
- if (border) {
- /* copy left-most pixel from source */
- assert(dstPtr);
- assert(srcPtr);
- memcpy(dstPtr, srcPtr, bpt);
- /* copy right-most pixel from source */
- memcpy(dstPtr + (dstWidth - 1) * bpt,
- srcPtr + (srcWidth - 1) * bpt,
- bpt);
- }
-}
-
-
-/**
- * \bug
- * There is quite a bit of refactoring that could be done with this function
- * and \c make_2d_mipmap.
- */
-static void
-make_2d_stack_mipmap(GLenum datatype, GLuint comps, GLint border,
- GLint srcWidth, GLint srcHeight,
- const GLubyte *srcPtr, GLint srcRowStride,
- GLint dstWidth, GLint dstHeight, GLint dstDepth,
- GLubyte *dstPtr, GLint dstRowStride)
-{
- const GLint bpt = bytes_per_pixel(datatype, comps);
- const GLint srcWidthNB = srcWidth - 2 * border; /* sizes w/out border */
- const GLint dstWidthNB = dstWidth - 2 * border;
- const GLint dstHeightNB = dstHeight - 2 * border;
- const GLint dstDepthNB = dstDepth - 2 * border;
- const GLint srcRowBytes = bpt * srcRowStride;
- const GLint dstRowBytes = bpt * dstRowStride;
- const GLubyte *srcA, *srcB;
- GLubyte *dst;
- GLint layer;
- GLint row;
-
- /* Compute src and dst pointers, skipping any border */
- srcA = srcPtr + border * ((srcWidth + 1) * bpt);
- if (srcHeight > 1)
- srcB = srcA + srcRowBytes;
- else
- srcB = srcA;
- dst = dstPtr + border * ((dstWidth + 1) * bpt);
-
- for (layer = 0; layer < dstDepthNB; layer++) {
- for (row = 0; row < dstHeightNB; row++) {
- do_row(datatype, comps, srcWidthNB, srcA, srcB,
- dstWidthNB, dst);
- srcA += 2 * srcRowBytes;
- srcB += 2 * srcRowBytes;
- dst += dstRowBytes;
- }
-
- /* This is ugly but probably won't be used much */
- if (border > 0) {
- /* fill in dest border */
- /* lower-left border pixel */
- assert(dstPtr);
- assert(srcPtr);
- memcpy(dstPtr, srcPtr, bpt);
- /* lower-right border pixel */
- memcpy(dstPtr + (dstWidth - 1) * bpt,
- srcPtr + (srcWidth - 1) * bpt, bpt);
- /* upper-left border pixel */
- memcpy(dstPtr + dstWidth * (dstHeight - 1) * bpt,
- srcPtr + srcWidth * (srcHeight - 1) * bpt, bpt);
- /* upper-right border pixel */
- memcpy(dstPtr + (dstWidth * dstHeight - 1) * bpt,
- srcPtr + (srcWidth * srcHeight - 1) * bpt, bpt);
- /* lower border */
- do_row(datatype, comps, srcWidthNB,
- srcPtr + bpt,
- srcPtr + bpt,
- dstWidthNB, dstPtr + bpt);
- /* upper border */
- do_row(datatype, comps, srcWidthNB,
- srcPtr + (srcWidth * (srcHeight - 1) + 1) * bpt,
- srcPtr + (srcWidth * (srcHeight - 1) + 1) * bpt,
- dstWidthNB,
- dstPtr + (dstWidth * (dstHeight - 1) + 1) * bpt);
- /* left and right borders */
- if (srcHeight == dstHeight) {
- /* copy border pixel from src to dst */
- for (row = 1; row < srcHeight; row++) {
- memcpy(dstPtr + dstWidth * row * bpt,
- srcPtr + srcWidth * row * bpt, bpt);
- memcpy(dstPtr + (dstWidth * row + dstWidth - 1) * bpt,
- srcPtr + (srcWidth * row + srcWidth - 1) * bpt, bpt);
- }
- }
- else {
- /* average two src pixels each dest pixel */
- for (row = 0; row < dstHeightNB; row += 2) {
- do_row(datatype, comps, 1,
- srcPtr + (srcWidth * (row * 2 + 1)) * bpt,
- srcPtr + (srcWidth * (row * 2 + 2)) * bpt,
- 1, dstPtr + (dstWidth * row + 1) * bpt);
- do_row(datatype, comps, 1,
- srcPtr + (srcWidth * (row * 2 + 1) + srcWidth - 1) * bpt,
- srcPtr + (srcWidth * (row * 2 + 2) + srcWidth - 1) * bpt,
- 1, dstPtr + (dstWidth * row + 1 + dstWidth - 1) * bpt);
- }
- }
- }
- }
-}
-
-
-/**
- * Down-sample a texture image to produce the next lower mipmap level.
- * \param comps components per texel (1, 2, 3 or 4)
- * \param srcRowStride stride between source rows, in texels
- * \param dstRowStride stride between destination rows, in texels
- */
-void
-_mesa_generate_mipmap_level(GLenum target,
- GLenum datatype, GLuint comps,
- GLint border,
- GLint srcWidth, GLint srcHeight, GLint srcDepth,
- const GLubyte *srcData,
- GLint srcRowStride,
- GLint dstWidth, GLint dstHeight, GLint dstDepth,
- GLubyte *dstData,
- GLint dstRowStride)
-{
- /*
- * We use simple 2x2 averaging to compute the next mipmap level.
- */
- switch (target) {
- case GL_TEXTURE_1D:
- make_1d_mipmap(datatype, comps, border,
- srcWidth, srcData,
- dstWidth, dstData);
- break;
- case GL_TEXTURE_2D:
- case GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB:
- case GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB:
- case GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB:
- case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB:
- case GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB:
- case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB:
- make_2d_mipmap(datatype, comps, border,
- srcWidth, srcHeight, srcData, srcRowStride,
- dstWidth, dstHeight, dstData, dstRowStride);
- break;
- case GL_TEXTURE_3D:
- make_3d_mipmap(datatype, comps, border,
- srcWidth, srcHeight, srcDepth,
- srcData, srcRowStride,
- dstWidth, dstHeight, dstDepth,
- dstData, dstRowStride);
- break;
- case GL_TEXTURE_1D_ARRAY_EXT:
- make_1d_stack_mipmap(datatype, comps, border,
- srcWidth, srcData, srcRowStride,
- dstWidth, dstHeight,
- dstData, dstRowStride);
- break;
- case GL_TEXTURE_2D_ARRAY_EXT:
- make_2d_stack_mipmap(datatype, comps, border,
- srcWidth, srcHeight,
- srcData, srcRowStride,
- dstWidth, dstHeight,
- dstDepth, dstData, dstRowStride);
- break;
- case GL_TEXTURE_RECTANGLE_NV:
- /* no mipmaps, do nothing */
- break;
- default:
- _mesa_problem(NULL, "bad dimensions in _mesa_generate_mipmaps");
- return;
- }
-}
-
-
-/**
- * compute next (level+1) image size
- * \return GL_FALSE if no smaller size can be generated (eg. src is 1x1x1 size)
- */
-static GLboolean
-next_mipmap_level_size(GLenum target, GLint border,
- GLint srcWidth, GLint srcHeight, GLint srcDepth,
- GLint *dstWidth, GLint *dstHeight, GLint *dstDepth)
-{
- if (srcWidth - 2 * border > 1) {
- *dstWidth = (srcWidth - 2 * border) / 2 + 2 * border;
- }
- else {
- *dstWidth = srcWidth; /* can't go smaller */
- }
-
- if ((srcHeight - 2 * border > 1) &&
- (target != GL_TEXTURE_1D_ARRAY_EXT)) {
- *dstHeight = (srcHeight - 2 * border) / 2 + 2 * border;
- }
- else {
- *dstHeight = srcHeight; /* can't go smaller */
- }
-
- if ((srcDepth - 2 * border > 1) &&
- (target != GL_TEXTURE_2D_ARRAY_EXT)) {
- *dstDepth = (srcDepth - 2 * border) / 2 + 2 * border;
- }
- else {
- *dstDepth = srcDepth; /* can't go smaller */
- }
-
- if (*dstWidth == srcWidth &&
- *dstHeight == srcHeight &&
- *dstDepth == srcDepth) {
- return GL_FALSE;
- }
- else {
- return GL_TRUE;
- }
-}
-
-
-
-
-/**
- * Automatic mipmap generation.
- * This is the fallback/default function for ctx->Driver.GenerateMipmap().
- * Generate a complete set of mipmaps from texObj's BaseLevel image.
- * Stop at texObj's MaxLevel or when we get to the 1x1 texture.
- * For cube maps, target will be one of
- * GL_TEXTURE_CUBE_MAP_POSITIVE/NEGATIVE_X/Y/Z; never GL_TEXTURE_CUBE_MAP.
- */
-void
-_mesa_generate_mipmap(struct gl_context *ctx, GLenum target,
- struct gl_texture_object *texObj)
-{
- const struct gl_texture_image *srcImage;
- gl_format convertFormat;
- const GLubyte *srcData = NULL;
- GLubyte *dstData = NULL;
- GLint level, maxLevels;
- GLenum datatype;
- GLuint comps;
-
- ASSERT(texObj);
- srcImage = _mesa_select_tex_image(ctx, texObj, target, texObj->BaseLevel);
- ASSERT(srcImage);
-
- maxLevels = _mesa_max_texture_levels(ctx, texObj->Target);
- ASSERT(maxLevels > 0); /* bad target */
-
- /* Find convertFormat - the format that do_row() will process */
-
- if (_mesa_is_format_compressed(srcImage->TexFormat)) {
- /* setup for compressed textures - need to allocate temporary
- * image buffers to hold uncompressed images.
- */
- GLuint row;
- GLint components, size;
- GLchan *dst;
-
- assert(texObj->Target == GL_TEXTURE_2D ||
- texObj->Target == GL_TEXTURE_CUBE_MAP_ARB);
-
- if (srcImage->_BaseFormat == GL_RGB) {
- convertFormat = MESA_FORMAT_RGB888;
- components = 3;
- } else if (srcImage->_BaseFormat == GL_RED) {
- convertFormat = MESA_FORMAT_R8;
- components = 1;
- } else if (srcImage->_BaseFormat == GL_RG) {
- convertFormat = MESA_FORMAT_RG88;
- components = 2;
- } else if (srcImage->_BaseFormat == GL_RGBA) {
- convertFormat = MESA_FORMAT_RGBA8888;
- components = 4;
- } else if (srcImage->_BaseFormat == GL_LUMINANCE) {
- convertFormat = MESA_FORMAT_L8;
- components = 1;
- } else if (srcImage->_BaseFormat == GL_LUMINANCE_ALPHA) {
- convertFormat = MESA_FORMAT_AL88;
- components = 2;
- } else {
- _mesa_problem(ctx, "bad srcImage->_BaseFormat in _mesa_generate_mipmaps");
- return;
- }
-
- /* allocate storage for uncompressed GL_RGB or GL_RGBA images */
- size = _mesa_bytes_per_pixel(srcImage->_BaseFormat, CHAN_TYPE)
- * srcImage->Width * srcImage->Height * srcImage->Depth + 20;
- /* 20 extra bytes, just be safe when calling last FetchTexel */
- srcData = (GLubyte *) malloc(size);
- if (!srcData) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "generate mipmaps");
- return;
- }
- dstData = (GLubyte *) malloc(size / 2); /* 1/4 would probably be OK */
- if (!dstData) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "generate mipmaps");
- free((void *) srcData);
- return;
- }
-
- /* decompress base image here */
- dst = (GLchan *) srcData;
- for (row = 0; row < srcImage->Height; row++) {
- GLuint col;
- for (col = 0; col < srcImage->Width; col++) {
- srcImage->FetchTexelc(srcImage, col, row, 0, dst);
- dst += components;
- }
- }
- }
- else {
- /* uncompressed */
- convertFormat = srcImage->TexFormat;
- }
-
- _mesa_format_to_type_and_comps(convertFormat, &datatype, &comps);
-
- for (level = texObj->BaseLevel; level < texObj->MaxLevel
- && level < maxLevels - 1; level++) {
- /* generate image[level+1] from image[level] */
- const struct gl_texture_image *srcImage;
- struct gl_texture_image *dstImage;
- GLint srcWidth, srcHeight, srcDepth;
- GLint dstWidth, dstHeight, dstDepth;
- GLint border;
- GLboolean nextLevel;
-
- /* get src image parameters */
- srcImage = _mesa_select_tex_image(ctx, texObj, target, level);
- ASSERT(srcImage);
- srcWidth = srcImage->Width;
- srcHeight = srcImage->Height;
- srcDepth = srcImage->Depth;
- border = srcImage->Border;
-
- nextLevel = next_mipmap_level_size(target, border,
- srcWidth, srcHeight, srcDepth,
- &dstWidth, &dstHeight, &dstDepth);
- if (!nextLevel) {
- /* all done */
- if (_mesa_is_format_compressed(srcImage->TexFormat)) {
- free((void *) srcData);
- free(dstData);
- }
- return;
- }
-
- /* get dest gl_texture_image */
- dstImage = _mesa_get_tex_image(ctx, texObj, target, level + 1);
- if (!dstImage) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "generating mipmaps");
- return;
- }
-
- /* Free old image data */
- if (dstImage->Data)
- ctx->Driver.FreeTexImageData(ctx, dstImage);
-
- /* initialize new image */
- _mesa_init_teximage_fields(ctx, target, dstImage, dstWidth, dstHeight,
- dstDepth, border, srcImage->InternalFormat,
- srcImage->TexFormat);
- dstImage->DriverData = NULL;
- dstImage->FetchTexelc = srcImage->FetchTexelc;
- dstImage->FetchTexelf = srcImage->FetchTexelf;
-
- /* Alloc new teximage data buffer */
- {
- GLuint size = _mesa_format_image_size(dstImage->TexFormat,
- dstWidth, dstHeight, dstDepth);
- dstImage->Data = _mesa_alloc_texmemory(size);
- if (!dstImage->Data) {
- _mesa_error(ctx, GL_OUT_OF_MEMORY, "generating mipmaps");
- return;
- }
- }
-
- /* Setup src and dest data pointers */
- if (_mesa_is_format_compressed(dstImage->TexFormat)) {
- /* srcData and dstData are already set */
- ASSERT(srcData);
- ASSERT(dstData);
- }
- else {
- srcData = (const GLubyte *) srcImage->Data;
- dstData = (GLubyte *) dstImage->Data;
- }
-
- ASSERT(dstImage->TexFormat);
- ASSERT(dstImage->FetchTexelc);
- ASSERT(dstImage->FetchTexelf);
-
- _mesa_generate_mipmap_level(target, datatype, comps, border,
- srcWidth, srcHeight, srcDepth,
- srcData, srcImage->RowStride,
- dstWidth, dstHeight, dstDepth,
- dstData, dstImage->RowStride);
-
-
- if (_mesa_is_format_compressed(dstImage->TexFormat)) {
- GLubyte *temp;
- /* compress image from dstData into dstImage->Data */
- const GLenum srcFormat = _mesa_get_format_base_format(convertFormat);
- GLint dstRowStride
- = _mesa_format_row_stride(dstImage->TexFormat, dstWidth);
-
- _mesa_texstore(ctx, 2, dstImage->_BaseFormat,
- dstImage->TexFormat,
- dstImage->Data,
- 0, 0, 0, /* dstX/Y/Zoffset */
- dstRowStride, 0, /* strides */
- dstWidth, dstHeight, 1, /* size */
- srcFormat, CHAN_TYPE,
- dstData, /* src data, actually */
- &ctx->DefaultPacking);
-
- /* swap src and dest pointers */
- temp = (GLubyte *) srcData;
- srcData = dstData;
- dstData = temp;
- }
-
- } /* loop over mipmap levels */
-}
-
-
-/**
- * Helper function for drivers which need to rescale texture images to
- * certain aspect ratios.
- * Nearest filtering only (for broken hardware that can't support
- * all aspect ratios). This can be made a lot faster, but I don't
- * really care enough...
- */
-void
-_mesa_rescale_teximage2d(GLuint bytesPerPixel,
- GLuint srcStrideInPixels,
- GLuint dstRowStride,
- GLint srcWidth, GLint srcHeight,
- GLint dstWidth, GLint dstHeight,
- const GLvoid *srcImage, GLvoid *dstImage)
-{
- GLint row, col;
-
-#define INNER_LOOP( TYPE, HOP, WOP ) \
- for ( row = 0 ; row < dstHeight ; row++ ) { \
- GLint srcRow = row HOP hScale; \
- for ( col = 0 ; col < dstWidth ; col++ ) { \
- GLint srcCol = col WOP wScale; \
- dst[col] = src[srcRow * srcStrideInPixels + srcCol]; \
- } \
- dst = (TYPE *) ((GLubyte *) dst + dstRowStride); \
- } \
-
-#define RESCALE_IMAGE( TYPE ) \
-do { \
- const TYPE *src = (const TYPE *)srcImage; \
- TYPE *dst = (TYPE *)dstImage; \
- \
- if ( srcHeight < dstHeight ) { \
- const GLint hScale = dstHeight / srcHeight; \
- if ( srcWidth < dstWidth ) { \
- const GLint wScale = dstWidth / srcWidth; \
- INNER_LOOP( TYPE, /, / ); \
- } \
- else { \
- const GLint wScale = srcWidth / dstWidth; \
- INNER_LOOP( TYPE, /, * ); \
- } \
- } \
- else { \
- const GLint hScale = srcHeight / dstHeight; \
- if ( srcWidth < dstWidth ) { \
- const GLint wScale = dstWidth / srcWidth; \
- INNER_LOOP( TYPE, *, / ); \
- } \
- else { \
- const GLint wScale = srcWidth / dstWidth; \
- INNER_LOOP( TYPE, *, * ); \
- } \
- } \
-} while (0)
-
- switch ( bytesPerPixel ) {
- case 4:
- RESCALE_IMAGE( GLuint );
- break;
-
- case 2:
- RESCALE_IMAGE( GLushort );
- break;
-
- case 1:
- RESCALE_IMAGE( GLubyte );
- break;
- default:
- _mesa_problem(NULL,"unexpected bytes/pixel in _mesa_rescale_teximage2d");
- }
-}
-
-
-/**
- * Upscale an image by replication, not (typical) stretching.
- * We use this when the image width or height is less than a
- * certain size (4, 8) and we need to upscale an image.
- */
-void
-_mesa_upscale_teximage2d(GLsizei inWidth, GLsizei inHeight,
- GLsizei outWidth, GLsizei outHeight,
- GLint comps, const GLchan *src, GLint srcRowStride,
- GLchan *dest )
-{
- GLint i, j, k;
-
- ASSERT(outWidth >= inWidth);
- ASSERT(outHeight >= inHeight);
-#if 0
- ASSERT(inWidth == 1 || inWidth == 2 || inHeight == 1 || inHeight == 2);
- ASSERT((outWidth & 3) == 0);
- ASSERT((outHeight & 3) == 0);
-#endif
-
- for (i = 0; i < outHeight; i++) {
- const GLint ii = i % inHeight;
- for (j = 0; j < outWidth; j++) {
- const GLint jj = j % inWidth;
- for (k = 0; k < comps; k++) {
- dest[(i * outWidth + j) * comps + k]
- = src[ii * srcRowStride + jj * comps + k];
- }
- }
- }
-}
-
+/* + * Mesa 3-D graphics library + * Version: 7.1 + * + * Copyright (C) 1999-2007 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 mipmap.c mipmap generation and teximage resizing functions. + */ + +#include "imports.h" +#include "formats.h" +#include "mipmap.h" +#include "mtypes.h" +#include "teximage.h" +#include "texstore.h" +#include "image.h" +#include "macros.h" +#include "../../gallium/auxiliary/util/u_format_rgb9e5.h" +#include "../../gallium/auxiliary/util/u_format_r11g11b10f.h" + + + +static GLint +bytes_per_pixel(GLenum datatype, GLuint comps) +{ + GLint b = _mesa_sizeof_packed_type(datatype); + assert(b >= 0); + + if (_mesa_type_is_packed(datatype)) + return b; + else + return b * comps; +} + + +/** + * \name Support macros for do_row and do_row_3d + * + * The macro madness is here for two reasons. First, it compacts the code + * slightly. Second, it makes it much easier to adjust the specifics of the + * filter to tune the rounding characteristics. + */ +/*@{*/ +#define DECLARE_ROW_POINTERS(t, e) \ + const t(*rowA)[e] = (const t(*)[e]) srcRowA; \ + const t(*rowB)[e] = (const t(*)[e]) srcRowB; \ + const t(*rowC)[e] = (const t(*)[e]) srcRowC; \ + const t(*rowD)[e] = (const t(*)[e]) srcRowD; \ + t(*dst)[e] = (t(*)[e]) dstRow + +#define DECLARE_ROW_POINTERS0(t) \ + const t *rowA = (const t *) srcRowA; \ + const t *rowB = (const t *) srcRowB; \ + const t *rowC = (const t *) srcRowC; \ + const t *rowD = (const t *) srcRowD; \ + t *dst = (t *) dstRow + +#define FILTER_SUM_3D(Aj, Ak, Bj, Bk, Cj, Ck, Dj, Dk) \ + ((unsigned) Aj + (unsigned) Ak \ + + (unsigned) Bj + (unsigned) Bk \ + + (unsigned) Cj + (unsigned) Ck \ + + (unsigned) Dj + (unsigned) Dk \ + + 4) >> 3 + +#define FILTER_3D(e) \ + do { \ + dst[i][e] = FILTER_SUM_3D(rowA[j][e], rowA[k][e], \ + rowB[j][e], rowB[k][e], \ + rowC[j][e], rowC[k][e], \ + rowD[j][e], rowD[k][e]); \ + } while(0) + +#define FILTER_SUM_3D_SIGNED(Aj, Ak, Bj, Bk, Cj, Ck, Dj, Dk) \ + (Aj + Ak \ + + Bj + Bk \ + + Cj + Ck \ + + Dj + Dk \ + + 4) / 8 + +#define FILTER_3D_SIGNED(e) \ + do { \ + dst[i][e] = FILTER_SUM_3D_SIGNED(rowA[j][e], rowA[k][e], \ + rowB[j][e], rowB[k][e], \ + rowC[j][e], rowC[k][e], \ + rowD[j][e], rowD[k][e]); \ + } while(0) + +#define FILTER_F_3D(e) \ + do { \ + dst[i][e] = (rowA[j][e] + rowA[k][e] \ + + rowB[j][e] + rowB[k][e] \ + + rowC[j][e] + rowC[k][e] \ + + rowD[j][e] + rowD[k][e]) * 0.125F; \ + } while(0) + +#define FILTER_HF_3D(e) \ + do { \ + const GLfloat aj = _mesa_half_to_float(rowA[j][e]); \ + const GLfloat ak = _mesa_half_to_float(rowA[k][e]); \ + const GLfloat bj = _mesa_half_to_float(rowB[j][e]); \ + const GLfloat bk = _mesa_half_to_float(rowB[k][e]); \ + const GLfloat cj = _mesa_half_to_float(rowC[j][e]); \ + const GLfloat ck = _mesa_half_to_float(rowC[k][e]); \ + const GLfloat dj = _mesa_half_to_float(rowD[j][e]); \ + const GLfloat dk = _mesa_half_to_float(rowD[k][e]); \ + dst[i][e] = _mesa_float_to_half((aj + ak + bj + bk + cj + ck + dj + dk) \ + * 0.125F); \ + } while(0) +/*@}*/ + + +/** + * Average together two rows of a source image to produce a single new + * row in the dest image. It's legal for the two source rows to point + * to the same data. The source width must be equal to either the + * dest width or two times the dest width. + * \param datatype GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, GL_FLOAT, etc. + * \param comps number of components per pixel (1..4) + */ +static void +do_row(GLenum datatype, GLuint comps, GLint srcWidth, + const GLvoid *srcRowA, const GLvoid *srcRowB, + GLint dstWidth, GLvoid *dstRow) +{ + const GLuint k0 = (srcWidth == dstWidth) ? 0 : 1; + const GLuint colStride = (srcWidth == dstWidth) ? 1 : 2; + + ASSERT(comps >= 1); + ASSERT(comps <= 4); + + /* This assertion is no longer valid with non-power-of-2 textures + assert(srcWidth == dstWidth || srcWidth == 2 * dstWidth); + */ + + if (datatype == GL_UNSIGNED_BYTE && comps == 4) { + GLuint i, j, k; + const GLubyte(*rowA)[4] = (const GLubyte(*)[4]) srcRowA; + const GLubyte(*rowB)[4] = (const GLubyte(*)[4]) srcRowB; + GLubyte(*dst)[4] = (GLubyte(*)[4]) dstRow; + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + dst[i][0] = (rowA[j][0] + rowA[k][0] + rowB[j][0] + rowB[k][0]) / 4; + dst[i][1] = (rowA[j][1] + rowA[k][1] + rowB[j][1] + rowB[k][1]) / 4; + dst[i][2] = (rowA[j][2] + rowA[k][2] + rowB[j][2] + rowB[k][2]) / 4; + dst[i][3] = (rowA[j][3] + rowA[k][3] + rowB[j][3] + rowB[k][3]) / 4; + } + } + else if (datatype == GL_UNSIGNED_BYTE && comps == 3) { + GLuint i, j, k; + const GLubyte(*rowA)[3] = (const GLubyte(*)[3]) srcRowA; + const GLubyte(*rowB)[3] = (const GLubyte(*)[3]) srcRowB; + GLubyte(*dst)[3] = (GLubyte(*)[3]) dstRow; + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + dst[i][0] = (rowA[j][0] + rowA[k][0] + rowB[j][0] + rowB[k][0]) / 4; + dst[i][1] = (rowA[j][1] + rowA[k][1] + rowB[j][1] + rowB[k][1]) / 4; + dst[i][2] = (rowA[j][2] + rowA[k][2] + rowB[j][2] + rowB[k][2]) / 4; + } + } + else if (datatype == GL_UNSIGNED_BYTE && comps == 2) { + GLuint i, j, k; + const GLubyte(*rowA)[2] = (const GLubyte(*)[2]) srcRowA; + const GLubyte(*rowB)[2] = (const GLubyte(*)[2]) srcRowB; + GLubyte(*dst)[2] = (GLubyte(*)[2]) dstRow; + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + dst[i][0] = (rowA[j][0] + rowA[k][0] + rowB[j][0] + rowB[k][0]) >> 2; + dst[i][1] = (rowA[j][1] + rowA[k][1] + rowB[j][1] + rowB[k][1]) >> 2; + } + } + else if (datatype == GL_UNSIGNED_BYTE && comps == 1) { + GLuint i, j, k; + const GLubyte *rowA = (const GLubyte *) srcRowA; + const GLubyte *rowB = (const GLubyte *) srcRowB; + GLubyte *dst = (GLubyte *) dstRow; + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + dst[i] = (rowA[j] + rowA[k] + rowB[j] + rowB[k]) >> 2; + } + } + + else if (datatype == GL_BYTE && comps == 4) { + GLuint i, j, k; + const GLbyte(*rowA)[4] = (const GLbyte(*)[4]) srcRowA; + const GLbyte(*rowB)[4] = (const GLbyte(*)[4]) srcRowB; + GLbyte(*dst)[4] = (GLbyte(*)[4]) dstRow; + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + dst[i][0] = (rowA[j][0] + rowA[k][0] + rowB[j][0] + rowB[k][0]) / 4; + dst[i][1] = (rowA[j][1] + rowA[k][1] + rowB[j][1] + rowB[k][1]) / 4; + dst[i][2] = (rowA[j][2] + rowA[k][2] + rowB[j][2] + rowB[k][2]) / 4; + dst[i][3] = (rowA[j][3] + rowA[k][3] + rowB[j][3] + rowB[k][3]) / 4; + } + } + else if (datatype == GL_BYTE && comps == 3) { + GLuint i, j, k; + const GLbyte(*rowA)[3] = (const GLbyte(*)[3]) srcRowA; + const GLbyte(*rowB)[3] = (const GLbyte(*)[3]) srcRowB; + GLbyte(*dst)[3] = (GLbyte(*)[3]) dstRow; + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + dst[i][0] = (rowA[j][0] + rowA[k][0] + rowB[j][0] + rowB[k][0]) / 4; + dst[i][1] = (rowA[j][1] + rowA[k][1] + rowB[j][1] + rowB[k][1]) / 4; + dst[i][2] = (rowA[j][2] + rowA[k][2] + rowB[j][2] + rowB[k][2]) / 4; + } + } + else if (datatype == GL_BYTE && comps == 2) { + GLuint i, j, k; + const GLbyte(*rowA)[2] = (const GLbyte(*)[2]) srcRowA; + const GLbyte(*rowB)[2] = (const GLbyte(*)[2]) srcRowB; + GLbyte(*dst)[2] = (GLbyte(*)[2]) dstRow; + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + dst[i][0] = (rowA[j][0] + rowA[k][0] + rowB[j][0] + rowB[k][0]) / 4; + dst[i][1] = (rowA[j][1] + rowA[k][1] + rowB[j][1] + rowB[k][1]) / 4; + } + } + else if (datatype == GL_BYTE && comps == 1) { + GLuint i, j, k; + const GLbyte *rowA = (const GLbyte *) srcRowA; + const GLbyte *rowB = (const GLbyte *) srcRowB; + GLbyte *dst = (GLbyte *) dstRow; + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + dst[i] = (rowA[j] + rowA[k] + rowB[j] + rowB[k]) / 4; + } + } + + else if (datatype == GL_UNSIGNED_SHORT && comps == 4) { + GLuint i, j, k; + const GLushort(*rowA)[4] = (const GLushort(*)[4]) srcRowA; + const GLushort(*rowB)[4] = (const GLushort(*)[4]) srcRowB; + GLushort(*dst)[4] = (GLushort(*)[4]) dstRow; + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + dst[i][0] = (rowA[j][0] + rowA[k][0] + rowB[j][0] + rowB[k][0]) / 4; + dst[i][1] = (rowA[j][1] + rowA[k][1] + rowB[j][1] + rowB[k][1]) / 4; + dst[i][2] = (rowA[j][2] + rowA[k][2] + rowB[j][2] + rowB[k][2]) / 4; + dst[i][3] = (rowA[j][3] + rowA[k][3] + rowB[j][3] + rowB[k][3]) / 4; + } + } + else if (datatype == GL_UNSIGNED_SHORT && comps == 3) { + GLuint i, j, k; + const GLushort(*rowA)[3] = (const GLushort(*)[3]) srcRowA; + const GLushort(*rowB)[3] = (const GLushort(*)[3]) srcRowB; + GLushort(*dst)[3] = (GLushort(*)[3]) dstRow; + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + dst[i][0] = (rowA[j][0] + rowA[k][0] + rowB[j][0] + rowB[k][0]) / 4; + dst[i][1] = (rowA[j][1] + rowA[k][1] + rowB[j][1] + rowB[k][1]) / 4; + dst[i][2] = (rowA[j][2] + rowA[k][2] + rowB[j][2] + rowB[k][2]) / 4; + } + } + else if (datatype == GL_UNSIGNED_SHORT && comps == 2) { + GLuint i, j, k; + const GLushort(*rowA)[2] = (const GLushort(*)[2]) srcRowA; + const GLushort(*rowB)[2] = (const GLushort(*)[2]) srcRowB; + GLushort(*dst)[2] = (GLushort(*)[2]) dstRow; + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + dst[i][0] = (rowA[j][0] + rowA[k][0] + rowB[j][0] + rowB[k][0]) / 4; + dst[i][1] = (rowA[j][1] + rowA[k][1] + rowB[j][1] + rowB[k][1]) / 4; + } + } + else if (datatype == GL_UNSIGNED_SHORT && comps == 1) { + GLuint i, j, k; + const GLushort *rowA = (const GLushort *) srcRowA; + const GLushort *rowB = (const GLushort *) srcRowB; + GLushort *dst = (GLushort *) dstRow; + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + dst[i] = (rowA[j] + rowA[k] + rowB[j] + rowB[k]) / 4; + } + } + + else if (datatype == GL_SHORT && comps == 4) { + GLuint i, j, k; + const GLshort(*rowA)[4] = (const GLshort(*)[4]) srcRowA; + const GLshort(*rowB)[4] = (const GLshort(*)[4]) srcRowB; + GLshort(*dst)[4] = (GLshort(*)[4]) dstRow; + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + dst[i][0] = (rowA[j][0] + rowA[k][0] + rowB[j][0] + rowB[k][0]) / 4; + dst[i][1] = (rowA[j][1] + rowA[k][1] + rowB[j][1] + rowB[k][1]) / 4; + dst[i][2] = (rowA[j][2] + rowA[k][2] + rowB[j][2] + rowB[k][2]) / 4; + dst[i][3] = (rowA[j][3] + rowA[k][3] + rowB[j][3] + rowB[k][3]) / 4; + } + } + else if (datatype == GL_SHORT && comps == 3) { + GLuint i, j, k; + const GLshort(*rowA)[3] = (const GLshort(*)[3]) srcRowA; + const GLshort(*rowB)[3] = (const GLshort(*)[3]) srcRowB; + GLshort(*dst)[3] = (GLshort(*)[3]) dstRow; + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + dst[i][0] = (rowA[j][0] + rowA[k][0] + rowB[j][0] + rowB[k][0]) / 4; + dst[i][1] = (rowA[j][1] + rowA[k][1] + rowB[j][1] + rowB[k][1]) / 4; + dst[i][2] = (rowA[j][2] + rowA[k][2] + rowB[j][2] + rowB[k][2]) / 4; + } + } + else if (datatype == GL_SHORT && comps == 2) { + GLuint i, j, k; + const GLshort(*rowA)[2] = (const GLshort(*)[2]) srcRowA; + const GLshort(*rowB)[2] = (const GLshort(*)[2]) srcRowB; + GLshort(*dst)[2] = (GLshort(*)[2]) dstRow; + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + dst[i][0] = (rowA[j][0] + rowA[k][0] + rowB[j][0] + rowB[k][0]) / 4; + dst[i][1] = (rowA[j][1] + rowA[k][1] + rowB[j][1] + rowB[k][1]) / 4; + } + } + else if (datatype == GL_SHORT && comps == 1) { + GLuint i, j, k; + const GLshort *rowA = (const GLshort *) srcRowA; + const GLshort *rowB = (const GLshort *) srcRowB; + GLshort *dst = (GLshort *) dstRow; + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + dst[i] = (rowA[j] + rowA[k] + rowB[j] + rowB[k]) / 4; + } + } + + else if (datatype == GL_FLOAT && comps == 4) { + GLuint i, j, k; + const GLfloat(*rowA)[4] = (const GLfloat(*)[4]) srcRowA; + const GLfloat(*rowB)[4] = (const GLfloat(*)[4]) srcRowB; + GLfloat(*dst)[4] = (GLfloat(*)[4]) dstRow; + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + dst[i][0] = (rowA[j][0] + rowA[k][0] + + rowB[j][0] + rowB[k][0]) * 0.25F; + dst[i][1] = (rowA[j][1] + rowA[k][1] + + rowB[j][1] + rowB[k][1]) * 0.25F; + dst[i][2] = (rowA[j][2] + rowA[k][2] + + rowB[j][2] + rowB[k][2]) * 0.25F; + dst[i][3] = (rowA[j][3] + rowA[k][3] + + rowB[j][3] + rowB[k][3]) * 0.25F; + } + } + else if (datatype == GL_FLOAT && comps == 3) { + GLuint i, j, k; + const GLfloat(*rowA)[3] = (const GLfloat(*)[3]) srcRowA; + const GLfloat(*rowB)[3] = (const GLfloat(*)[3]) srcRowB; + GLfloat(*dst)[3] = (GLfloat(*)[3]) dstRow; + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + dst[i][0] = (rowA[j][0] + rowA[k][0] + + rowB[j][0] + rowB[k][0]) * 0.25F; + dst[i][1] = (rowA[j][1] + rowA[k][1] + + rowB[j][1] + rowB[k][1]) * 0.25F; + dst[i][2] = (rowA[j][2] + rowA[k][2] + + rowB[j][2] + rowB[k][2]) * 0.25F; + } + } + else if (datatype == GL_FLOAT && comps == 2) { + GLuint i, j, k; + const GLfloat(*rowA)[2] = (const GLfloat(*)[2]) srcRowA; + const GLfloat(*rowB)[2] = (const GLfloat(*)[2]) srcRowB; + GLfloat(*dst)[2] = (GLfloat(*)[2]) dstRow; + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + dst[i][0] = (rowA[j][0] + rowA[k][0] + + rowB[j][0] + rowB[k][0]) * 0.25F; + dst[i][1] = (rowA[j][1] + rowA[k][1] + + rowB[j][1] + rowB[k][1]) * 0.25F; + } + } + else if (datatype == GL_FLOAT && comps == 1) { + GLuint i, j, k; + const GLfloat *rowA = (const GLfloat *) srcRowA; + const GLfloat *rowB = (const GLfloat *) srcRowB; + GLfloat *dst = (GLfloat *) dstRow; + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + dst[i] = (rowA[j] + rowA[k] + rowB[j] + rowB[k]) * 0.25F; + } + } + + else if (datatype == GL_HALF_FLOAT_ARB && comps == 4) { + GLuint i, j, k, comp; + const GLhalfARB(*rowA)[4] = (const GLhalfARB(*)[4]) srcRowA; + const GLhalfARB(*rowB)[4] = (const GLhalfARB(*)[4]) srcRowB; + GLhalfARB(*dst)[4] = (GLhalfARB(*)[4]) dstRow; + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + for (comp = 0; comp < 4; comp++) { + GLfloat aj, ak, bj, bk; + aj = _mesa_half_to_float(rowA[j][comp]); + ak = _mesa_half_to_float(rowA[k][comp]); + bj = _mesa_half_to_float(rowB[j][comp]); + bk = _mesa_half_to_float(rowB[k][comp]); + dst[i][comp] = _mesa_float_to_half((aj + ak + bj + bk) * 0.25F); + } + } + } + else if (datatype == GL_HALF_FLOAT_ARB && comps == 3) { + GLuint i, j, k, comp; + const GLhalfARB(*rowA)[3] = (const GLhalfARB(*)[3]) srcRowA; + const GLhalfARB(*rowB)[3] = (const GLhalfARB(*)[3]) srcRowB; + GLhalfARB(*dst)[3] = (GLhalfARB(*)[3]) dstRow; + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + for (comp = 0; comp < 3; comp++) { + GLfloat aj, ak, bj, bk; + aj = _mesa_half_to_float(rowA[j][comp]); + ak = _mesa_half_to_float(rowA[k][comp]); + bj = _mesa_half_to_float(rowB[j][comp]); + bk = _mesa_half_to_float(rowB[k][comp]); + dst[i][comp] = _mesa_float_to_half((aj + ak + bj + bk) * 0.25F); + } + } + } + else if (datatype == GL_HALF_FLOAT_ARB && comps == 2) { + GLuint i, j, k, comp; + const GLhalfARB(*rowA)[2] = (const GLhalfARB(*)[2]) srcRowA; + const GLhalfARB(*rowB)[2] = (const GLhalfARB(*)[2]) srcRowB; + GLhalfARB(*dst)[2] = (GLhalfARB(*)[2]) dstRow; + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + for (comp = 0; comp < 2; comp++) { + GLfloat aj, ak, bj, bk; + aj = _mesa_half_to_float(rowA[j][comp]); + ak = _mesa_half_to_float(rowA[k][comp]); + bj = _mesa_half_to_float(rowB[j][comp]); + bk = _mesa_half_to_float(rowB[k][comp]); + dst[i][comp] = _mesa_float_to_half((aj + ak + bj + bk) * 0.25F); + } + } + } + else if (datatype == GL_HALF_FLOAT_ARB && comps == 1) { + GLuint i, j, k; + const GLhalfARB *rowA = (const GLhalfARB *) srcRowA; + const GLhalfARB *rowB = (const GLhalfARB *) srcRowB; + GLhalfARB *dst = (GLhalfARB *) dstRow; + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + GLfloat aj, ak, bj, bk; + aj = _mesa_half_to_float(rowA[j]); + ak = _mesa_half_to_float(rowA[k]); + bj = _mesa_half_to_float(rowB[j]); + bk = _mesa_half_to_float(rowB[k]); + dst[i] = _mesa_float_to_half((aj + ak + bj + bk) * 0.25F); + } + } + + else if (datatype == GL_UNSIGNED_INT && comps == 1) { + GLuint i, j, k; + const GLuint *rowA = (const GLuint *) srcRowA; + const GLuint *rowB = (const GLuint *) srcRowB; + GLuint *dst = (GLuint *) dstRow; + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + dst[i] = (GLfloat)(rowA[j] / 4 + rowA[k] / 4 + rowB[j] / 4 + rowB[k] / 4); + } + } + + else if (datatype == GL_UNSIGNED_SHORT_5_6_5 && comps == 3) { + GLuint i, j, k; + const GLushort *rowA = (const GLushort *) srcRowA; + const GLushort *rowB = (const GLushort *) srcRowB; + GLushort *dst = (GLushort *) dstRow; + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + const GLint rowAr0 = rowA[j] & 0x1f; + const GLint rowAr1 = rowA[k] & 0x1f; + const GLint rowBr0 = rowB[j] & 0x1f; + const GLint rowBr1 = rowB[k] & 0x1f; + const GLint rowAg0 = (rowA[j] >> 5) & 0x3f; + const GLint rowAg1 = (rowA[k] >> 5) & 0x3f; + const GLint rowBg0 = (rowB[j] >> 5) & 0x3f; + const GLint rowBg1 = (rowB[k] >> 5) & 0x3f; + const GLint rowAb0 = (rowA[j] >> 11) & 0x1f; + const GLint rowAb1 = (rowA[k] >> 11) & 0x1f; + const GLint rowBb0 = (rowB[j] >> 11) & 0x1f; + const GLint rowBb1 = (rowB[k] >> 11) & 0x1f; + const GLint red = (rowAr0 + rowAr1 + rowBr0 + rowBr1) >> 2; + const GLint green = (rowAg0 + rowAg1 + rowBg0 + rowBg1) >> 2; + const GLint blue = (rowAb0 + rowAb1 + rowBb0 + rowBb1) >> 2; + dst[i] = (blue << 11) | (green << 5) | red; + } + } + else if (datatype == GL_UNSIGNED_SHORT_4_4_4_4 && comps == 4) { + GLuint i, j, k; + const GLushort *rowA = (const GLushort *) srcRowA; + const GLushort *rowB = (const GLushort *) srcRowB; + GLushort *dst = (GLushort *) dstRow; + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + const GLint rowAr0 = rowA[j] & 0xf; + const GLint rowAr1 = rowA[k] & 0xf; + const GLint rowBr0 = rowB[j] & 0xf; + const GLint rowBr1 = rowB[k] & 0xf; + const GLint rowAg0 = (rowA[j] >> 4) & 0xf; + const GLint rowAg1 = (rowA[k] >> 4) & 0xf; + const GLint rowBg0 = (rowB[j] >> 4) & 0xf; + const GLint rowBg1 = (rowB[k] >> 4) & 0xf; + const GLint rowAb0 = (rowA[j] >> 8) & 0xf; + const GLint rowAb1 = (rowA[k] >> 8) & 0xf; + const GLint rowBb0 = (rowB[j] >> 8) & 0xf; + const GLint rowBb1 = (rowB[k] >> 8) & 0xf; + const GLint rowAa0 = (rowA[j] >> 12) & 0xf; + const GLint rowAa1 = (rowA[k] >> 12) & 0xf; + const GLint rowBa0 = (rowB[j] >> 12) & 0xf; + const GLint rowBa1 = (rowB[k] >> 12) & 0xf; + const GLint red = (rowAr0 + rowAr1 + rowBr0 + rowBr1) >> 2; + const GLint green = (rowAg0 + rowAg1 + rowBg0 + rowBg1) >> 2; + const GLint blue = (rowAb0 + rowAb1 + rowBb0 + rowBb1) >> 2; + const GLint alpha = (rowAa0 + rowAa1 + rowBa0 + rowBa1) >> 2; + dst[i] = (alpha << 12) | (blue << 8) | (green << 4) | red; + } + } + else if (datatype == GL_UNSIGNED_SHORT_1_5_5_5_REV && comps == 4) { + GLuint i, j, k; + const GLushort *rowA = (const GLushort *) srcRowA; + const GLushort *rowB = (const GLushort *) srcRowB; + GLushort *dst = (GLushort *) dstRow; + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + const GLint rowAr0 = rowA[j] & 0x1f; + const GLint rowAr1 = rowA[k] & 0x1f; + const GLint rowBr0 = rowB[j] & 0x1f; + const GLint rowBr1 = rowB[k] & 0x1f; + const GLint rowAg0 = (rowA[j] >> 5) & 0x1f; + const GLint rowAg1 = (rowA[k] >> 5) & 0x1f; + const GLint rowBg0 = (rowB[j] >> 5) & 0x1f; + const GLint rowBg1 = (rowB[k] >> 5) & 0x1f; + const GLint rowAb0 = (rowA[j] >> 10) & 0x1f; + const GLint rowAb1 = (rowA[k] >> 10) & 0x1f; + const GLint rowBb0 = (rowB[j] >> 10) & 0x1f; + const GLint rowBb1 = (rowB[k] >> 10) & 0x1f; + const GLint rowAa0 = (rowA[j] >> 15) & 0x1; + const GLint rowAa1 = (rowA[k] >> 15) & 0x1; + const GLint rowBa0 = (rowB[j] >> 15) & 0x1; + const GLint rowBa1 = (rowB[k] >> 15) & 0x1; + const GLint red = (rowAr0 + rowAr1 + rowBr0 + rowBr1) >> 2; + const GLint green = (rowAg0 + rowAg1 + rowBg0 + rowBg1) >> 2; + const GLint blue = (rowAb0 + rowAb1 + rowBb0 + rowBb1) >> 2; + const GLint alpha = (rowAa0 + rowAa1 + rowBa0 + rowBa1) >> 2; + dst[i] = (alpha << 15) | (blue << 10) | (green << 5) | red; + } + } + else if (datatype == GL_UNSIGNED_SHORT_5_5_5_1 && comps == 4) { + GLuint i, j, k; + const GLushort *rowA = (const GLushort *) srcRowA; + const GLushort *rowB = (const GLushort *) srcRowB; + GLushort *dst = (GLushort *) dstRow; + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + const GLint rowAr0 = (rowA[j] >> 11) & 0x1f; + const GLint rowAr1 = (rowA[k] >> 11) & 0x1f; + const GLint rowBr0 = (rowB[j] >> 11) & 0x1f; + const GLint rowBr1 = (rowB[k] >> 11) & 0x1f; + const GLint rowAg0 = (rowA[j] >> 6) & 0x1f; + const GLint rowAg1 = (rowA[k] >> 6) & 0x1f; + const GLint rowBg0 = (rowB[j] >> 6) & 0x1f; + const GLint rowBg1 = (rowB[k] >> 6) & 0x1f; + const GLint rowAb0 = (rowA[j] >> 1) & 0x1f; + const GLint rowAb1 = (rowA[k] >> 1) & 0x1f; + const GLint rowBb0 = (rowB[j] >> 1) & 0x1f; + const GLint rowBb1 = (rowB[k] >> 1) & 0x1f; + const GLint rowAa0 = (rowA[j] & 0x1); + const GLint rowAa1 = (rowA[k] & 0x1); + const GLint rowBa0 = (rowB[j] & 0x1); + const GLint rowBa1 = (rowB[k] & 0x1); + const GLint red = (rowAr0 + rowAr1 + rowBr0 + rowBr1) >> 2; + const GLint green = (rowAg0 + rowAg1 + rowBg0 + rowBg1) >> 2; + const GLint blue = (rowAb0 + rowAb1 + rowBb0 + rowBb1) >> 2; + const GLint alpha = (rowAa0 + rowAa1 + rowBa0 + rowBa1) >> 2; + dst[i] = (red << 11) | (green << 6) | (blue << 1) | alpha; + } + } + + else if (datatype == GL_UNSIGNED_BYTE_3_3_2 && comps == 3) { + GLuint i, j, k; + const GLubyte *rowA = (const GLubyte *) srcRowA; + const GLubyte *rowB = (const GLubyte *) srcRowB; + GLubyte *dst = (GLubyte *) dstRow; + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + const GLint rowAr0 = rowA[j] & 0x3; + const GLint rowAr1 = rowA[k] & 0x3; + const GLint rowBr0 = rowB[j] & 0x3; + const GLint rowBr1 = rowB[k] & 0x3; + const GLint rowAg0 = (rowA[j] >> 2) & 0x7; + const GLint rowAg1 = (rowA[k] >> 2) & 0x7; + const GLint rowBg0 = (rowB[j] >> 2) & 0x7; + const GLint rowBg1 = (rowB[k] >> 2) & 0x7; + const GLint rowAb0 = (rowA[j] >> 5) & 0x7; + const GLint rowAb1 = (rowA[k] >> 5) & 0x7; + const GLint rowBb0 = (rowB[j] >> 5) & 0x7; + const GLint rowBb1 = (rowB[k] >> 5) & 0x7; + const GLint red = (rowAr0 + rowAr1 + rowBr0 + rowBr1) >> 2; + const GLint green = (rowAg0 + rowAg1 + rowBg0 + rowBg1) >> 2; + const GLint blue = (rowAb0 + rowAb1 + rowBb0 + rowBb1) >> 2; + dst[i] = (blue << 5) | (green << 2) | red; + } + } + + else if (datatype == MESA_UNSIGNED_BYTE_4_4 && comps == 2) { + GLuint i, j, k; + const GLubyte *rowA = (const GLubyte *) srcRowA; + const GLubyte *rowB = (const GLubyte *) srcRowB; + GLubyte *dst = (GLubyte *) dstRow; + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + const GLint rowAr0 = rowA[j] & 0xf; + const GLint rowAr1 = rowA[k] & 0xf; + const GLint rowBr0 = rowB[j] & 0xf; + const GLint rowBr1 = rowB[k] & 0xf; + const GLint rowAg0 = (rowA[j] >> 4) & 0xf; + const GLint rowAg1 = (rowA[k] >> 4) & 0xf; + const GLint rowBg0 = (rowB[j] >> 4) & 0xf; + const GLint rowBg1 = (rowB[k] >> 4) & 0xf; + const GLint r = (rowAr0 + rowAr1 + rowBr0 + rowBr1) >> 2; + const GLint g = (rowAg0 + rowAg1 + rowBg0 + rowBg1) >> 2; + dst[i] = (g << 4) | r; + } + } + + else if (datatype == GL_UNSIGNED_INT_2_10_10_10_REV && comps == 4) { + GLuint i, j, k; + const GLuint *rowA = (const GLuint *) srcRowA; + const GLuint *rowB = (const GLuint *) srcRowB; + GLuint *dst = (GLuint *) dstRow; + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + const GLint rowAr0 = rowA[j] & 0x3ff; + const GLint rowAr1 = rowA[k] & 0x3ff; + const GLint rowBr0 = rowB[j] & 0x3ff; + const GLint rowBr1 = rowB[k] & 0x3ff; + const GLint rowAg0 = (rowA[j] >> 10) & 0x3ff; + const GLint rowAg1 = (rowA[k] >> 10) & 0x3ff; + const GLint rowBg0 = (rowB[j] >> 10) & 0x3ff; + const GLint rowBg1 = (rowB[k] >> 10) & 0x3ff; + const GLint rowAb0 = (rowA[j] >> 20) & 0x3ff; + const GLint rowAb1 = (rowA[k] >> 20) & 0x3ff; + const GLint rowBb0 = (rowB[j] >> 20) & 0x3ff; + const GLint rowBb1 = (rowB[k] >> 20) & 0x3ff; + const GLint rowAa0 = (rowA[j] >> 30) & 0x3; + const GLint rowAa1 = (rowA[k] >> 30) & 0x3; + const GLint rowBa0 = (rowB[j] >> 30) & 0x3; + const GLint rowBa1 = (rowB[k] >> 30) & 0x3; + const GLint red = (rowAr0 + rowAr1 + rowBr0 + rowBr1) >> 2; + const GLint green = (rowAg0 + rowAg1 + rowBg0 + rowBg1) >> 2; + const GLint blue = (rowAb0 + rowAb1 + rowBb0 + rowBb1) >> 2; + const GLint alpha = (rowAa0 + rowAa1 + rowBa0 + rowBa1) >> 2; + dst[i] = (alpha << 30) | (blue << 20) | (green << 10) | red; + } + } + + else if (datatype == GL_UNSIGNED_INT_5_9_9_9_REV && comps == 3) { + GLuint i, j, k; + const GLuint *rowA = (const GLuint*) srcRowA; + const GLuint *rowB = (const GLuint*) srcRowB; + GLuint *dst = (GLuint*)dstRow; + GLfloat res[3], rowAj[3], rowBj[3], rowAk[3], rowBk[3]; + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + rgb9e5_to_float3(rowA[j], rowAj); + rgb9e5_to_float3(rowB[j], rowBj); + rgb9e5_to_float3(rowA[k], rowAk); + rgb9e5_to_float3(rowB[k], rowBk); + res[0] = (rowAj[0] + rowAk[0] + rowBj[0] + rowBk[0]) * 0.25F; + res[1] = (rowAj[1] + rowAk[1] + rowBj[1] + rowBk[1]) * 0.25F; + res[2] = (rowAj[2] + rowAk[2] + rowBj[2] + rowBk[2]) * 0.25F; + dst[i] = float3_to_rgb9e5(res); + } + } + + else if (datatype == GL_UNSIGNED_INT_10F_11F_11F_REV && comps == 3) { + GLuint i, j, k; + const GLuint *rowA = (const GLuint*) srcRowA; + const GLuint *rowB = (const GLuint*) srcRowB; + GLuint *dst = (GLuint*)dstRow; + GLfloat res[3], rowAj[3], rowBj[3], rowAk[3], rowBk[3]; + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + r11g11b10f_to_float3(rowA[j], rowAj); + r11g11b10f_to_float3(rowB[j], rowBj); + r11g11b10f_to_float3(rowA[k], rowAk); + r11g11b10f_to_float3(rowB[k], rowBk); + res[0] = (rowAj[0] + rowAk[0] + rowBj[0] + rowBk[0]) * 0.25F; + res[1] = (rowAj[1] + rowAk[1] + rowBj[1] + rowBk[1]) * 0.25F; + res[2] = (rowAj[2] + rowAk[2] + rowBj[2] + rowBk[2]) * 0.25F; + dst[i] = float3_to_r11g11b10f(res); + } + } + + else { + _mesa_problem(NULL, "bad format in do_row()"); + } +} + + +/** + * Average together four rows of a source image to produce a single new + * row in the dest image. It's legal for the two source rows to point + * to the same data. The source width must be equal to either the + * dest width or two times the dest width. + * + * \param datatype GL pixel type \c GL_UNSIGNED_BYTE, \c GL_UNSIGNED_SHORT, + * \c GL_FLOAT, etc. + * \param comps number of components per pixel (1..4) + * \param srcWidth Width of a row in the source data + * \param srcRowA Pointer to one of the rows of source data + * \param srcRowB Pointer to one of the rows of source data + * \param srcRowC Pointer to one of the rows of source data + * \param srcRowD Pointer to one of the rows of source data + * \param dstWidth Width of a row in the destination data + * \param srcRowA Pointer to the row of destination data + */ +static void +do_row_3D(GLenum datatype, GLuint comps, GLint srcWidth, + const GLvoid *srcRowA, const GLvoid *srcRowB, + const GLvoid *srcRowC, const GLvoid *srcRowD, + GLint dstWidth, GLvoid *dstRow) +{ + const GLuint k0 = (srcWidth == dstWidth) ? 0 : 1; + const GLuint colStride = (srcWidth == dstWidth) ? 1 : 2; + GLuint i, j, k; + + ASSERT(comps >= 1); + ASSERT(comps <= 4); + + if ((datatype == GL_UNSIGNED_BYTE) && (comps == 4)) { + DECLARE_ROW_POINTERS(GLubyte, 4); + + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + FILTER_3D(0); + FILTER_3D(1); + FILTER_3D(2); + FILTER_3D(3); + } + } + else if ((datatype == GL_UNSIGNED_BYTE) && (comps == 3)) { + DECLARE_ROW_POINTERS(GLubyte, 3); + + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + FILTER_3D(0); + FILTER_3D(1); + FILTER_3D(2); + } + } + else if ((datatype == GL_UNSIGNED_BYTE) && (comps == 2)) { + DECLARE_ROW_POINTERS(GLubyte, 2); + + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + FILTER_3D(0); + FILTER_3D(1); + } + } + else if ((datatype == GL_UNSIGNED_BYTE) && (comps == 1)) { + DECLARE_ROW_POINTERS(GLubyte, 1); + + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + FILTER_3D(0); + } + } + else if ((datatype == GL_BYTE) && (comps == 4)) { + DECLARE_ROW_POINTERS(GLbyte, 4); + + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + FILTER_3D_SIGNED(0); + FILTER_3D_SIGNED(1); + FILTER_3D_SIGNED(2); + FILTER_3D_SIGNED(3); + } + } + else if ((datatype == GL_BYTE) && (comps == 3)) { + DECLARE_ROW_POINTERS(GLbyte, 3); + + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + FILTER_3D_SIGNED(0); + FILTER_3D_SIGNED(1); + FILTER_3D_SIGNED(2); + } + } + else if ((datatype == GL_BYTE) && (comps == 2)) { + DECLARE_ROW_POINTERS(GLbyte, 2); + + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + FILTER_3D_SIGNED(0); + FILTER_3D_SIGNED(1); + } + } + else if ((datatype == GL_BYTE) && (comps == 1)) { + DECLARE_ROW_POINTERS(GLbyte, 1); + + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + FILTER_3D_SIGNED(0); + } + } + else if ((datatype == GL_UNSIGNED_SHORT) && (comps == 4)) { + DECLARE_ROW_POINTERS(GLushort, 4); + + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + FILTER_3D(0); + FILTER_3D(1); + FILTER_3D(2); + FILTER_3D(3); + } + } + else if ((datatype == GL_UNSIGNED_SHORT) && (comps == 3)) { + DECLARE_ROW_POINTERS(GLushort, 3); + + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + FILTER_3D(0); + FILTER_3D(1); + FILTER_3D(2); + } + } + else if ((datatype == GL_UNSIGNED_SHORT) && (comps == 2)) { + DECLARE_ROW_POINTERS(GLushort, 2); + + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + FILTER_3D(0); + FILTER_3D(1); + } + } + else if ((datatype == GL_UNSIGNED_SHORT) && (comps == 1)) { + DECLARE_ROW_POINTERS(GLushort, 1); + + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + FILTER_3D(0); + } + } + else if ((datatype == GL_SHORT) && (comps == 4)) { + DECLARE_ROW_POINTERS(GLshort, 4); + + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + FILTER_3D(0); + FILTER_3D(1); + FILTER_3D(2); + FILTER_3D(3); + } + } + else if ((datatype == GL_SHORT) && (comps == 3)) { + DECLARE_ROW_POINTERS(GLshort, 3); + + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + FILTER_3D(0); + FILTER_3D(1); + FILTER_3D(2); + } + } + else if ((datatype == GL_SHORT) && (comps == 2)) { + DECLARE_ROW_POINTERS(GLshort, 2); + + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + FILTER_3D(0); + FILTER_3D(1); + } + } + else if ((datatype == GL_SHORT) && (comps == 1)) { + DECLARE_ROW_POINTERS(GLshort, 1); + + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + FILTER_3D(0); + } + } + else if ((datatype == GL_FLOAT) && (comps == 4)) { + DECLARE_ROW_POINTERS(GLfloat, 4); + + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + FILTER_F_3D(0); + FILTER_F_3D(1); + FILTER_F_3D(2); + FILTER_F_3D(3); + } + } + else if ((datatype == GL_FLOAT) && (comps == 3)) { + DECLARE_ROW_POINTERS(GLfloat, 3); + + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + FILTER_F_3D(0); + FILTER_F_3D(1); + FILTER_F_3D(2); + } + } + else if ((datatype == GL_FLOAT) && (comps == 2)) { + DECLARE_ROW_POINTERS(GLfloat, 2); + + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + FILTER_F_3D(0); + FILTER_F_3D(1); + } + } + else if ((datatype == GL_FLOAT) && (comps == 1)) { + DECLARE_ROW_POINTERS(GLfloat, 1); + + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + FILTER_F_3D(0); + } + } + else if ((datatype == GL_HALF_FLOAT_ARB) && (comps == 4)) { + DECLARE_ROW_POINTERS(GLhalfARB, 4); + + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + FILTER_HF_3D(0); + FILTER_HF_3D(1); + FILTER_HF_3D(2); + FILTER_HF_3D(3); + } + } + else if ((datatype == GL_HALF_FLOAT_ARB) && (comps == 3)) { + DECLARE_ROW_POINTERS(GLhalfARB, 4); + + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + FILTER_HF_3D(0); + FILTER_HF_3D(1); + FILTER_HF_3D(2); + } + } + else if ((datatype == GL_HALF_FLOAT_ARB) && (comps == 2)) { + DECLARE_ROW_POINTERS(GLhalfARB, 4); + + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + FILTER_HF_3D(0); + FILTER_HF_3D(1); + } + } + else if ((datatype == GL_HALF_FLOAT_ARB) && (comps == 1)) { + DECLARE_ROW_POINTERS(GLhalfARB, 4); + + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + FILTER_HF_3D(0); + } + } + else if ((datatype == GL_UNSIGNED_INT) && (comps == 1)) { + const GLuint *rowA = (const GLuint *) srcRowA; + const GLuint *rowB = (const GLuint *) srcRowB; + const GLuint *rowC = (const GLuint *) srcRowC; + const GLuint *rowD = (const GLuint *) srcRowD; + GLfloat *dst = (GLfloat *) dstRow; + + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + const uint64_t tmp = (((uint64_t) rowA[j] + (uint64_t) rowA[k]) + + ((uint64_t) rowB[j] + (uint64_t) rowB[k]) + + ((uint64_t) rowC[j] + (uint64_t) rowC[k]) + + ((uint64_t) rowD[j] + (uint64_t) rowD[k])); + dst[i] = (GLfloat)((double) tmp * 0.125); + } + } + else if ((datatype == GL_UNSIGNED_SHORT_5_6_5) && (comps == 3)) { + DECLARE_ROW_POINTERS0(GLushort); + + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + const GLint rowAr0 = rowA[j] & 0x1f; + const GLint rowAr1 = rowA[k] & 0x1f; + const GLint rowBr0 = rowB[j] & 0x1f; + const GLint rowBr1 = rowB[k] & 0x1f; + const GLint rowCr0 = rowC[j] & 0x1f; + const GLint rowCr1 = rowC[k] & 0x1f; + const GLint rowDr0 = rowD[j] & 0x1f; + const GLint rowDr1 = rowD[k] & 0x1f; + const GLint rowAg0 = (rowA[j] >> 5) & 0x3f; + const GLint rowAg1 = (rowA[k] >> 5) & 0x3f; + const GLint rowBg0 = (rowB[j] >> 5) & 0x3f; + const GLint rowBg1 = (rowB[k] >> 5) & 0x3f; + const GLint rowCg0 = (rowC[j] >> 5) & 0x3f; + const GLint rowCg1 = (rowC[k] >> 5) & 0x3f; + const GLint rowDg0 = (rowD[j] >> 5) & 0x3f; + const GLint rowDg1 = (rowD[k] >> 5) & 0x3f; + const GLint rowAb0 = (rowA[j] >> 11) & 0x1f; + const GLint rowAb1 = (rowA[k] >> 11) & 0x1f; + const GLint rowBb0 = (rowB[j] >> 11) & 0x1f; + const GLint rowBb1 = (rowB[k] >> 11) & 0x1f; + const GLint rowCb0 = (rowC[j] >> 11) & 0x1f; + const GLint rowCb1 = (rowC[k] >> 11) & 0x1f; + const GLint rowDb0 = (rowD[j] >> 11) & 0x1f; + const GLint rowDb1 = (rowD[k] >> 11) & 0x1f; + const GLint r = FILTER_SUM_3D(rowAr0, rowAr1, rowBr0, rowBr1, + rowCr0, rowCr1, rowDr0, rowDr1); + const GLint g = FILTER_SUM_3D(rowAg0, rowAg1, rowBg0, rowBg1, + rowCg0, rowCg1, rowDg0, rowDg1); + const GLint b = FILTER_SUM_3D(rowAb0, rowAb1, rowBb0, rowBb1, + rowCb0, rowCb1, rowDb0, rowDb1); + dst[i] = (b << 11) | (g << 5) | r; + } + } + else if ((datatype == GL_UNSIGNED_SHORT_4_4_4_4) && (comps == 4)) { + DECLARE_ROW_POINTERS0(GLushort); + + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + const GLint rowAr0 = rowA[j] & 0xf; + const GLint rowAr1 = rowA[k] & 0xf; + const GLint rowBr0 = rowB[j] & 0xf; + const GLint rowBr1 = rowB[k] & 0xf; + const GLint rowCr0 = rowC[j] & 0xf; + const GLint rowCr1 = rowC[k] & 0xf; + const GLint rowDr0 = rowD[j] & 0xf; + const GLint rowDr1 = rowD[k] & 0xf; + const GLint rowAg0 = (rowA[j] >> 4) & 0xf; + const GLint rowAg1 = (rowA[k] >> 4) & 0xf; + const GLint rowBg0 = (rowB[j] >> 4) & 0xf; + const GLint rowBg1 = (rowB[k] >> 4) & 0xf; + const GLint rowCg0 = (rowC[j] >> 4) & 0xf; + const GLint rowCg1 = (rowC[k] >> 4) & 0xf; + const GLint rowDg0 = (rowD[j] >> 4) & 0xf; + const GLint rowDg1 = (rowD[k] >> 4) & 0xf; + const GLint rowAb0 = (rowA[j] >> 8) & 0xf; + const GLint rowAb1 = (rowA[k] >> 8) & 0xf; + const GLint rowBb0 = (rowB[j] >> 8) & 0xf; + const GLint rowBb1 = (rowB[k] >> 8) & 0xf; + const GLint rowCb0 = (rowC[j] >> 8) & 0xf; + const GLint rowCb1 = (rowC[k] >> 8) & 0xf; + const GLint rowDb0 = (rowD[j] >> 8) & 0xf; + const GLint rowDb1 = (rowD[k] >> 8) & 0xf; + const GLint rowAa0 = (rowA[j] >> 12) & 0xf; + const GLint rowAa1 = (rowA[k] >> 12) & 0xf; + const GLint rowBa0 = (rowB[j] >> 12) & 0xf; + const GLint rowBa1 = (rowB[k] >> 12) & 0xf; + const GLint rowCa0 = (rowC[j] >> 12) & 0xf; + const GLint rowCa1 = (rowC[k] >> 12) & 0xf; + const GLint rowDa0 = (rowD[j] >> 12) & 0xf; + const GLint rowDa1 = (rowD[k] >> 12) & 0xf; + const GLint r = FILTER_SUM_3D(rowAr0, rowAr1, rowBr0, rowBr1, + rowCr0, rowCr1, rowDr0, rowDr1); + const GLint g = FILTER_SUM_3D(rowAg0, rowAg1, rowBg0, rowBg1, + rowCg0, rowCg1, rowDg0, rowDg1); + const GLint b = FILTER_SUM_3D(rowAb0, rowAb1, rowBb0, rowBb1, + rowCb0, rowCb1, rowDb0, rowDb1); + const GLint a = FILTER_SUM_3D(rowAa0, rowAa1, rowBa0, rowBa1, + rowCa0, rowCa1, rowDa0, rowDa1); + + dst[i] = (a << 12) | (b << 8) | (g << 4) | r; + } + } + else if ((datatype == GL_UNSIGNED_SHORT_1_5_5_5_REV) && (comps == 4)) { + DECLARE_ROW_POINTERS0(GLushort); + + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + const GLint rowAr0 = rowA[j] & 0x1f; + const GLint rowAr1 = rowA[k] & 0x1f; + const GLint rowBr0 = rowB[j] & 0x1f; + const GLint rowBr1 = rowB[k] & 0x1f; + const GLint rowCr0 = rowC[j] & 0x1f; + const GLint rowCr1 = rowC[k] & 0x1f; + const GLint rowDr0 = rowD[j] & 0x1f; + const GLint rowDr1 = rowD[k] & 0x1f; + const GLint rowAg0 = (rowA[j] >> 5) & 0x1f; + const GLint rowAg1 = (rowA[k] >> 5) & 0x1f; + const GLint rowBg0 = (rowB[j] >> 5) & 0x1f; + const GLint rowBg1 = (rowB[k] >> 5) & 0x1f; + const GLint rowCg0 = (rowC[j] >> 5) & 0x1f; + const GLint rowCg1 = (rowC[k] >> 5) & 0x1f; + const GLint rowDg0 = (rowD[j] >> 5) & 0x1f; + const GLint rowDg1 = (rowD[k] >> 5) & 0x1f; + const GLint rowAb0 = (rowA[j] >> 10) & 0x1f; + const GLint rowAb1 = (rowA[k] >> 10) & 0x1f; + const GLint rowBb0 = (rowB[j] >> 10) & 0x1f; + const GLint rowBb1 = (rowB[k] >> 10) & 0x1f; + const GLint rowCb0 = (rowC[j] >> 10) & 0x1f; + const GLint rowCb1 = (rowC[k] >> 10) & 0x1f; + const GLint rowDb0 = (rowD[j] >> 10) & 0x1f; + const GLint rowDb1 = (rowD[k] >> 10) & 0x1f; + const GLint rowAa0 = (rowA[j] >> 15) & 0x1; + const GLint rowAa1 = (rowA[k] >> 15) & 0x1; + const GLint rowBa0 = (rowB[j] >> 15) & 0x1; + const GLint rowBa1 = (rowB[k] >> 15) & 0x1; + const GLint rowCa0 = (rowC[j] >> 15) & 0x1; + const GLint rowCa1 = (rowC[k] >> 15) & 0x1; + const GLint rowDa0 = (rowD[j] >> 15) & 0x1; + const GLint rowDa1 = (rowD[k] >> 15) & 0x1; + const GLint r = FILTER_SUM_3D(rowAr0, rowAr1, rowBr0, rowBr1, + rowCr0, rowCr1, rowDr0, rowDr1); + const GLint g = FILTER_SUM_3D(rowAg0, rowAg1, rowBg0, rowBg1, + rowCg0, rowCg1, rowDg0, rowDg1); + const GLint b = FILTER_SUM_3D(rowAb0, rowAb1, rowBb0, rowBb1, + rowCb0, rowCb1, rowDb0, rowDb1); + const GLint a = FILTER_SUM_3D(rowAa0, rowAa1, rowBa0, rowBa1, + rowCa0, rowCa1, rowDa0, rowDa1); + + dst[i] = (a << 15) | (b << 10) | (g << 5) | r; + } + } + else if ((datatype == GL_UNSIGNED_SHORT_5_5_5_1) && (comps == 4)) { + DECLARE_ROW_POINTERS0(GLushort); + + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + const GLint rowAr0 = (rowA[j] >> 11) & 0x1f; + const GLint rowAr1 = (rowA[k] >> 11) & 0x1f; + const GLint rowBr0 = (rowB[j] >> 11) & 0x1f; + const GLint rowBr1 = (rowB[k] >> 11) & 0x1f; + const GLint rowCr0 = (rowC[j] >> 11) & 0x1f; + const GLint rowCr1 = (rowC[k] >> 11) & 0x1f; + const GLint rowDr0 = (rowD[j] >> 11) & 0x1f; + const GLint rowDr1 = (rowD[k] >> 11) & 0x1f; + const GLint rowAg0 = (rowA[j] >> 6) & 0x1f; + const GLint rowAg1 = (rowA[k] >> 6) & 0x1f; + const GLint rowBg0 = (rowB[j] >> 6) & 0x1f; + const GLint rowBg1 = (rowB[k] >> 6) & 0x1f; + const GLint rowCg0 = (rowC[j] >> 6) & 0x1f; + const GLint rowCg1 = (rowC[k] >> 6) & 0x1f; + const GLint rowDg0 = (rowD[j] >> 6) & 0x1f; + const GLint rowDg1 = (rowD[k] >> 6) & 0x1f; + const GLint rowAb0 = (rowA[j] >> 1) & 0x1f; + const GLint rowAb1 = (rowA[k] >> 1) & 0x1f; + const GLint rowBb0 = (rowB[j] >> 1) & 0x1f; + const GLint rowBb1 = (rowB[k] >> 1) & 0x1f; + const GLint rowCb0 = (rowC[j] >> 1) & 0x1f; + const GLint rowCb1 = (rowC[k] >> 1) & 0x1f; + const GLint rowDb0 = (rowD[j] >> 1) & 0x1f; + const GLint rowDb1 = (rowD[k] >> 1) & 0x1f; + const GLint rowAa0 = (rowA[j] & 0x1); + const GLint rowAa1 = (rowA[k] & 0x1); + const GLint rowBa0 = (rowB[j] & 0x1); + const GLint rowBa1 = (rowB[k] & 0x1); + const GLint rowCa0 = (rowC[j] & 0x1); + const GLint rowCa1 = (rowC[k] & 0x1); + const GLint rowDa0 = (rowD[j] & 0x1); + const GLint rowDa1 = (rowD[k] & 0x1); + const GLint r = FILTER_SUM_3D(rowAr0, rowAr1, rowBr0, rowBr1, + rowCr0, rowCr1, rowDr0, rowDr1); + const GLint g = FILTER_SUM_3D(rowAg0, rowAg1, rowBg0, rowBg1, + rowCg0, rowCg1, rowDg0, rowDg1); + const GLint b = FILTER_SUM_3D(rowAb0, rowAb1, rowBb0, rowBb1, + rowCb0, rowCb1, rowDb0, rowDb1); + const GLint a = FILTER_SUM_3D(rowAa0, rowAa1, rowBa0, rowBa1, + rowCa0, rowCa1, rowDa0, rowDa1); + + dst[i] = (r << 11) | (g << 6) | (b << 1) | a; + } + } + else if ((datatype == GL_UNSIGNED_BYTE_3_3_2) && (comps == 3)) { + DECLARE_ROW_POINTERS0(GLubyte); + + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + const GLint rowAr0 = rowA[j] & 0x3; + const GLint rowAr1 = rowA[k] & 0x3; + const GLint rowBr0 = rowB[j] & 0x3; + const GLint rowBr1 = rowB[k] & 0x3; + const GLint rowCr0 = rowC[j] & 0x3; + const GLint rowCr1 = rowC[k] & 0x3; + const GLint rowDr0 = rowD[j] & 0x3; + const GLint rowDr1 = rowD[k] & 0x3; + const GLint rowAg0 = (rowA[j] >> 2) & 0x7; + const GLint rowAg1 = (rowA[k] >> 2) & 0x7; + const GLint rowBg0 = (rowB[j] >> 2) & 0x7; + const GLint rowBg1 = (rowB[k] >> 2) & 0x7; + const GLint rowCg0 = (rowC[j] >> 2) & 0x7; + const GLint rowCg1 = (rowC[k] >> 2) & 0x7; + const GLint rowDg0 = (rowD[j] >> 2) & 0x7; + const GLint rowDg1 = (rowD[k] >> 2) & 0x7; + const GLint rowAb0 = (rowA[j] >> 5) & 0x7; + const GLint rowAb1 = (rowA[k] >> 5) & 0x7; + const GLint rowBb0 = (rowB[j] >> 5) & 0x7; + const GLint rowBb1 = (rowB[k] >> 5) & 0x7; + const GLint rowCb0 = (rowC[j] >> 5) & 0x7; + const GLint rowCb1 = (rowC[k] >> 5) & 0x7; + const GLint rowDb0 = (rowD[j] >> 5) & 0x7; + const GLint rowDb1 = (rowD[k] >> 5) & 0x7; + const GLint r = FILTER_SUM_3D(rowAr0, rowAr1, rowBr0, rowBr1, + rowCr0, rowCr1, rowDr0, rowDr1); + const GLint g = FILTER_SUM_3D(rowAg0, rowAg1, rowBg0, rowBg1, + rowCg0, rowCg1, rowDg0, rowDg1); + const GLint b = FILTER_SUM_3D(rowAb0, rowAb1, rowBb0, rowBb1, + rowCb0, rowCb1, rowDb0, rowDb1); + dst[i] = (b << 5) | (g << 2) | r; + } + } + else if (datatype == MESA_UNSIGNED_BYTE_4_4 && comps == 2) { + DECLARE_ROW_POINTERS0(GLubyte); + + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + const GLint rowAr0 = rowA[j] & 0xf; + const GLint rowAr1 = rowA[k] & 0xf; + const GLint rowBr0 = rowB[j] & 0xf; + const GLint rowBr1 = rowB[k] & 0xf; + const GLint rowCr0 = rowC[j] & 0xf; + const GLint rowCr1 = rowC[k] & 0xf; + const GLint rowDr0 = rowD[j] & 0xf; + const GLint rowDr1 = rowD[k] & 0xf; + const GLint rowAg0 = (rowA[j] >> 4) & 0xf; + const GLint rowAg1 = (rowA[k] >> 4) & 0xf; + const GLint rowBg0 = (rowB[j] >> 4) & 0xf; + const GLint rowBg1 = (rowB[k] >> 4) & 0xf; + const GLint rowCg0 = (rowC[j] >> 4) & 0xf; + const GLint rowCg1 = (rowC[k] >> 4) & 0xf; + const GLint rowDg0 = (rowD[j] >> 4) & 0xf; + const GLint rowDg1 = (rowD[k] >> 4) & 0xf; + const GLint r = FILTER_SUM_3D(rowAr0, rowAr1, rowBr0, rowBr1, + rowCr0, rowCr1, rowDr0, rowDr1); + const GLint g = FILTER_SUM_3D(rowAg0, rowAg1, rowBg0, rowBg1, + rowCg0, rowCg1, rowDg0, rowDg1); + dst[i] = (g << 4) | r; + } + } + else if ((datatype == GL_UNSIGNED_INT_2_10_10_10_REV) && (comps == 4)) { + DECLARE_ROW_POINTERS0(GLuint); + + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + const GLint rowAr0 = rowA[j] & 0x3ff; + const GLint rowAr1 = rowA[k] & 0x3ff; + const GLint rowBr0 = rowB[j] & 0x3ff; + const GLint rowBr1 = rowB[k] & 0x3ff; + const GLint rowCr0 = rowC[j] & 0x3ff; + const GLint rowCr1 = rowC[k] & 0x3ff; + const GLint rowDr0 = rowD[j] & 0x3ff; + const GLint rowDr1 = rowD[k] & 0x3ff; + const GLint rowAg0 = (rowA[j] >> 10) & 0x3ff; + const GLint rowAg1 = (rowA[k] >> 10) & 0x3ff; + const GLint rowBg0 = (rowB[j] >> 10) & 0x3ff; + const GLint rowBg1 = (rowB[k] >> 10) & 0x3ff; + const GLint rowCg0 = (rowC[j] >> 10) & 0x3ff; + const GLint rowCg1 = (rowC[k] >> 10) & 0x3ff; + const GLint rowDg0 = (rowD[j] >> 10) & 0x3ff; + const GLint rowDg1 = (rowD[k] >> 10) & 0x3ff; + const GLint rowAb0 = (rowA[j] >> 20) & 0x3ff; + const GLint rowAb1 = (rowA[k] >> 20) & 0x3ff; + const GLint rowBb0 = (rowB[j] >> 20) & 0x3ff; + const GLint rowBb1 = (rowB[k] >> 20) & 0x3ff; + const GLint rowCb0 = (rowC[j] >> 20) & 0x3ff; + const GLint rowCb1 = (rowC[k] >> 20) & 0x3ff; + const GLint rowDb0 = (rowD[j] >> 20) & 0x3ff; + const GLint rowDb1 = (rowD[k] >> 20) & 0x3ff; + const GLint rowAa0 = (rowA[j] >> 30) & 0x3; + const GLint rowAa1 = (rowA[k] >> 30) & 0x3; + const GLint rowBa0 = (rowB[j] >> 30) & 0x3; + const GLint rowBa1 = (rowB[k] >> 30) & 0x3; + const GLint rowCa0 = (rowC[j] >> 30) & 0x3; + const GLint rowCa1 = (rowC[k] >> 30) & 0x3; + const GLint rowDa0 = (rowD[j] >> 30) & 0x3; + const GLint rowDa1 = (rowD[k] >> 30) & 0x3; + const GLint r = FILTER_SUM_3D(rowAr0, rowAr1, rowBr0, rowBr1, + rowCr0, rowCr1, rowDr0, rowDr1); + const GLint g = FILTER_SUM_3D(rowAg0, rowAg1, rowBg0, rowBg1, + rowCg0, rowCg1, rowDg0, rowDg1); + const GLint b = FILTER_SUM_3D(rowAb0, rowAb1, rowBb0, rowBb1, + rowCb0, rowCb1, rowDb0, rowDb1); + const GLint a = FILTER_SUM_3D(rowAa0, rowAa1, rowBa0, rowBa1, + rowCa0, rowCa1, rowDa0, rowDa1); + + dst[i] = (a << 30) | (b << 20) | (g << 10) | r; + } + } + + else if (datatype == GL_UNSIGNED_INT_5_9_9_9_REV && comps == 3) { + DECLARE_ROW_POINTERS0(GLuint); + + GLfloat res[3]; + GLfloat rowAj[3], rowBj[3], rowCj[3], rowDj[3]; + GLfloat rowAk[3], rowBk[3], rowCk[3], rowDk[3]; + + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + rgb9e5_to_float3(rowA[j], rowAj); + rgb9e5_to_float3(rowB[j], rowBj); + rgb9e5_to_float3(rowC[j], rowCj); + rgb9e5_to_float3(rowD[j], rowDj); + rgb9e5_to_float3(rowA[k], rowAk); + rgb9e5_to_float3(rowB[k], rowBk); + rgb9e5_to_float3(rowC[k], rowCk); + rgb9e5_to_float3(rowD[k], rowDk); + res[0] = (rowAj[0] + rowAk[0] + rowBj[0] + rowBk[0] + + rowCj[0] + rowCk[0] + rowDj[0] + rowDk[0]) * 0.125F; + res[1] = (rowAj[1] + rowAk[1] + rowBj[1] + rowBk[1] + + rowCj[1] + rowCk[1] + rowDj[1] + rowDk[1]) * 0.125F; + res[2] = (rowAj[2] + rowAk[2] + rowBj[2] + rowBk[2] + + rowCj[2] + rowCk[2] + rowDj[2] + rowDk[2]) * 0.125F; + dst[i] = float3_to_rgb9e5(res); + } + } + + else if (datatype == GL_UNSIGNED_INT_10F_11F_11F_REV && comps == 3) { + DECLARE_ROW_POINTERS0(GLuint); + + GLfloat res[3]; + GLfloat rowAj[3], rowBj[3], rowCj[3], rowDj[3]; + GLfloat rowAk[3], rowBk[3], rowCk[3], rowDk[3]; + + for (i = j = 0, k = k0; i < (GLuint) dstWidth; + i++, j += colStride, k += colStride) { + r11g11b10f_to_float3(rowA[j], rowAj); + r11g11b10f_to_float3(rowB[j], rowBj); + r11g11b10f_to_float3(rowC[j], rowCj); + r11g11b10f_to_float3(rowD[j], rowDj); + r11g11b10f_to_float3(rowA[k], rowAk); + r11g11b10f_to_float3(rowB[k], rowBk); + r11g11b10f_to_float3(rowC[k], rowCk); + r11g11b10f_to_float3(rowD[k], rowDk); + res[0] = (rowAj[0] + rowAk[0] + rowBj[0] + rowBk[0] + + rowCj[0] + rowCk[0] + rowDj[0] + rowDk[0]) * 0.125F; + res[1] = (rowAj[1] + rowAk[1] + rowBj[1] + rowBk[1] + + rowCj[1] + rowCk[1] + rowDj[1] + rowDk[1]) * 0.125F; + res[2] = (rowAj[2] + rowAk[2] + rowBj[2] + rowBk[2] + + rowCj[2] + rowCk[2] + rowDj[2] + rowDk[2]) * 0.125F; + dst[i] = float3_to_r11g11b10f(res); + } + } + + else { + _mesa_problem(NULL, "bad format in do_row()"); + } +} + + +/* + * These functions generate a 1/2-size mipmap image from a source image. + * Texture borders are handled by copying or averaging the source image's + * border texels, depending on the scale-down factor. + */ + +static void +make_1d_mipmap(GLenum datatype, GLuint comps, GLint border, + GLint srcWidth, const GLubyte *srcPtr, + GLint dstWidth, GLubyte *dstPtr) +{ + const GLint bpt = bytes_per_pixel(datatype, comps); + const GLubyte *src; + GLubyte *dst; + + /* skip the border pixel, if any */ + src = srcPtr + border * bpt; + dst = dstPtr + border * bpt; + + /* we just duplicate the input row, kind of hack, saves code */ + do_row(datatype, comps, srcWidth - 2 * border, src, src, + dstWidth - 2 * border, dst); + + if (border) { + /* copy left-most pixel from source */ + assert(dstPtr); + assert(srcPtr); + memcpy(dstPtr, srcPtr, bpt); + /* copy right-most pixel from source */ + memcpy(dstPtr + (dstWidth - 1) * bpt, + srcPtr + (srcWidth - 1) * bpt, + bpt); + } +} + + +static void +make_2d_mipmap(GLenum datatype, GLuint comps, GLint border, + GLint srcWidth, GLint srcHeight, + const GLubyte *srcPtr, GLint srcRowStride, + GLint dstWidth, GLint dstHeight, + GLubyte *dstPtr, GLint dstRowStride) +{ + const GLint bpt = bytes_per_pixel(datatype, comps); + const GLint srcWidthNB = srcWidth - 2 * border; /* sizes w/out border */ + const GLint dstWidthNB = dstWidth - 2 * border; + const GLint dstHeightNB = dstHeight - 2 * border; + const GLint srcRowBytes = bpt * srcRowStride; + const GLint dstRowBytes = bpt * dstRowStride; + const GLubyte *srcA, *srcB; + GLubyte *dst; + GLint row, srcRowStep; + + /* Compute src and dst pointers, skipping any border */ + srcA = srcPtr + border * ((srcWidth + 1) * bpt); + if (srcHeight > 1 && srcHeight > dstHeight) { + /* sample from two source rows */ + srcB = srcA + srcRowBytes; + srcRowStep = 2; + } + else { + /* sample from one source row */ + srcB = srcA; + srcRowStep = 1; + } + + dst = dstPtr + border * ((dstWidth + 1) * bpt); + + for (row = 0; row < dstHeightNB; row++) { + do_row(datatype, comps, srcWidthNB, srcA, srcB, + dstWidthNB, dst); + srcA += srcRowStep * srcRowBytes; + srcB += srcRowStep * srcRowBytes; + dst += dstRowBytes; + } + + /* This is ugly but probably won't be used much */ + if (border > 0) { + /* fill in dest border */ + /* lower-left border pixel */ + assert(dstPtr); + assert(srcPtr); + memcpy(dstPtr, srcPtr, bpt); + /* lower-right border pixel */ + memcpy(dstPtr + (dstWidth - 1) * bpt, + srcPtr + (srcWidth - 1) * bpt, bpt); + /* upper-left border pixel */ + memcpy(dstPtr + dstWidth * (dstHeight - 1) * bpt, + srcPtr + srcWidth * (srcHeight - 1) * bpt, bpt); + /* upper-right border pixel */ + memcpy(dstPtr + (dstWidth * dstHeight - 1) * bpt, + srcPtr + (srcWidth * srcHeight - 1) * bpt, bpt); + /* lower border */ + do_row(datatype, comps, srcWidthNB, + srcPtr + bpt, + srcPtr + bpt, + dstWidthNB, dstPtr + bpt); + /* upper border */ + do_row(datatype, comps, srcWidthNB, + srcPtr + (srcWidth * (srcHeight - 1) + 1) * bpt, + srcPtr + (srcWidth * (srcHeight - 1) + 1) * bpt, + dstWidthNB, + dstPtr + (dstWidth * (dstHeight - 1) + 1) * bpt); + /* left and right borders */ + if (srcHeight == dstHeight) { + /* copy border pixel from src to dst */ + for (row = 1; row < srcHeight; row++) { + memcpy(dstPtr + dstWidth * row * bpt, + srcPtr + srcWidth * row * bpt, bpt); + memcpy(dstPtr + (dstWidth * row + dstWidth - 1) * bpt, + srcPtr + (srcWidth * row + srcWidth - 1) * bpt, bpt); + } + } + else { + /* average two src pixels each dest pixel */ + for (row = 0; row < dstHeightNB; row += 2) { + do_row(datatype, comps, 1, + srcPtr + (srcWidth * (row * 2 + 1)) * bpt, + srcPtr + (srcWidth * (row * 2 + 2)) * bpt, + 1, dstPtr + (dstWidth * row + 1) * bpt); + do_row(datatype, comps, 1, + srcPtr + (srcWidth * (row * 2 + 1) + srcWidth - 1) * bpt, + srcPtr + (srcWidth * (row * 2 + 2) + srcWidth - 1) * bpt, + 1, dstPtr + (dstWidth * row + 1 + dstWidth - 1) * bpt); + } + } + } +} + + +static void +make_3d_mipmap(GLenum datatype, GLuint comps, GLint border, + GLint srcWidth, GLint srcHeight, GLint srcDepth, + const GLubyte *srcPtr, GLint srcRowStride, + GLint dstWidth, GLint dstHeight, GLint dstDepth, + GLubyte *dstPtr, GLint dstRowStride) +{ + const GLint bpt = bytes_per_pixel(datatype, comps); + const GLint srcWidthNB = srcWidth - 2 * border; /* sizes w/out border */ + const GLint srcDepthNB = srcDepth - 2 * border; + const GLint dstWidthNB = dstWidth - 2 * border; + const GLint dstHeightNB = dstHeight - 2 * border; + const GLint dstDepthNB = dstDepth - 2 * border; + GLint img, row; + GLint bytesPerSrcImage, bytesPerDstImage; + GLint bytesPerSrcRow, bytesPerDstRow; + GLint srcImageOffset, srcRowOffset; + + (void) srcDepthNB; /* silence warnings */ + + + bytesPerSrcImage = srcWidth * srcHeight * bpt; + bytesPerDstImage = dstWidth * dstHeight * bpt; + + bytesPerSrcRow = srcWidth * bpt; + bytesPerDstRow = dstWidth * bpt; + + /* Offset between adjacent src images to be averaged together */ + srcImageOffset = (srcDepth == dstDepth) ? 0 : bytesPerSrcImage; + + /* Offset between adjacent src rows to be averaged together */ + srcRowOffset = (srcHeight == dstHeight) ? 0 : srcWidth * bpt; + + /* + * Need to average together up to 8 src pixels for each dest pixel. + * Break that down into 3 operations: + * 1. take two rows from source image and average them together. + * 2. take two rows from next source image and average them together. + * 3. take the two averaged rows and average them for the final dst row. + */ + + /* + printf("mip3d %d x %d x %d -> %d x %d x %d\n", + srcWidth, srcHeight, srcDepth, dstWidth, dstHeight, dstDepth); + */ + + for (img = 0; img < dstDepthNB; img++) { + /* first source image pointer, skipping border */ + const GLubyte *imgSrcA = srcPtr + + (bytesPerSrcImage + bytesPerSrcRow + border) * bpt * border + + img * (bytesPerSrcImage + srcImageOffset); + /* second source image pointer, skipping border */ + const GLubyte *imgSrcB = imgSrcA + srcImageOffset; + /* address of the dest image, skipping border */ + GLubyte *imgDst = dstPtr + + (bytesPerDstImage + bytesPerDstRow + border) * bpt * border + + img * bytesPerDstImage; + + /* setup the four source row pointers and the dest row pointer */ + const GLubyte *srcImgARowA = imgSrcA; + const GLubyte *srcImgARowB = imgSrcA + srcRowOffset; + const GLubyte *srcImgBRowA = imgSrcB; + const GLubyte *srcImgBRowB = imgSrcB + srcRowOffset; + GLubyte *dstImgRow = imgDst; + + for (row = 0; row < dstHeightNB; row++) { + do_row_3D(datatype, comps, srcWidthNB, + srcImgARowA, srcImgARowB, + srcImgBRowA, srcImgBRowB, + dstWidthNB, dstImgRow); + + /* advance to next rows */ + srcImgARowA += bytesPerSrcRow + srcRowOffset; + srcImgARowB += bytesPerSrcRow + srcRowOffset; + srcImgBRowA += bytesPerSrcRow + srcRowOffset; + srcImgBRowB += bytesPerSrcRow + srcRowOffset; + dstImgRow += bytesPerDstRow; + } + } + + + /* Luckily we can leverage the make_2d_mipmap() function here! */ + if (border > 0) { + /* do front border image */ + make_2d_mipmap(datatype, comps, 1, srcWidth, srcHeight, srcPtr, srcRowStride, + dstWidth, dstHeight, dstPtr, dstRowStride); + /* do back border image */ + make_2d_mipmap(datatype, comps, 1, srcWidth, srcHeight, + srcPtr + bytesPerSrcImage * (srcDepth - 1), srcRowStride, + dstWidth, dstHeight, + dstPtr + bytesPerDstImage * (dstDepth - 1), dstRowStride); + /* do four remaining border edges that span the image slices */ + if (srcDepth == dstDepth) { + /* just copy border pixels from src to dst */ + for (img = 0; img < dstDepthNB; img++) { + const GLubyte *src; + GLubyte *dst; + + /* do border along [img][row=0][col=0] */ + src = srcPtr + (img + 1) * bytesPerSrcImage; + dst = dstPtr + (img + 1) * bytesPerDstImage; + memcpy(dst, src, bpt); + + /* do border along [img][row=dstHeight-1][col=0] */ + src = srcPtr + (img * 2 + 1) * bytesPerSrcImage + + (srcHeight - 1) * bytesPerSrcRow; + dst = dstPtr + (img + 1) * bytesPerDstImage + + (dstHeight - 1) * bytesPerDstRow; + memcpy(dst, src, bpt); + + /* do border along [img][row=0][col=dstWidth-1] */ + src = srcPtr + (img * 2 + 1) * bytesPerSrcImage + + (srcWidth - 1) * bpt; + dst = dstPtr + (img + 1) * bytesPerDstImage + + (dstWidth - 1) * bpt; + memcpy(dst, src, bpt); + + /* do border along [img][row=dstHeight-1][col=dstWidth-1] */ + src = srcPtr + (img * 2 + 1) * bytesPerSrcImage + + (bytesPerSrcImage - bpt); + dst = dstPtr + (img + 1) * bytesPerDstImage + + (bytesPerDstImage - bpt); + memcpy(dst, src, bpt); + } + } + else { + /* average border pixels from adjacent src image pairs */ + ASSERT(srcDepthNB == 2 * dstDepthNB); + for (img = 0; img < dstDepthNB; img++) { + const GLubyte *src; + GLubyte *dst; + + /* do border along [img][row=0][col=0] */ + src = srcPtr + (img * 2 + 1) * bytesPerSrcImage; + dst = dstPtr + (img + 1) * bytesPerDstImage; + do_row(datatype, comps, 1, src, src + srcImageOffset, 1, dst); + + /* do border along [img][row=dstHeight-1][col=0] */ + src = srcPtr + (img * 2 + 1) * bytesPerSrcImage + + (srcHeight - 1) * bytesPerSrcRow; + dst = dstPtr + (img + 1) * bytesPerDstImage + + (dstHeight - 1) * bytesPerDstRow; + do_row(datatype, comps, 1, src, src + srcImageOffset, 1, dst); + + /* do border along [img][row=0][col=dstWidth-1] */ + src = srcPtr + (img * 2 + 1) * bytesPerSrcImage + + (srcWidth - 1) * bpt; + dst = dstPtr + (img + 1) * bytesPerDstImage + + (dstWidth - 1) * bpt; + do_row(datatype, comps, 1, src, src + srcImageOffset, 1, dst); + + /* do border along [img][row=dstHeight-1][col=dstWidth-1] */ + src = srcPtr + (img * 2 + 1) * bytesPerSrcImage + + (bytesPerSrcImage - bpt); + dst = dstPtr + (img + 1) * bytesPerDstImage + + (bytesPerDstImage - bpt); + do_row(datatype, comps, 1, src, src + srcImageOffset, 1, dst); + } + } + } +} + + +static void +make_1d_stack_mipmap(GLenum datatype, GLuint comps, GLint border, + GLint srcWidth, const GLubyte *srcPtr, GLuint srcRowStride, + GLint dstWidth, GLint dstHeight, + GLubyte *dstPtr, GLuint dstRowStride ) +{ + const GLint bpt = bytes_per_pixel(datatype, comps); + const GLint srcWidthNB = srcWidth - 2 * border; /* sizes w/out border */ + const GLint dstWidthNB = dstWidth - 2 * border; + const GLint dstHeightNB = dstHeight - 2 * border; + const GLint srcRowBytes = bpt * srcRowStride; + const GLint dstRowBytes = bpt * dstRowStride; + const GLubyte *src; + GLubyte *dst; + GLint row; + + /* Compute src and dst pointers, skipping any border */ + src = srcPtr + border * ((srcWidth + 1) * bpt); + dst = dstPtr + border * ((dstWidth + 1) * bpt); + + for (row = 0; row < dstHeightNB; row++) { + do_row(datatype, comps, srcWidthNB, src, src, + dstWidthNB, dst); + src += srcRowBytes; + dst += dstRowBytes; + } + + if (border) { + /* copy left-most pixel from source */ + assert(dstPtr); + assert(srcPtr); + memcpy(dstPtr, srcPtr, bpt); + /* copy right-most pixel from source */ + memcpy(dstPtr + (dstWidth - 1) * bpt, + srcPtr + (srcWidth - 1) * bpt, + bpt); + } +} + + +/** + * \bug + * There is quite a bit of refactoring that could be done with this function + * and \c make_2d_mipmap. + */ +static void +make_2d_stack_mipmap(GLenum datatype, GLuint comps, GLint border, + GLint srcWidth, GLint srcHeight, + const GLubyte *srcPtr, GLint srcRowStride, + GLint dstWidth, GLint dstHeight, GLint dstDepth, + GLubyte *dstPtr, GLint dstRowStride) +{ + const GLint bpt = bytes_per_pixel(datatype, comps); + const GLint srcWidthNB = srcWidth - 2 * border; /* sizes w/out border */ + const GLint dstWidthNB = dstWidth - 2 * border; + const GLint dstHeightNB = dstHeight - 2 * border; + const GLint dstDepthNB = dstDepth - 2 * border; + const GLint srcRowBytes = bpt * srcRowStride; + const GLint dstRowBytes = bpt * dstRowStride; + const GLubyte *srcA, *srcB; + GLubyte *dst; + GLint layer; + GLint row; + + /* Compute src and dst pointers, skipping any border */ + srcA = srcPtr + border * ((srcWidth + 1) * bpt); + if (srcHeight > 1) + srcB = srcA + srcRowBytes; + else + srcB = srcA; + dst = dstPtr + border * ((dstWidth + 1) * bpt); + + for (layer = 0; layer < dstDepthNB; layer++) { + for (row = 0; row < dstHeightNB; row++) { + do_row(datatype, comps, srcWidthNB, srcA, srcB, + dstWidthNB, dst); + srcA += 2 * srcRowBytes; + srcB += 2 * srcRowBytes; + dst += dstRowBytes; + } + + /* This is ugly but probably won't be used much */ + if (border > 0) { + /* fill in dest border */ + /* lower-left border pixel */ + assert(dstPtr); + assert(srcPtr); + memcpy(dstPtr, srcPtr, bpt); + /* lower-right border pixel */ + memcpy(dstPtr + (dstWidth - 1) * bpt, + srcPtr + (srcWidth - 1) * bpt, bpt); + /* upper-left border pixel */ + memcpy(dstPtr + dstWidth * (dstHeight - 1) * bpt, + srcPtr + srcWidth * (srcHeight - 1) * bpt, bpt); + /* upper-right border pixel */ + memcpy(dstPtr + (dstWidth * dstHeight - 1) * bpt, + srcPtr + (srcWidth * srcHeight - 1) * bpt, bpt); + /* lower border */ + do_row(datatype, comps, srcWidthNB, + srcPtr + bpt, + srcPtr + bpt, + dstWidthNB, dstPtr + bpt); + /* upper border */ + do_row(datatype, comps, srcWidthNB, + srcPtr + (srcWidth * (srcHeight - 1) + 1) * bpt, + srcPtr + (srcWidth * (srcHeight - 1) + 1) * bpt, + dstWidthNB, + dstPtr + (dstWidth * (dstHeight - 1) + 1) * bpt); + /* left and right borders */ + if (srcHeight == dstHeight) { + /* copy border pixel from src to dst */ + for (row = 1; row < srcHeight; row++) { + memcpy(dstPtr + dstWidth * row * bpt, + srcPtr + srcWidth * row * bpt, bpt); + memcpy(dstPtr + (dstWidth * row + dstWidth - 1) * bpt, + srcPtr + (srcWidth * row + srcWidth - 1) * bpt, bpt); + } + } + else { + /* average two src pixels each dest pixel */ + for (row = 0; row < dstHeightNB; row += 2) { + do_row(datatype, comps, 1, + srcPtr + (srcWidth * (row * 2 + 1)) * bpt, + srcPtr + (srcWidth * (row * 2 + 2)) * bpt, + 1, dstPtr + (dstWidth * row + 1) * bpt); + do_row(datatype, comps, 1, + srcPtr + (srcWidth * (row * 2 + 1) + srcWidth - 1) * bpt, + srcPtr + (srcWidth * (row * 2 + 2) + srcWidth - 1) * bpt, + 1, dstPtr + (dstWidth * row + 1 + dstWidth - 1) * bpt); + } + } + } + } +} + + +/** + * Down-sample a texture image to produce the next lower mipmap level. + * \param comps components per texel (1, 2, 3 or 4) + * \param srcRowStride stride between source rows, in texels + * \param dstRowStride stride between destination rows, in texels + */ +void +_mesa_generate_mipmap_level(GLenum target, + GLenum datatype, GLuint comps, + GLint border, + GLint srcWidth, GLint srcHeight, GLint srcDepth, + const GLubyte *srcData, + GLint srcRowStride, + GLint dstWidth, GLint dstHeight, GLint dstDepth, + GLubyte *dstData, + GLint dstRowStride) +{ + /* + * We use simple 2x2 averaging to compute the next mipmap level. + */ + switch (target) { + case GL_TEXTURE_1D: + make_1d_mipmap(datatype, comps, border, + srcWidth, srcData, + dstWidth, dstData); + break; + case GL_TEXTURE_2D: + case GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB: + case GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB: + case GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB: + case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB: + case GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB: + case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB: + make_2d_mipmap(datatype, comps, border, + srcWidth, srcHeight, srcData, srcRowStride, + dstWidth, dstHeight, dstData, dstRowStride); + break; + case GL_TEXTURE_3D: + make_3d_mipmap(datatype, comps, border, + srcWidth, srcHeight, srcDepth, + srcData, srcRowStride, + dstWidth, dstHeight, dstDepth, + dstData, dstRowStride); + break; + case GL_TEXTURE_1D_ARRAY_EXT: + make_1d_stack_mipmap(datatype, comps, border, + srcWidth, srcData, srcRowStride, + dstWidth, dstHeight, + dstData, dstRowStride); + break; + case GL_TEXTURE_2D_ARRAY_EXT: + make_2d_stack_mipmap(datatype, comps, border, + srcWidth, srcHeight, + srcData, srcRowStride, + dstWidth, dstHeight, + dstDepth, dstData, dstRowStride); + break; + case GL_TEXTURE_RECTANGLE_NV: + /* no mipmaps, do nothing */ + break; + default: + _mesa_problem(NULL, "bad dimensions in _mesa_generate_mipmaps"); + return; + } +} + + +/** + * compute next (level+1) image size + * \return GL_FALSE if no smaller size can be generated (eg. src is 1x1x1 size) + */ +static GLboolean +next_mipmap_level_size(GLenum target, GLint border, + GLint srcWidth, GLint srcHeight, GLint srcDepth, + GLint *dstWidth, GLint *dstHeight, GLint *dstDepth) +{ + if (srcWidth - 2 * border > 1) { + *dstWidth = (srcWidth - 2 * border) / 2 + 2 * border; + } + else { + *dstWidth = srcWidth; /* can't go smaller */ + } + + if ((srcHeight - 2 * border > 1) && + (target != GL_TEXTURE_1D_ARRAY_EXT)) { + *dstHeight = (srcHeight - 2 * border) / 2 + 2 * border; + } + else { + *dstHeight = srcHeight; /* can't go smaller */ + } + + if ((srcDepth - 2 * border > 1) && + (target != GL_TEXTURE_2D_ARRAY_EXT)) { + *dstDepth = (srcDepth - 2 * border) / 2 + 2 * border; + } + else { + *dstDepth = srcDepth; /* can't go smaller */ + } + + if (*dstWidth == srcWidth && + *dstHeight == srcHeight && + *dstDepth == srcDepth) { + return GL_FALSE; + } + else { + return GL_TRUE; + } +} + +static void +generate_mipmap_uncompressed(struct gl_context *ctx, GLenum target, + struct gl_texture_object *texObj, + const struct gl_texture_image *srcImage, + GLuint maxLevel) +{ + GLint level; + GLenum datatype; + GLuint comps; + + _mesa_format_to_type_and_comps(srcImage->TexFormat, &datatype, &comps); + + for (level = texObj->BaseLevel; level < maxLevel; level++) { + /* generate image[level+1] from image[level] */ + const struct gl_texture_image *srcImage; + struct gl_texture_image *dstImage; + GLint srcWidth, srcHeight, srcDepth; + GLint dstWidth, dstHeight, dstDepth; + GLint border; + GLboolean nextLevel; + + /* get src image parameters */ + srcImage = _mesa_select_tex_image(ctx, texObj, target, level); + ASSERT(srcImage); + srcWidth = srcImage->Width; + srcHeight = srcImage->Height; + srcDepth = srcImage->Depth; + border = srcImage->Border; + + nextLevel = next_mipmap_level_size(target, border, + srcWidth, srcHeight, srcDepth, + &dstWidth, &dstHeight, &dstDepth); + if (!nextLevel) + return; + + /* get dest gl_texture_image */ + dstImage = _mesa_get_tex_image(ctx, texObj, target, level + 1); + if (!dstImage) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "generating mipmaps"); + return; + } + + /* Free old image data */ + if (dstImage->Data) + ctx->Driver.FreeTexImageData(ctx, dstImage); + + /* initialize new image */ + _mesa_init_teximage_fields(ctx, target, dstImage, dstWidth, dstHeight, + dstDepth, border, srcImage->InternalFormat, + srcImage->TexFormat); + dstImage->DriverData = NULL; + dstImage->FetchTexelc = srcImage->FetchTexelc; + dstImage->FetchTexelf = srcImage->FetchTexelf; + + /* Alloc new teximage data buffer */ + { + GLuint size = _mesa_format_image_size(dstImage->TexFormat, + dstWidth, dstHeight, dstDepth); + dstImage->Data = _mesa_alloc_texmemory(size); + if (!dstImage->Data) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "generating mipmaps"); + return; + } + } + + ASSERT(dstImage->TexFormat); + ASSERT(dstImage->FetchTexelc); + ASSERT(dstImage->FetchTexelf); + + _mesa_generate_mipmap_level(target, datatype, comps, border, + srcWidth, srcHeight, srcDepth, + srcImage->Data, srcImage->RowStride, + dstWidth, dstHeight, dstDepth, + dstImage->Data, dstImage->RowStride); + + } /* loop over mipmap levels */ +} + +static void +generate_mipmap_compressed(struct gl_context *ctx, GLenum target, + struct gl_texture_object *texObj, + const struct gl_texture_image *srcImage, + GLuint maxLevel) +{ + GLint level; + gl_format temp_format; + GLenum datatype; + GLuint comps; + GLuint row; + GLint components; + GLuint temp_src_stride, temp_dst_stride; /* in bytes */ + GLchan *temp_src = NULL, *temp_dst = NULL; + + /* Choose the format we will do _mesa_generate_mipmap_level() in, + * and uncompress the firstImage into a temporary of that format. + */ + assert(texObj->Target == GL_TEXTURE_2D || + texObj->Target == GL_TEXTURE_CUBE_MAP_ARB); + + if (srcImage->_BaseFormat == GL_RGB) { + temp_format = MESA_FORMAT_RGB888; + components = 3; + } else if (srcImage->_BaseFormat == GL_RED) { + temp_format = MESA_FORMAT_R8; + components = 1; + } else if (srcImage->_BaseFormat == GL_RG) { + temp_format = MESA_FORMAT_RG88; + components = 2; + } else if (srcImage->_BaseFormat == GL_RGBA) { + temp_format = MESA_FORMAT_RGBA8888; + components = 4; + } else if (srcImage->_BaseFormat == GL_LUMINANCE) { + temp_format = MESA_FORMAT_L8; + components = 1; + } else if (srcImage->_BaseFormat == GL_LUMINANCE_ALPHA) { + temp_format = MESA_FORMAT_AL88; + components = 2; + } else { + _mesa_problem(ctx, "bad srcImage->_BaseFormat in _mesa_generate_mipmaps"); + return; + } + + /* allocate storage for uncompressed GL_RGB or GL_RGBA images */ + temp_src_stride = _mesa_format_row_stride(temp_format, srcImage->Width); + /* 20 extra bytes, just be safe when calling last FetchTexel */ + temp_src = (GLubyte *) malloc(temp_src_stride * srcImage->Height + 20); + if (!temp_src) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "generate mipmaps"); + return; + } + + /* decompress base image to the temporary */ + for (row = 0; row < srcImage->Height; row++) { + GLuint col; + GLchan *dst = (GLchan *) temp_src + temp_src_stride * row; + for (col = 0; col < srcImage->Width; col++) { + srcImage->FetchTexelc(srcImage, col, row, 0, dst); + dst += components; + } + } + + _mesa_format_to_type_and_comps(temp_format, &datatype, &comps); + + for (level = texObj->BaseLevel; level < maxLevel; level++) { + /* generate image[level+1] from image[level] */ + const struct gl_texture_image *srcImage; + struct gl_texture_image *dstImage; + GLint srcWidth, srcHeight, srcDepth; + GLint dstWidth, dstHeight, dstDepth; + GLint border; + GLboolean nextLevel; + + /* get src image parameters */ + srcImage = _mesa_select_tex_image(ctx, texObj, target, level); + ASSERT(srcImage); + srcWidth = srcImage->Width; + srcHeight = srcImage->Height; + srcDepth = srcImage->Depth; + border = srcImage->Border; + + nextLevel = next_mipmap_level_size(target, border, + srcWidth, srcHeight, srcDepth, + &dstWidth, &dstHeight, &dstDepth); + if (!nextLevel) + break; + + temp_dst_stride = _mesa_format_row_stride(temp_format, dstWidth); + if (!temp_dst) { + temp_dst = (GLubyte *) malloc(temp_dst_stride * dstHeight); + if (!temp_dst) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "generate mipmaps"); + break; + } + } + + /* get dest gl_texture_image */ + dstImage = _mesa_get_tex_image(ctx, texObj, target, level + 1); + if (!dstImage) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "generating mipmaps"); + return; + } + + _mesa_generate_mipmap_level(target, datatype, comps, border, + srcWidth, srcHeight, srcDepth, + temp_src, temp_src_stride / components, + dstWidth, dstHeight, dstDepth, + temp_dst, temp_dst_stride / components); + + /* initialize new image */ + _mesa_init_teximage_fields(ctx, target, dstImage, dstWidth, dstHeight, + dstDepth, border, srcImage->InternalFormat, + srcImage->TexFormat); + + ctx->Driver.TexImage2D(ctx, target, level + 1, + srcImage->InternalFormat, + dstWidth, dstHeight, border, + _mesa_get_format_base_format(temp_format), + GL_UNSIGNED_BYTE, + temp_dst, &ctx->DefaultPacking, texObj, dstImage); + + /* swap src and dest pointers */ + { + GLchan *temp = temp_src; + temp_src = temp_dst; + temp_dst = temp; + + temp_src_stride = temp_dst_stride; + } + } /* loop over mipmap levels */ + + free((void *) temp_src); + free(temp_dst); +} + +/** + * Automatic mipmap generation. + * This is the fallback/default function for ctx->Driver.GenerateMipmap(). + * Generate a complete set of mipmaps from texObj's BaseLevel image. + * Stop at texObj's MaxLevel or when we get to the 1x1 texture. + * For cube maps, target will be one of + * GL_TEXTURE_CUBE_MAP_POSITIVE/NEGATIVE_X/Y/Z; never GL_TEXTURE_CUBE_MAP. + */ +void +_mesa_generate_mipmap(struct gl_context *ctx, GLenum target, + struct gl_texture_object *texObj) +{ + const struct gl_texture_image *srcImage; + GLint maxLevel; + + ASSERT(texObj); + srcImage = _mesa_select_tex_image(ctx, texObj, target, texObj->BaseLevel); + ASSERT(srcImage); + + maxLevel = _mesa_max_texture_levels(ctx, texObj->Target) - 1; + ASSERT(maxLevel >= 0); /* bad target */ + + maxLevel = MIN2(maxLevel, texObj->MaxLevel); + + if (_mesa_is_format_compressed(srcImage->TexFormat)) { + generate_mipmap_compressed(ctx, target, texObj, srcImage, maxLevel); + } else { + generate_mipmap_uncompressed(ctx, target, texObj, srcImage, maxLevel); + } +} + + +/** + * Helper function for drivers which need to rescale texture images to + * certain aspect ratios. + * Nearest filtering only (for broken hardware that can't support + * all aspect ratios). This can be made a lot faster, but I don't + * really care enough... + */ +void +_mesa_rescale_teximage2d(GLuint bytesPerPixel, + GLuint srcStrideInPixels, + GLuint dstRowStride, + GLint srcWidth, GLint srcHeight, + GLint dstWidth, GLint dstHeight, + const GLvoid *srcImage, GLvoid *dstImage) +{ + GLint row, col; + +#define INNER_LOOP( TYPE, HOP, WOP ) \ + for ( row = 0 ; row < dstHeight ; row++ ) { \ + GLint srcRow = row HOP hScale; \ + for ( col = 0 ; col < dstWidth ; col++ ) { \ + GLint srcCol = col WOP wScale; \ + dst[col] = src[srcRow * srcStrideInPixels + srcCol]; \ + } \ + dst = (TYPE *) ((GLubyte *) dst + dstRowStride); \ + } \ + +#define RESCALE_IMAGE( TYPE ) \ +do { \ + const TYPE *src = (const TYPE *)srcImage; \ + TYPE *dst = (TYPE *)dstImage; \ + \ + if ( srcHeight < dstHeight ) { \ + const GLint hScale = dstHeight / srcHeight; \ + if ( srcWidth < dstWidth ) { \ + const GLint wScale = dstWidth / srcWidth; \ + INNER_LOOP( TYPE, /, / ); \ + } \ + else { \ + const GLint wScale = srcWidth / dstWidth; \ + INNER_LOOP( TYPE, /, * ); \ + } \ + } \ + else { \ + const GLint hScale = srcHeight / dstHeight; \ + if ( srcWidth < dstWidth ) { \ + const GLint wScale = dstWidth / srcWidth; \ + INNER_LOOP( TYPE, *, / ); \ + } \ + else { \ + const GLint wScale = srcWidth / dstWidth; \ + INNER_LOOP( TYPE, *, * ); \ + } \ + } \ +} while (0) + + switch ( bytesPerPixel ) { + case 4: + RESCALE_IMAGE( GLuint ); + break; + + case 2: + RESCALE_IMAGE( GLushort ); + break; + + case 1: + RESCALE_IMAGE( GLubyte ); + break; + default: + _mesa_problem(NULL,"unexpected bytes/pixel in _mesa_rescale_teximage2d"); + } +} + + +/** + * Upscale an image by replication, not (typical) stretching. + * We use this when the image width or height is less than a + * certain size (4, 8) and we need to upscale an image. + */ +void +_mesa_upscale_teximage2d(GLsizei inWidth, GLsizei inHeight, + GLsizei outWidth, GLsizei outHeight, + GLint comps, const GLchan *src, GLint srcRowStride, + GLchan *dest ) +{ + GLint i, j, k; + + ASSERT(outWidth >= inWidth); + ASSERT(outHeight >= inHeight); +#if 0 + ASSERT(inWidth == 1 || inWidth == 2 || inHeight == 1 || inHeight == 2); + ASSERT((outWidth & 3) == 0); + ASSERT((outHeight & 3) == 0); +#endif + + for (i = 0; i < outHeight; i++) { + const GLint ii = i % inHeight; + for (j = 0; j < outWidth; j++) { + const GLint jj = j % inWidth; + for (k = 0; k < comps; k++) { + dest[(i * outWidth + j) * comps + k] + = src[ii * srcRowStride + jj * comps + k]; + } + } + } +} + diff --git a/mesalib/src/mesa/state_tracker/st_atom_blend.c b/mesalib/src/mesa/state_tracker/st_atom_blend.c index c22d4c42e..c02ea3ffa 100644 --- a/mesalib/src/mesa/state_tracker/st_atom_blend.c +++ b/mesalib/src/mesa/state_tracker/st_atom_blend.c @@ -156,7 +156,7 @@ translate_logicop(GLenum logicop) * Figure out if colormasks are different per rt.
*/
static GLboolean
-colormask_per_rt(struct gl_context *ctx)
+colormask_per_rt(const struct gl_context *ctx)
{
/* a bit suboptimal have to compare lots of values */
unsigned i;
@@ -172,7 +172,7 @@ colormask_per_rt(struct gl_context *ctx) * Figure out if blend enables/state are different per rt.
*/
static GLboolean
-blend_per_rt(struct gl_context *ctx)
+blend_per_rt(const struct gl_context *ctx)
{
if (ctx->Color.BlendEnabled &&
(ctx->Color.BlendEnabled != ((1 << ctx->Const.MaxDrawBuffers) - 1))) {
@@ -190,13 +190,14 @@ static void update_blend( struct st_context *st )
{
struct pipe_blend_state *blend = &st->state.blend;
+ const struct gl_context *ctx = st->ctx;
unsigned num_state = 1;
unsigned i, j;
memset(blend, 0, sizeof(*blend));
- if (blend_per_rt(st->ctx) || colormask_per_rt(st->ctx)) {
- num_state = st->ctx->Const.MaxDrawBuffers;
+ if (blend_per_rt(ctx) || colormask_per_rt(ctx)) {
+ num_state = ctx->Const.MaxDrawBuffers;
blend->independent_blend_enable = 1;
}
/* Note it is impossible to correctly deal with EXT_blend_logic_op and
@@ -205,52 +206,52 @@ update_blend( struct st_context *st ) and separate alpha/rgb logicop/blend support respectively. Neither
possible in gallium nor most hardware. Assume these combinations
don't happen. */
- if (st->ctx->Color.ColorLogicOpEnabled ||
- (st->ctx->Color.BlendEnabled &&
- st->ctx->Color.Blend[0].EquationRGB == GL_LOGIC_OP)) {
+ if (ctx->Color.ColorLogicOpEnabled ||
+ (ctx->Color.BlendEnabled &&
+ ctx->Color.Blend[0].EquationRGB == GL_LOGIC_OP)) {
/* logicop enabled */
blend->logicop_enable = 1;
- blend->logicop_func = translate_logicop(st->ctx->Color.LogicOp);
+ blend->logicop_func = translate_logicop(ctx->Color.LogicOp);
}
- else if (st->ctx->Color.BlendEnabled) {
+ else if (ctx->Color.BlendEnabled) {
/* blending enabled */
for (i = 0, j = 0; i < num_state; i++) {
- blend->rt[i].blend_enable = (st->ctx->Color.BlendEnabled >> i) & 0x1;
+ blend->rt[i].blend_enable = (ctx->Color.BlendEnabled >> i) & 0x1;
- if (st->ctx->Extensions.ARB_draw_buffers_blend)
+ if (ctx->Extensions.ARB_draw_buffers_blend)
j = i;
blend->rt[i].rgb_func =
- translate_blend(st->ctx->Color.Blend[j].EquationRGB);
+ translate_blend(ctx->Color.Blend[j].EquationRGB);
- if (st->ctx->Color.Blend[i].EquationRGB == GL_MIN ||
- st->ctx->Color.Blend[i].EquationRGB == GL_MAX) {
+ if (ctx->Color.Blend[i].EquationRGB == GL_MIN ||
+ ctx->Color.Blend[i].EquationRGB == GL_MAX) {
/* Min/max are special */
blend->rt[i].rgb_src_factor = PIPE_BLENDFACTOR_ONE;
blend->rt[i].rgb_dst_factor = PIPE_BLENDFACTOR_ONE;
}
else {
blend->rt[i].rgb_src_factor =
- translate_blend(st->ctx->Color.Blend[j].SrcRGB);
+ translate_blend(ctx->Color.Blend[j].SrcRGB);
blend->rt[i].rgb_dst_factor =
- translate_blend(st->ctx->Color.Blend[j].DstRGB);
+ translate_blend(ctx->Color.Blend[j].DstRGB);
}
blend->rt[i].alpha_func =
- translate_blend(st->ctx->Color.Blend[j].EquationA);
+ translate_blend(ctx->Color.Blend[j].EquationA);
- if (st->ctx->Color.Blend[i].EquationA == GL_MIN ||
- st->ctx->Color.Blend[i].EquationA == GL_MAX) {
+ if (ctx->Color.Blend[i].EquationA == GL_MIN ||
+ ctx->Color.Blend[i].EquationA == GL_MAX) {
/* Min/max are special */
blend->rt[i].alpha_src_factor = PIPE_BLENDFACTOR_ONE;
blend->rt[i].alpha_dst_factor = PIPE_BLENDFACTOR_ONE;
}
else {
blend->rt[i].alpha_src_factor =
- translate_blend(st->ctx->Color.Blend[j].SrcA);
+ translate_blend(ctx->Color.Blend[j].SrcA);
blend->rt[i].alpha_dst_factor =
- translate_blend(st->ctx->Color.Blend[j].DstA);
+ translate_blend(ctx->Color.Blend[j].DstA);
}
}
}
@@ -260,25 +261,25 @@ update_blend( struct st_context *st ) /* Colormask - maybe reverse these bits? */
for (i = 0; i < num_state; i++) {
- if (st->ctx->Color.ColorMask[i][0])
+ if (ctx->Color.ColorMask[i][0])
blend->rt[i].colormask |= PIPE_MASK_R;
- if (st->ctx->Color.ColorMask[i][1])
+ if (ctx->Color.ColorMask[i][1])
blend->rt[i].colormask |= PIPE_MASK_G;
- if (st->ctx->Color.ColorMask[i][2])
+ if (ctx->Color.ColorMask[i][2])
blend->rt[i].colormask |= PIPE_MASK_B;
- if (st->ctx->Color.ColorMask[i][3])
+ if (ctx->Color.ColorMask[i][3])
blend->rt[i].colormask |= PIPE_MASK_A;
}
- if (st->ctx->Color.DitherFlag)
+ if (ctx->Color.DitherFlag)
blend->dither = 1;
- if (st->ctx->Multisample.Enabled) {
+ if (ctx->Multisample.Enabled) {
/* unlike in gallium/d3d10 these operations are only performed
if msaa is enabled */
- if (st->ctx->Multisample.SampleAlphaToCoverage)
+ if (ctx->Multisample.SampleAlphaToCoverage)
blend->alpha_to_coverage = 1;
- if (st->ctx->Multisample.SampleAlphaToOne)
+ if (ctx->Multisample.SampleAlphaToOne)
blend->alpha_to_one = 1;
}
@@ -286,7 +287,7 @@ update_blend( struct st_context *st ) {
struct pipe_blend_color bc;
- COPY_4FV(bc.color, st->ctx->Color.BlendColorUnclamped);
+ COPY_4FV(bc.color, ctx->Color.BlendColorUnclamped);
cso_set_blend_color(st->cso_context, &bc);
}
}
diff --git a/mesalib/src/mesa/state_tracker/st_atom_clip.c b/mesalib/src/mesa/state_tracker/st_atom_clip.c index 24d479a74..1330db843 100644 --- a/mesalib/src/mesa/state_tracker/st_atom_clip.c +++ b/mesalib/src/mesa/state_tracker/st_atom_clip.c @@ -1,75 +1,76 @@ -/**************************************************************************
- *
- * Copyright 2007 Tungsten Graphics, 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 TUNGSTEN GRAPHICS 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:
- * Keith Whitwell <keith@tungstengraphics.com>
- */
-
-
-#include "st_context.h"
-#include "pipe/p_context.h"
-#include "st_atom.h"
-
-#include "cso_cache/cso_context.h"
-
-
-/* Second state atom for user clip planes:
- */
-static void update_clip( struct st_context *st )
-{
- struct pipe_clip_state clip;
- GLuint i;
-
- memset(&clip, 0, sizeof(clip));
-
- for (i = 0; i < PIPE_MAX_CLIP_PLANES; i++) {
- if (st->ctx->Transform.ClipPlanesEnabled & (1 << i)) {
- memcpy(clip.ucp[clip.nr],
- st->ctx->Transform._ClipUserPlane[i],
- sizeof(clip.ucp[0]));
- clip.nr++;
- }
- }
-
- clip.depth_clamp = st->ctx->Transform.DepthClamp != GL_FALSE;
-
- if (memcmp(&clip, &st->state.clip, sizeof(clip)) != 0) {
- st->state.clip = clip;
- cso_set_clip(st->cso_context, &clip);
- }
-}
-
-
-const struct st_tracked_state st_update_clip = {
- "st_update_clip", /* name */
- { /* dirty */
- (_NEW_TRANSFORM), /* mesa */
- 0, /* st */
- },
- update_clip /* update */
-};
+/************************************************************************** + * + * Copyright 2007 Tungsten Graphics, 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 TUNGSTEN GRAPHICS 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: + * Keith Whitwell <keith@tungstengraphics.com> + */ + + +#include "st_context.h" +#include "pipe/p_context.h" +#include "st_atom.h" + +#include "cso_cache/cso_context.h" + + +/* Second state atom for user clip planes: + */ +static void update_clip( struct st_context *st ) +{ + struct pipe_clip_state clip; + const struct gl_context *ctx = st->ctx; + GLuint i; + + memset(&clip, 0, sizeof(clip)); + + for (i = 0; i < PIPE_MAX_CLIP_PLANES; i++) { + if (ctx->Transform.ClipPlanesEnabled & (1 << i)) { + memcpy(clip.ucp[clip.nr], + ctx->Transform._ClipUserPlane[i], + sizeof(clip.ucp[0])); + clip.nr++; + } + } + + clip.depth_clamp = ctx->Transform.DepthClamp != GL_FALSE; + + if (memcmp(&clip, &st->state.clip, sizeof(clip)) != 0) { + st->state.clip = clip; + cso_set_clip(st->cso_context, &clip); + } +} + + +const struct st_tracked_state st_update_clip = { + "st_update_clip", /* name */ + { /* dirty */ + (_NEW_TRANSFORM), /* mesa */ + 0, /* st */ + }, + update_clip /* update */ +}; diff --git a/mesalib/src/mesa/state_tracker/st_atom_sampler.c b/mesalib/src/mesa/state_tracker/st_atom_sampler.c index 627a13387..731338f9b 100644 --- a/mesalib/src/mesa/state_tracker/st_atom_sampler.c +++ b/mesalib/src/mesa/state_tracker/st_atom_sampler.c @@ -1,271 +1,279 @@ -/**************************************************************************
- *
- * Copyright 2007 Tungsten Graphics, 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 TUNGSTEN GRAPHICS 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:
- * Keith Whitwell <keith@tungstengraphics.com>
- * Brian Paul
- */
-
-
-#include "main/macros.h"
-#include "main/mtypes.h"
-#include "main/samplerobj.h"
-
-#include "st_context.h"
-#include "st_cb_texture.h"
-#include "st_format.h"
-#include "st_atom.h"
-#include "st_texture.h"
-#include "pipe/p_context.h"
-#include "pipe/p_defines.h"
-
-#include "cso_cache/cso_context.h"
-
-
-/**
- * Convert GLenum texcoord wrap tokens to pipe tokens.
- */
-static GLuint
-gl_wrap_xlate(GLenum wrap)
-{
- switch (wrap) {
- case GL_REPEAT:
- return PIPE_TEX_WRAP_REPEAT;
- case GL_CLAMP:
- return PIPE_TEX_WRAP_CLAMP;
- case GL_CLAMP_TO_EDGE:
- return PIPE_TEX_WRAP_CLAMP_TO_EDGE;
- case GL_CLAMP_TO_BORDER:
- return PIPE_TEX_WRAP_CLAMP_TO_BORDER;
- case GL_MIRRORED_REPEAT:
- return PIPE_TEX_WRAP_MIRROR_REPEAT;
- case GL_MIRROR_CLAMP_EXT:
- return PIPE_TEX_WRAP_MIRROR_CLAMP;
- case GL_MIRROR_CLAMP_TO_EDGE_EXT:
- return PIPE_TEX_WRAP_MIRROR_CLAMP_TO_EDGE;
- case GL_MIRROR_CLAMP_TO_BORDER_EXT:
- return PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER;
- default:
- assert(0);
- return 0;
- }
-}
-
-
-static GLuint
-gl_filter_to_mip_filter(GLenum filter)
-{
- switch (filter) {
- case GL_NEAREST:
- case GL_LINEAR:
- return PIPE_TEX_MIPFILTER_NONE;
-
- case GL_NEAREST_MIPMAP_NEAREST:
- case GL_LINEAR_MIPMAP_NEAREST:
- return PIPE_TEX_MIPFILTER_NEAREST;
-
- case GL_NEAREST_MIPMAP_LINEAR:
- case GL_LINEAR_MIPMAP_LINEAR:
- return PIPE_TEX_MIPFILTER_LINEAR;
-
- default:
- assert(0);
- return PIPE_TEX_MIPFILTER_NONE;
- }
-}
-
-
-static GLuint
-gl_filter_to_img_filter(GLenum filter)
-{
- switch (filter) {
- case GL_NEAREST:
- case GL_NEAREST_MIPMAP_NEAREST:
- case GL_NEAREST_MIPMAP_LINEAR:
- return PIPE_TEX_FILTER_NEAREST;
-
- case GL_LINEAR:
- case GL_LINEAR_MIPMAP_NEAREST:
- case GL_LINEAR_MIPMAP_LINEAR:
- return PIPE_TEX_FILTER_LINEAR;
-
- default:
- assert(0);
- return PIPE_TEX_FILTER_NEAREST;
- }
-}
-
-static void convert_sampler(struct st_context *st,
- struct pipe_sampler_state *sampler,
- GLuint texUnit)
-{
- struct gl_texture_object *texobj;
- struct gl_sampler_object *msamp;
-
- texobj = st->ctx->Texture.Unit[texUnit]._Current;
- if (!texobj) {
- texobj = st_get_default_texture(st);
- }
-
- msamp = _mesa_get_samplerobj(st->ctx, texUnit);
-
- memset(sampler, 0, sizeof(*sampler));
- sampler->wrap_s = gl_wrap_xlate(msamp->WrapS);
- sampler->wrap_t = gl_wrap_xlate(msamp->WrapT);
- sampler->wrap_r = gl_wrap_xlate(msamp->WrapR);
-
- sampler->min_img_filter = gl_filter_to_img_filter(msamp->MinFilter);
- sampler->min_mip_filter = gl_filter_to_mip_filter(msamp->MinFilter);
- sampler->mag_img_filter = gl_filter_to_img_filter(msamp->MagFilter);
-
- if (texobj->Target != GL_TEXTURE_RECTANGLE_ARB)
- sampler->normalized_coords = 1;
-
- sampler->lod_bias = st->ctx->Texture.Unit[texUnit].LodBias +
- msamp->LodBias;
-
- sampler->min_lod = CLAMP(msamp->MinLod,
- 0.0f,
- (GLfloat) texobj->MaxLevel - texobj->BaseLevel);
- sampler->max_lod = MIN2((GLfloat) texobj->MaxLevel - texobj->BaseLevel,
- msamp->MaxLod);
- if (sampler->max_lod < sampler->min_lod) {
- /* The GL spec doesn't seem to specify what to do in this case.
- * Swap the values.
- */
- float tmp = sampler->max_lod;
- sampler->max_lod = sampler->min_lod;
- sampler->min_lod = tmp;
- assert(sampler->min_lod <= sampler->max_lod);
- }
-
- if (msamp->BorderColor.ui[0] ||
- msamp->BorderColor.ui[1] ||
- msamp->BorderColor.ui[2] ||
- msamp->BorderColor.ui[3]) {
- struct gl_texture_image *teximg;
-
- teximg = texobj->Image[0][texobj->BaseLevel];
-
- st_translate_color(msamp->BorderColor.f,
- teximg ? teximg->_BaseFormat : GL_RGBA,
- sampler->border_color);
- }
-
- sampler->max_anisotropy = (msamp->MaxAnisotropy == 1.0 ?
- 0 : (GLuint) msamp->MaxAnisotropy);
-
- /* only care about ARB_shadow, not SGI shadow */
- if (msamp->CompareMode == GL_COMPARE_R_TO_TEXTURE) {
- sampler->compare_mode = PIPE_TEX_COMPARE_R_TO_TEXTURE;
- sampler->compare_func
- = st_compare_func_to_pipe(msamp->CompareFunc);
- }
-
- sampler->seamless_cube_map =
- st->ctx->Texture.CubeMapSeamless || msamp->CubeMapSeamless;
-}
-
-static void
-update_vertex_samplers(struct st_context *st)
-{
- struct gl_vertex_program *vprog = st->ctx->VertexProgram._Current;
- GLuint su;
-
- st->state.num_vertex_samplers = 0;
-
- /* loop over sampler units (aka tex image units) */
- for (su = 0; su < st->ctx->Const.MaxVertexTextureImageUnits; su++) {
- struct pipe_sampler_state *sampler = st->state.vertex_samplers + su;
-
- if (vprog->Base.SamplersUsed & (1 << su)) {
- GLuint texUnit;
-
- texUnit = vprog->Base.SamplerUnits[su];
-
- convert_sampler(st, sampler, texUnit);
-
- st->state.num_vertex_samplers = su + 1;
-
- cso_single_vertex_sampler(st->cso_context, su, sampler);
- } else {
- cso_single_vertex_sampler(st->cso_context, su, NULL);
- }
- }
- cso_single_vertex_sampler_done(st->cso_context);
-}
-
-static void
-update_fragment_samplers(struct st_context *st)
-{
- struct gl_fragment_program *fprog = st->ctx->FragmentProgram._Current;
- GLuint su;
-
- st->state.num_samplers = 0;
-
- /* loop over sampler units (aka tex image units) */
- for (su = 0; su < st->ctx->Const.MaxTextureImageUnits; su++) {
- struct pipe_sampler_state *sampler = st->state.samplers + su;
-
-
- if (fprog->Base.SamplersUsed & (1 << su)) {
- GLuint texUnit;
-
- texUnit = fprog->Base.SamplerUnits[su];
-
- convert_sampler(st, sampler, texUnit);
-
- st->state.num_samplers = su + 1;
-
- /*printf("%s su=%u non-null\n", __FUNCTION__, su);*/
- cso_single_sampler(st->cso_context, su, sampler);
- }
- else {
- /*printf("%s su=%u null\n", __FUNCTION__, su);*/
- cso_single_sampler(st->cso_context, su, NULL);
- }
- }
-
- cso_single_sampler_done(st->cso_context);
-}
-
-static void
-update_samplers(struct st_context *st)
-{
- update_fragment_samplers(st);
- update_vertex_samplers(st);
-}
-
-const struct st_tracked_state st_update_sampler = {
- "st_update_sampler", /* name */
- { /* dirty */
- _NEW_TEXTURE, /* mesa */
- 0, /* st */
- },
- update_samplers /* update */
-};
+/************************************************************************** + * + * Copyright 2007 Tungsten Graphics, 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 TUNGSTEN GRAPHICS 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: + * Keith Whitwell <keith@tungstengraphics.com> + * Brian Paul + */ + + +#include "main/macros.h" +#include "main/mtypes.h" +#include "main/samplerobj.h" + +#include "st_context.h" +#include "st_cb_texture.h" +#include "st_format.h" +#include "st_atom.h" +#include "st_texture.h" +#include "pipe/p_context.h" +#include "pipe/p_defines.h" + +#include "cso_cache/cso_context.h" + + +/** + * Convert GLenum texcoord wrap tokens to pipe tokens. + */ +static GLuint +gl_wrap_xlate(GLenum wrap) +{ + switch (wrap) { + case GL_REPEAT: + return PIPE_TEX_WRAP_REPEAT; + case GL_CLAMP: + return PIPE_TEX_WRAP_CLAMP; + case GL_CLAMP_TO_EDGE: + return PIPE_TEX_WRAP_CLAMP_TO_EDGE; + case GL_CLAMP_TO_BORDER: + return PIPE_TEX_WRAP_CLAMP_TO_BORDER; + case GL_MIRRORED_REPEAT: + return PIPE_TEX_WRAP_MIRROR_REPEAT; + case GL_MIRROR_CLAMP_EXT: + return PIPE_TEX_WRAP_MIRROR_CLAMP; + case GL_MIRROR_CLAMP_TO_EDGE_EXT: + return PIPE_TEX_WRAP_MIRROR_CLAMP_TO_EDGE; + case GL_MIRROR_CLAMP_TO_BORDER_EXT: + return PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER; + default: + assert(0); + return 0; + } +} + + +static GLuint +gl_filter_to_mip_filter(GLenum filter) +{ + switch (filter) { + case GL_NEAREST: + case GL_LINEAR: + return PIPE_TEX_MIPFILTER_NONE; + + case GL_NEAREST_MIPMAP_NEAREST: + case GL_LINEAR_MIPMAP_NEAREST: + return PIPE_TEX_MIPFILTER_NEAREST; + + case GL_NEAREST_MIPMAP_LINEAR: + case GL_LINEAR_MIPMAP_LINEAR: + return PIPE_TEX_MIPFILTER_LINEAR; + + default: + assert(0); + return PIPE_TEX_MIPFILTER_NONE; + } +} + + +static GLuint +gl_filter_to_img_filter(GLenum filter) +{ + switch (filter) { + case GL_NEAREST: + case GL_NEAREST_MIPMAP_NEAREST: + case GL_NEAREST_MIPMAP_LINEAR: + return PIPE_TEX_FILTER_NEAREST; + + case GL_LINEAR: + case GL_LINEAR_MIPMAP_NEAREST: + case GL_LINEAR_MIPMAP_LINEAR: + return PIPE_TEX_FILTER_LINEAR; + + default: + assert(0); + return PIPE_TEX_FILTER_NEAREST; + } +} + + +static void +convert_sampler(struct st_context *st, + struct pipe_sampler_state *sampler, + GLuint texUnit) +{ + struct gl_texture_object *texobj; + struct gl_context *ctx = st->ctx; + struct gl_sampler_object *msamp; + + texobj = ctx->Texture.Unit[texUnit]._Current; + if (!texobj) { + texobj = st_get_default_texture(st); + } + + msamp = _mesa_get_samplerobj(ctx, texUnit); + + memset(sampler, 0, sizeof(*sampler)); + sampler->wrap_s = gl_wrap_xlate(msamp->WrapS); + sampler->wrap_t = gl_wrap_xlate(msamp->WrapT); + sampler->wrap_r = gl_wrap_xlate(msamp->WrapR); + + sampler->min_img_filter = gl_filter_to_img_filter(msamp->MinFilter); + sampler->min_mip_filter = gl_filter_to_mip_filter(msamp->MinFilter); + sampler->mag_img_filter = gl_filter_to_img_filter(msamp->MagFilter); + + if (texobj->Target != GL_TEXTURE_RECTANGLE_ARB) + sampler->normalized_coords = 1; + + sampler->lod_bias = ctx->Texture.Unit[texUnit].LodBias + msamp->LodBias; + + sampler->min_lod = CLAMP(msamp->MinLod, + 0.0f, + (GLfloat) texobj->MaxLevel - texobj->BaseLevel); + sampler->max_lod = MIN2((GLfloat) texobj->MaxLevel - texobj->BaseLevel, + msamp->MaxLod); + if (sampler->max_lod < sampler->min_lod) { + /* The GL spec doesn't seem to specify what to do in this case. + * Swap the values. + */ + float tmp = sampler->max_lod; + sampler->max_lod = sampler->min_lod; + sampler->min_lod = tmp; + assert(sampler->min_lod <= sampler->max_lod); + } + + if (msamp->BorderColor.ui[0] || + msamp->BorderColor.ui[1] || + msamp->BorderColor.ui[2] || + msamp->BorderColor.ui[3]) { + struct gl_texture_image *teximg; + + teximg = texobj->Image[0][texobj->BaseLevel]; + + st_translate_color(msamp->BorderColor.f, + teximg ? teximg->_BaseFormat : GL_RGBA, + sampler->border_color); + } + + sampler->max_anisotropy = (msamp->MaxAnisotropy == 1.0 ? + 0 : (GLuint) msamp->MaxAnisotropy); + + /* only care about ARB_shadow, not SGI shadow */ + if (msamp->CompareMode == GL_COMPARE_R_TO_TEXTURE) { + sampler->compare_mode = PIPE_TEX_COMPARE_R_TO_TEXTURE; + sampler->compare_func + = st_compare_func_to_pipe(msamp->CompareFunc); + } + + sampler->seamless_cube_map = + ctx->Texture.CubeMapSeamless || msamp->CubeMapSeamless; +} + + +static void +update_vertex_samplers(struct st_context *st) +{ + const struct gl_context *ctx = st->ctx; + struct gl_vertex_program *vprog = ctx->VertexProgram._Current; + GLuint su; + + st->state.num_vertex_samplers = 0; + + /* loop over sampler units (aka tex image units) */ + for (su = 0; su < ctx->Const.MaxVertexTextureImageUnits; su++) { + struct pipe_sampler_state *sampler = st->state.vertex_samplers + su; + + if (vprog->Base.SamplersUsed & (1 << su)) { + GLuint texUnit; + + texUnit = vprog->Base.SamplerUnits[su]; + + convert_sampler(st, sampler, texUnit); + + st->state.num_vertex_samplers = su + 1; + + cso_single_vertex_sampler(st->cso_context, su, sampler); + } else { + cso_single_vertex_sampler(st->cso_context, su, NULL); + } + } + cso_single_vertex_sampler_done(st->cso_context); +} + + +static void +update_fragment_samplers(struct st_context *st) +{ + const struct gl_context *ctx = st->ctx; + struct gl_fragment_program *fprog = ctx->FragmentProgram._Current; + GLuint su; + + st->state.num_samplers = 0; + + /* loop over sampler units (aka tex image units) */ + for (su = 0; su < ctx->Const.MaxTextureImageUnits; su++) { + struct pipe_sampler_state *sampler = st->state.samplers + su; + + + if (fprog->Base.SamplersUsed & (1 << su)) { + GLuint texUnit; + + texUnit = fprog->Base.SamplerUnits[su]; + + convert_sampler(st, sampler, texUnit); + + st->state.num_samplers = su + 1; + + /*printf("%s su=%u non-null\n", __FUNCTION__, su);*/ + cso_single_sampler(st->cso_context, su, sampler); + } + else { + /*printf("%s su=%u null\n", __FUNCTION__, su);*/ + cso_single_sampler(st->cso_context, su, NULL); + } + } + + cso_single_sampler_done(st->cso_context); +} + + +static void +update_samplers(struct st_context *st) +{ + update_fragment_samplers(st); + update_vertex_samplers(st); +} + + +const struct st_tracked_state st_update_sampler = { + "st_update_sampler", /* name */ + { /* dirty */ + _NEW_TEXTURE, /* mesa */ + 0, /* st */ + }, + update_samplers /* update */ +}; diff --git a/mesalib/src/mesa/state_tracker/st_atom_scissor.c b/mesalib/src/mesa/state_tracker/st_atom_scissor.c index 495a3ea25..eb1387778 100644 --- a/mesalib/src/mesa/state_tracker/st_atom_scissor.c +++ b/mesalib/src/mesa/state_tracker/st_atom_scissor.c @@ -1,100 +1,101 @@ -/**************************************************************************
- *
- * Copyright 2007 Tungsten Graphics, 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 TUNGSTEN GRAPHICS 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:
- * Keith Whitwell <keith@tungstengraphics.com>
- */
-
-
-#include "main/macros.h"
-#include "st_context.h"
-#include "pipe/p_context.h"
-#include "st_atom.h"
-
-
-/**
- * Scissor depends on the scissor box, and the framebuffer dimensions.
- */
-static void
-update_scissor( struct st_context *st )
-{
- struct pipe_scissor_state scissor;
- const struct gl_framebuffer *fb = st->ctx->DrawBuffer;
- GLint miny, maxy;
-
- scissor.minx = 0;
- scissor.miny = 0;
- scissor.maxx = fb->Width;
- scissor.maxy = fb->Height;
-
- if (st->ctx->Scissor.Enabled) {
- /* need to be careful here with xmax or ymax < 0 */
- GLint xmax = MAX2(0, st->ctx->Scissor.X + st->ctx->Scissor.Width);
- GLint ymax = MAX2(0, st->ctx->Scissor.Y + st->ctx->Scissor.Height);
-
- if (st->ctx->Scissor.X > (GLint)scissor.minx)
- scissor.minx = st->ctx->Scissor.X;
- if (st->ctx->Scissor.Y > (GLint)scissor.miny)
- scissor.miny = st->ctx->Scissor.Y;
-
- if (xmax < (GLint) scissor.maxx)
- scissor.maxx = xmax;
- if (ymax < (GLint) scissor.maxy)
- scissor.maxy = ymax;
-
- /* check for null space */
- if (scissor.minx >= scissor.maxx || scissor.miny >= scissor.maxy)
- scissor.minx = scissor.miny = scissor.maxx = scissor.maxy = 0;
- }
-
- /* Now invert Y if needed.
- * Gallium drivers use the convention Y=0=top for surfaces.
- */
- if (st_fb_orientation(fb) == Y_0_TOP) {
- miny = fb->Height - scissor.maxy;
- maxy = fb->Height - scissor.miny;
- scissor.miny = miny;
- scissor.maxy = maxy;
- }
-
- if (memcmp(&scissor, &st->state.scissor, sizeof(scissor)) != 0) {
- /* state has changed */
- st->state.scissor = scissor; /* struct copy */
- st->pipe->set_scissor_state(st->pipe, &scissor); /* activate */
- }
-}
-
-
-const struct st_tracked_state st_update_scissor = {
- "st_update_scissor", /* name */
- { /* dirty */
- (_NEW_SCISSOR | _NEW_BUFFERS), /* mesa */
- 0, /* st */
- },
- update_scissor /* update */
-};
+/************************************************************************** + * + * Copyright 2007 Tungsten Graphics, 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 TUNGSTEN GRAPHICS 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: + * Keith Whitwell <keith@tungstengraphics.com> + */ + + +#include "main/macros.h" +#include "st_context.h" +#include "pipe/p_context.h" +#include "st_atom.h" + + +/** + * Scissor depends on the scissor box, and the framebuffer dimensions. + */ +static void +update_scissor( struct st_context *st ) +{ + struct pipe_scissor_state scissor; + const struct gl_context *ctx = st->ctx; + const struct gl_framebuffer *fb = ctx->DrawBuffer; + GLint miny, maxy; + + scissor.minx = 0; + scissor.miny = 0; + scissor.maxx = fb->Width; + scissor.maxy = fb->Height; + + if (ctx->Scissor.Enabled) { + /* need to be careful here with xmax or ymax < 0 */ + GLint xmax = MAX2(0, ctx->Scissor.X + ctx->Scissor.Width); + GLint ymax = MAX2(0, ctx->Scissor.Y + ctx->Scissor.Height); + + if (ctx->Scissor.X > (GLint)scissor.minx) + scissor.minx = ctx->Scissor.X; + if (ctx->Scissor.Y > (GLint)scissor.miny) + scissor.miny = ctx->Scissor.Y; + + if (xmax < (GLint) scissor.maxx) + scissor.maxx = xmax; + if (ymax < (GLint) scissor.maxy) + scissor.maxy = ymax; + + /* check for null space */ + if (scissor.minx >= scissor.maxx || scissor.miny >= scissor.maxy) + scissor.minx = scissor.miny = scissor.maxx = scissor.maxy = 0; + } + + /* Now invert Y if needed. + * Gallium drivers use the convention Y=0=top for surfaces. + */ + if (st_fb_orientation(fb) == Y_0_TOP) { + miny = fb->Height - scissor.maxy; + maxy = fb->Height - scissor.miny; + scissor.miny = miny; + scissor.maxy = maxy; + } + + if (memcmp(&scissor, &st->state.scissor, sizeof(scissor)) != 0) { + /* state has changed */ + st->state.scissor = scissor; /* struct copy */ + st->pipe->set_scissor_state(st->pipe, &scissor); /* activate */ + } +} + + +const struct st_tracked_state st_update_scissor = { + "st_update_scissor", /* name */ + { /* dirty */ + (_NEW_SCISSOR | _NEW_BUFFERS), /* mesa */ + 0, /* st */ + }, + update_scissor /* update */ +}; diff --git a/mesalib/src/mesa/state_tracker/st_atom_stipple.c b/mesalib/src/mesa/state_tracker/st_atom_stipple.c index 5efea315c..b3e0dc7f1 100644 --- a/mesalib/src/mesa/state_tracker/st_atom_stipple.c +++ b/mesalib/src/mesa/state_tracker/st_atom_stipple.c @@ -1,93 +1,94 @@ -/**************************************************************************
- *
- * Copyright 2007 Tungsten Graphics, 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 TUNGSTEN GRAPHICS 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.
- *
- **************************************************************************/
-
- /*
- * \brief polygon stipple state
- *
- * Authors:
- * Brian Paul
- */
-
-
-#include <assert.h>
-
-#include "st_context.h"
-#include "st_atom.h"
-#include "pipe/p_context.h"
-#include "pipe/p_defines.h"
-
-
-/**
- * OpenGL's polygon stipple is indexed with window coordinates in which
- * the origin (0,0) is the lower-left corner of the window.
- * With Gallium, the origin is the upper-left corner of the window.
- * To convert GL's polygon stipple to what gallium expects we need to
- * invert the pattern vertically and rotate the stipple rows according
- * to the window height.
- */
-static void
-invert_stipple(GLuint dest[32], const GLuint src[32], GLuint winHeight)
-{
- GLuint i;
-
- for (i = 0; i < 32; i++) {
- dest[i] = src[(winHeight - 1 - i) & 0x1f];
- }
-}
-
-
-
-static void
-update_stipple( struct st_context *st )
-{
- const GLuint sz = sizeof(st->state.poly_stipple);
- assert(sz == sizeof(st->ctx->PolygonStipple));
-
- if (memcmp(st->state.poly_stipple, st->ctx->PolygonStipple, sz)) {
- /* state has changed */
- struct pipe_poly_stipple newStipple;
-
- memcpy(st->state.poly_stipple, st->ctx->PolygonStipple, sz);
-
- invert_stipple(newStipple.stipple, st->ctx->PolygonStipple,
- st->ctx->DrawBuffer->Height);
-
- st->pipe->set_polygon_stipple(st->pipe, &newStipple);
- }
-}
-
-
-/** Update the stipple when the pattern or window height changes */
-const struct st_tracked_state st_update_polygon_stipple = {
- "st_update_polygon_stipple", /* name */
- { /* dirty */
- (_NEW_POLYGONSTIPPLE |
- _NEW_BUFFERS), /* mesa */
- 0, /* st */
- },
- update_stipple /* update */
-};
+/************************************************************************** + * + * Copyright 2007 Tungsten Graphics, 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 TUNGSTEN GRAPHICS 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. + * + **************************************************************************/ + + /* + * \brief polygon stipple state + * + * Authors: + * Brian Paul + */ + + +#include <assert.h> + +#include "st_context.h" +#include "st_atom.h" +#include "pipe/p_context.h" +#include "pipe/p_defines.h" + + +/** + * OpenGL's polygon stipple is indexed with window coordinates in which + * the origin (0,0) is the lower-left corner of the window. + * With Gallium, the origin is the upper-left corner of the window. + * To convert GL's polygon stipple to what gallium expects we need to + * invert the pattern vertically and rotate the stipple rows according + * to the window height. + */ +static void +invert_stipple(GLuint dest[32], const GLuint src[32], GLuint winHeight) +{ + GLuint i; + + for (i = 0; i < 32; i++) { + dest[i] = src[(winHeight - 1 - i) & 0x1f]; + } +} + + + +static void +update_stipple( struct st_context *st ) +{ + const struct gl_context *ctx = st->ctx; + const GLuint sz = sizeof(st->state.poly_stipple); + assert(sz == sizeof(ctx->PolygonStipple)); + + if (memcmp(st->state.poly_stipple, ctx->PolygonStipple, sz)) { + /* state has changed */ + struct pipe_poly_stipple newStipple; + + memcpy(st->state.poly_stipple, ctx->PolygonStipple, sz); + + invert_stipple(newStipple.stipple, ctx->PolygonStipple, + ctx->DrawBuffer->Height); + + st->pipe->set_polygon_stipple(st->pipe, &newStipple); + } +} + + +/** Update the stipple when the pattern or window height changes */ +const struct st_tracked_state st_update_polygon_stipple = { + "st_update_polygon_stipple", /* name */ + { /* dirty */ + (_NEW_POLYGONSTIPPLE | + _NEW_BUFFERS), /* mesa */ + 0, /* st */ + }, + update_stipple /* update */ +}; diff --git a/mesalib/src/mesa/state_tracker/st_atom_texture.c b/mesalib/src/mesa/state_tracker/st_atom_texture.c index 7bb950a76..800a9f1f0 100644 --- a/mesalib/src/mesa/state_tracker/st_atom_texture.c +++ b/mesalib/src/mesa/state_tracker/st_atom_texture.c @@ -1,379 +1,383 @@ -/**************************************************************************
- *
- * Copyright 2007 Tungsten Graphics, 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 TUNGSTEN GRAPHICS 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:
- * Keith Whitwell <keith@tungstengraphics.com>
- * Brian Paul
- */
-
-
-#include "main/macros.h"
-#include "main/mtypes.h"
-#include "main/samplerobj.h"
-#include "program/prog_instruction.h"
-
-#include "st_context.h"
-#include "st_atom.h"
-#include "st_texture.h"
-#include "st_format.h"
-#include "st_cb_texture.h"
-#include "pipe/p_context.h"
-#include "util/u_format.h"
-#include "util/u_inlines.h"
-#include "cso_cache/cso_context.h"
-
-
-/**
- * Combine depth texture mode with "swizzle" so that depth mode swizzling
- * takes place before texture swizzling, and return the resulting swizzle.
- * If the format is not a depth format, return "swizzle" unchanged.
- *
- * \param format PIPE_FORMAT_*.
- * \param swizzle Texture swizzle, a bitmask computed using MAKE_SWIZZLE4.
- * \param depthmode One of GL_LUMINANCE, GL_INTENSITY, GL_ALPHA, GL_RED.
- */
-static GLuint
-apply_depthmode(enum pipe_format format, GLuint swizzle, GLenum depthmode)
-{
- const struct util_format_description *desc =
- util_format_description(format);
- unsigned char swiz[4];
- unsigned i;
-
- if (desc->colorspace != UTIL_FORMAT_COLORSPACE_ZS ||
- desc->swizzle[0] == UTIL_FORMAT_SWIZZLE_NONE) {
- /* Not a depth format. */
- return swizzle;
- }
-
- for (i = 0; i < 4; i++)
- swiz[i] = GET_SWZ(swizzle, i);
-
- switch (depthmode) {
- case GL_LUMINANCE:
- /* Rewrite reads from W to ONE, and reads from XYZ to XXX. */
- for (i = 0; i < 4; i++)
- if (swiz[i] == SWIZZLE_W)
- swiz[i] = SWIZZLE_ONE;
- else if (swiz[i] < SWIZZLE_W)
- swiz[i] = SWIZZLE_X;
- break;
-
- case GL_INTENSITY:
- /* Rewrite reads from XYZW to XXXX. */
- for (i = 0; i < 4; i++)
- if (swiz[i] <= SWIZZLE_W)
- swiz[i] = SWIZZLE_X;
- break;
-
- case GL_ALPHA:
- /* Rewrite reads from W to X, and reads from XYZ to 000. */
- for (i = 0; i < 4; i++)
- if (swiz[i] == SWIZZLE_W)
- swiz[i] = SWIZZLE_X;
- else if (swiz[i] < SWIZZLE_W)
- swiz[i] = SWIZZLE_ZERO;
- break;
- case GL_RED:
- /* Rewrite reads W to 1, XYZ to X00 */
- for (i = 0; i < 4; i++)
- if (swiz[i] == SWIZZLE_W)
- swiz[i] = SWIZZLE_ONE;
- else if (swiz[i] == SWIZZLE_Y || swiz[i] == SWIZZLE_Z)
- swiz[i] = SWIZZLE_ZERO;
- break;
- }
-
- return MAKE_SWIZZLE4(swiz[0], swiz[1], swiz[2], swiz[3]);
-}
-
-
-/**
- * Return TRUE if the swizzling described by "swizzle" and
- * "depthmode" (for depth textures only) is different from the swizzling
- * set in the given sampler view.
- *
- * \param sv A sampler view.
- * \param swizzle Texture swizzle, a bitmask computed using MAKE_SWIZZLE4.
- * \param depthmode One of GL_LUMINANCE, GL_INTENSITY, GL_ALPHA.
- */
-static boolean
-check_sampler_swizzle(struct pipe_sampler_view *sv,
- GLuint swizzle, GLenum depthmode)
-{
- swizzle = apply_depthmode(sv->texture->format, swizzle, depthmode);
-
- if ((sv->swizzle_r != GET_SWZ(swizzle, 0)) ||
- (sv->swizzle_g != GET_SWZ(swizzle, 1)) ||
- (sv->swizzle_b != GET_SWZ(swizzle, 2)) ||
- (sv->swizzle_a != GET_SWZ(swizzle, 3)))
- return TRUE;
- return FALSE;
-}
-
-
-static INLINE struct pipe_sampler_view *
-st_create_texture_sampler_view_from_stobj(struct pipe_context *pipe,
- struct st_texture_object *stObj,
- const struct gl_sampler_object *samp,
- enum pipe_format format)
-{
- struct pipe_sampler_view templ;
- GLuint swizzle = apply_depthmode(stObj->pt->format,
- stObj->base._Swizzle,
- samp->DepthMode);
-
- u_sampler_view_default_template(&templ,
- stObj->pt,
- format);
- templ.u.tex.first_level = stObj->base.BaseLevel;
-
- if (swizzle != SWIZZLE_NOOP) {
- templ.swizzle_r = GET_SWZ(swizzle, 0);
- templ.swizzle_g = GET_SWZ(swizzle, 1);
- templ.swizzle_b = GET_SWZ(swizzle, 2);
- templ.swizzle_a = GET_SWZ(swizzle, 3);
- }
-
- return pipe->create_sampler_view(pipe, stObj->pt, &templ);
-}
-
-
-static INLINE struct pipe_sampler_view *
-st_get_texture_sampler_view_from_stobj(struct st_texture_object *stObj,
- struct pipe_context *pipe,
- const struct gl_sampler_object *samp,
- enum pipe_format format)
-{
- if (!stObj || !stObj->pt) {
- return NULL;
- }
-
- if (!stObj->sampler_view) {
- stObj->sampler_view =
- st_create_texture_sampler_view_from_stobj(pipe, stObj, samp, format);
- }
-
- return stObj->sampler_view;
-}
-
-static GLboolean
-update_single_texture(struct st_context *st, struct pipe_sampler_view **sampler_view,
- GLuint texUnit)
-{
- struct pipe_context *pipe = st->pipe;
- const struct gl_sampler_object *samp;
- struct gl_texture_object *texObj;
- struct st_texture_object *stObj;
- enum pipe_format st_view_format;
- GLboolean retval;
-
- samp = _mesa_get_samplerobj(st->ctx, texUnit);
-
- texObj = st->ctx->Texture.Unit[texUnit]._Current;
-
- if (!texObj) {
- texObj = st_get_default_texture(st);
- samp = &texObj->Sampler;
- }
- stObj = st_texture_object(texObj);
-
- retval = st_finalize_texture(st->ctx, st->pipe, texObj);
- if (!retval) {
- /* out of mem */
- return GL_FALSE;
- }
-
- /* Determine the format of the texture sampler view */
- st_view_format = stObj->pt->format;
- {
- const struct st_texture_image *firstImage =
- st_texture_image(stObj->base.Image[0][stObj->base.BaseLevel]);
- const gl_format texFormat = firstImage->base.TexFormat;
- enum pipe_format firstImageFormat =
- st_mesa_format_to_pipe_format(texFormat);
-
- if ((samp->sRGBDecode == GL_SKIP_DECODE_EXT) &&
- (_mesa_get_format_color_encoding(texFormat) == GL_SRGB)) {
- /* don't do sRGB->RGB conversion. Interpret the texture
- * texture data as linear values.
- */
- const gl_format linearFormat =
- _mesa_get_srgb_format_linear(texFormat);
- firstImageFormat = st_mesa_format_to_pipe_format(linearFormat);
- }
-
- if (firstImageFormat != stObj->pt->format)
- st_view_format = firstImageFormat;
- }
-
-
- /* if sampler view has changed dereference it */
- if (stObj->sampler_view) {
- if (check_sampler_swizzle(stObj->sampler_view,
- stObj->base._Swizzle,
- samp->DepthMode) ||
- (st_view_format != stObj->sampler_view->format) ||
- stObj->base.BaseLevel != stObj->sampler_view->u.tex.first_level) {
- pipe_sampler_view_reference(&stObj->sampler_view, NULL);
- }
- }
-
- *sampler_view = st_get_texture_sampler_view_from_stobj(stObj, pipe,
- samp,
- st_view_format);
- return GL_TRUE;
-}
-
-static void
-update_vertex_textures(struct st_context *st)
-{
- struct gl_vertex_program *vprog = st->ctx->VertexProgram._Current;
- GLuint su;
-
- st->state.num_vertex_textures = 0;
-
- /* loop over sampler units (aka tex image units) */
- for (su = 0; su < st->ctx->Const.MaxTextureImageUnits; su++) {
- struct pipe_sampler_view *sampler_view = NULL;
- if (vprog->Base.SamplersUsed & (1 << su)) {
- GLboolean retval;
- GLuint texUnit;
-
- texUnit = vprog->Base.SamplerUnits[su];
-
- retval = update_single_texture(st, &sampler_view, texUnit);
- if (retval == GL_FALSE)
- continue;
-
- st->state.num_vertex_textures = su + 1;
-
- }
- pipe_sampler_view_reference(&st->state.sampler_vertex_views[su], sampler_view);
- }
-
- if (st->ctx->Const.MaxVertexTextureImageUnits > 0) {
- GLuint numUnits = MIN2(st->state.num_vertex_textures,
- st->ctx->Const.MaxVertexTextureImageUnits);
- cso_set_vertex_sampler_views(st->cso_context,
- numUnits,
- st->state.sampler_vertex_views);
- }
-}
-
-static void
-update_fragment_textures(struct st_context *st)
-{
- struct gl_fragment_program *fprog = st->ctx->FragmentProgram._Current;
- GLuint su;
-
- st->state.num_textures = 0;
-
- /* loop over sampler units (aka tex image units) */
- for (su = 0; su < st->ctx->Const.MaxTextureImageUnits; su++) {
- struct pipe_sampler_view *sampler_view = NULL;
- if (fprog->Base.SamplersUsed & (1 << su)) {
- GLboolean retval;
- GLuint texUnit;
-
- texUnit = fprog->Base.SamplerUnits[su];
-
- retval = update_single_texture(st, &sampler_view, texUnit);
- if (retval == GL_FALSE)
- continue;
-
- st->state.num_textures = su + 1;
- }
- pipe_sampler_view_reference(&st->state.sampler_views[su], sampler_view);
- }
-
- cso_set_fragment_sampler_views(st->cso_context,
- st->state.num_textures,
- st->state.sampler_views);
-}
-
-const struct st_tracked_state st_update_texture = {
- "st_update_texture", /* name */
- { /* dirty */
- _NEW_TEXTURE, /* mesa */
- ST_NEW_FRAGMENT_PROGRAM, /* st */
- },
- update_fragment_textures /* update */
-};
-
-const struct st_tracked_state st_update_vertex_texture = {
- "st_update_vertex_texture", /* name */
- { /* dirty */
- _NEW_TEXTURE, /* mesa */
- ST_NEW_VERTEX_PROGRAM, /* st */
- },
- update_vertex_textures /* update */
-};
-
-static void
-finalize_textures(struct st_context *st)
-{
- struct gl_fragment_program *fprog = st->ctx->FragmentProgram._Current;
- const GLboolean prev_missing_textures = st->missing_textures;
- GLuint su;
-
- st->missing_textures = GL_FALSE;
-
- for (su = 0; su < st->ctx->Const.MaxTextureCoordUnits; su++) {
- if (fprog->Base.SamplersUsed & (1 << su)) {
- const GLuint texUnit = fprog->Base.SamplerUnits[su];
- struct gl_texture_object *texObj
- = st->ctx->Texture.Unit[texUnit]._Current;
-
- if (texObj) {
- GLboolean retval;
-
- retval = st_finalize_texture(st->ctx, st->pipe, texObj);
- if (!retval) {
- /* out of mem */
- st->missing_textures = GL_TRUE;
- continue;
- }
- }
- }
- }
-
- if (prev_missing_textures != st->missing_textures)
- st->dirty.st |= ST_NEW_FRAGMENT_PROGRAM;
-}
-
-
-
-const struct st_tracked_state st_finalize_textures = {
- "st_finalize_textures", /* name */
- { /* dirty */
- _NEW_TEXTURE, /* mesa */
- 0, /* st */
- },
- finalize_textures /* update */
-};
+/************************************************************************** + * + * Copyright 2007 Tungsten Graphics, 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 TUNGSTEN GRAPHICS 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: + * Keith Whitwell <keith@tungstengraphics.com> + * Brian Paul + */ + + +#include "main/macros.h" +#include "main/mtypes.h" +#include "main/samplerobj.h" +#include "program/prog_instruction.h" + +#include "st_context.h" +#include "st_atom.h" +#include "st_texture.h" +#include "st_format.h" +#include "st_cb_texture.h" +#include "pipe/p_context.h" +#include "util/u_format.h" +#include "util/u_inlines.h" +#include "cso_cache/cso_context.h" + + +/** + * Combine depth texture mode with "swizzle" so that depth mode swizzling + * takes place before texture swizzling, and return the resulting swizzle. + * If the format is not a depth format, return "swizzle" unchanged. + * + * \param format PIPE_FORMAT_*. + * \param swizzle Texture swizzle, a bitmask computed using MAKE_SWIZZLE4. + * \param depthmode One of GL_LUMINANCE, GL_INTENSITY, GL_ALPHA, GL_RED. + */ +static GLuint +apply_depthmode(enum pipe_format format, GLuint swizzle, GLenum depthmode) +{ + const struct util_format_description *desc = + util_format_description(format); + unsigned char swiz[4]; + unsigned i; + + if (desc->colorspace != UTIL_FORMAT_COLORSPACE_ZS || + desc->swizzle[0] == UTIL_FORMAT_SWIZZLE_NONE) { + /* Not a depth format. */ + return swizzle; + } + + for (i = 0; i < 4; i++) + swiz[i] = GET_SWZ(swizzle, i); + + switch (depthmode) { + case GL_LUMINANCE: + /* Rewrite reads from W to ONE, and reads from XYZ to XXX. */ + for (i = 0; i < 4; i++) + if (swiz[i] == SWIZZLE_W) + swiz[i] = SWIZZLE_ONE; + else if (swiz[i] < SWIZZLE_W) + swiz[i] = SWIZZLE_X; + break; + + case GL_INTENSITY: + /* Rewrite reads from XYZW to XXXX. */ + for (i = 0; i < 4; i++) + if (swiz[i] <= SWIZZLE_W) + swiz[i] = SWIZZLE_X; + break; + + case GL_ALPHA: + /* Rewrite reads from W to X, and reads from XYZ to 000. */ + for (i = 0; i < 4; i++) + if (swiz[i] == SWIZZLE_W) + swiz[i] = SWIZZLE_X; + else if (swiz[i] < SWIZZLE_W) + swiz[i] = SWIZZLE_ZERO; + break; + case GL_RED: + /* Rewrite reads W to 1, XYZ to X00 */ + for (i = 0; i < 4; i++) + if (swiz[i] == SWIZZLE_W) + swiz[i] = SWIZZLE_ONE; + else if (swiz[i] == SWIZZLE_Y || swiz[i] == SWIZZLE_Z) + swiz[i] = SWIZZLE_ZERO; + break; + } + + return MAKE_SWIZZLE4(swiz[0], swiz[1], swiz[2], swiz[3]); +} + + +/** + * Return TRUE if the swizzling described by "swizzle" and + * "depthmode" (for depth textures only) is different from the swizzling + * set in the given sampler view. + * + * \param sv A sampler view. + * \param swizzle Texture swizzle, a bitmask computed using MAKE_SWIZZLE4. + * \param depthmode One of GL_LUMINANCE, GL_INTENSITY, GL_ALPHA. + */ +static boolean +check_sampler_swizzle(struct pipe_sampler_view *sv, + GLuint swizzle, GLenum depthmode) +{ + swizzle = apply_depthmode(sv->texture->format, swizzle, depthmode); + + if ((sv->swizzle_r != GET_SWZ(swizzle, 0)) || + (sv->swizzle_g != GET_SWZ(swizzle, 1)) || + (sv->swizzle_b != GET_SWZ(swizzle, 2)) || + (sv->swizzle_a != GET_SWZ(swizzle, 3))) + return TRUE; + return FALSE; +} + + +static INLINE struct pipe_sampler_view * +st_create_texture_sampler_view_from_stobj(struct pipe_context *pipe, + struct st_texture_object *stObj, + const struct gl_sampler_object *samp, + enum pipe_format format) +{ + struct pipe_sampler_view templ; + GLuint swizzle = apply_depthmode(stObj->pt->format, + stObj->base._Swizzle, + samp->DepthMode); + + u_sampler_view_default_template(&templ, + stObj->pt, + format); + templ.u.tex.first_level = stObj->base.BaseLevel; + + if (swizzle != SWIZZLE_NOOP) { + templ.swizzle_r = GET_SWZ(swizzle, 0); + templ.swizzle_g = GET_SWZ(swizzle, 1); + templ.swizzle_b = GET_SWZ(swizzle, 2); + templ.swizzle_a = GET_SWZ(swizzle, 3); + } + + return pipe->create_sampler_view(pipe, stObj->pt, &templ); +} + + +static INLINE struct pipe_sampler_view * +st_get_texture_sampler_view_from_stobj(struct st_texture_object *stObj, + struct pipe_context *pipe, + const struct gl_sampler_object *samp, + enum pipe_format format) +{ + if (!stObj || !stObj->pt) { + return NULL; + } + + if (!stObj->sampler_view) { + stObj->sampler_view = + st_create_texture_sampler_view_from_stobj(pipe, stObj, samp, format); + } + + return stObj->sampler_view; +} + +static GLboolean +update_single_texture(struct st_context *st, struct pipe_sampler_view **sampler_view, + GLuint texUnit) +{ + struct pipe_context *pipe = st->pipe; + struct gl_context *ctx = st->ctx; + const struct gl_sampler_object *samp; + struct gl_texture_object *texObj; + struct st_texture_object *stObj; + enum pipe_format st_view_format; + GLboolean retval; + + samp = _mesa_get_samplerobj(ctx, texUnit); + + texObj = ctx->Texture.Unit[texUnit]._Current; + + if (!texObj) { + texObj = st_get_default_texture(st); + samp = &texObj->Sampler; + } + stObj = st_texture_object(texObj); + + retval = st_finalize_texture(ctx, st->pipe, texObj); + if (!retval) { + /* out of mem */ + return GL_FALSE; + } + + /* Determine the format of the texture sampler view */ + st_view_format = stObj->pt->format; + { + const struct st_texture_image *firstImage = + st_texture_image(stObj->base.Image[0][stObj->base.BaseLevel]); + const gl_format texFormat = firstImage->base.TexFormat; + enum pipe_format firstImageFormat = + st_mesa_format_to_pipe_format(texFormat); + + if ((samp->sRGBDecode == GL_SKIP_DECODE_EXT) && + (_mesa_get_format_color_encoding(texFormat) == GL_SRGB)) { + /* don't do sRGB->RGB conversion. Interpret the texture + * texture data as linear values. + */ + const gl_format linearFormat = + _mesa_get_srgb_format_linear(texFormat); + firstImageFormat = st_mesa_format_to_pipe_format(linearFormat); + } + + if (firstImageFormat != stObj->pt->format) + st_view_format = firstImageFormat; + } + + + /* if sampler view has changed dereference it */ + if (stObj->sampler_view) { + if (check_sampler_swizzle(stObj->sampler_view, + stObj->base._Swizzle, + samp->DepthMode) || + (st_view_format != stObj->sampler_view->format) || + stObj->base.BaseLevel != stObj->sampler_view->u.tex.first_level) { + pipe_sampler_view_reference(&stObj->sampler_view, NULL); + } + } + + *sampler_view = st_get_texture_sampler_view_from_stobj(stObj, pipe, + samp, + st_view_format); + return GL_TRUE; +} + +static void +update_vertex_textures(struct st_context *st) +{ + const struct gl_context *ctx = st->ctx; + struct gl_vertex_program *vprog = ctx->VertexProgram._Current; + GLuint su; + + st->state.num_vertex_textures = 0; + + /* loop over sampler units (aka tex image units) */ + for (su = 0; su < ctx->Const.MaxTextureImageUnits; su++) { + struct pipe_sampler_view *sampler_view = NULL; + if (vprog->Base.SamplersUsed & (1 << su)) { + GLboolean retval; + GLuint texUnit; + + texUnit = vprog->Base.SamplerUnits[su]; + + retval = update_single_texture(st, &sampler_view, texUnit); + if (retval == GL_FALSE) + continue; + + st->state.num_vertex_textures = su + 1; + + } + pipe_sampler_view_reference(&st->state.sampler_vertex_views[su], sampler_view); + } + + if (ctx->Const.MaxVertexTextureImageUnits > 0) { + GLuint numUnits = MIN2(st->state.num_vertex_textures, + ctx->Const.MaxVertexTextureImageUnits); + cso_set_vertex_sampler_views(st->cso_context, + numUnits, + st->state.sampler_vertex_views); + } +} + +static void +update_fragment_textures(struct st_context *st) +{ + const struct gl_context *ctx = st->ctx; + struct gl_fragment_program *fprog = ctx->FragmentProgram._Current; + GLuint su; + + st->state.num_textures = 0; + + /* loop over sampler units (aka tex image units) */ + for (su = 0; su < ctx->Const.MaxTextureImageUnits; su++) { + struct pipe_sampler_view *sampler_view = NULL; + if (fprog->Base.SamplersUsed & (1 << su)) { + GLboolean retval; + GLuint texUnit; + + texUnit = fprog->Base.SamplerUnits[su]; + + retval = update_single_texture(st, &sampler_view, texUnit); + if (retval == GL_FALSE) + continue; + + st->state.num_textures = su + 1; + } + pipe_sampler_view_reference(&st->state.sampler_views[su], sampler_view); + } + + cso_set_fragment_sampler_views(st->cso_context, + st->state.num_textures, + st->state.sampler_views); +} + +const struct st_tracked_state st_update_texture = { + "st_update_texture", /* name */ + { /* dirty */ + _NEW_TEXTURE, /* mesa */ + ST_NEW_FRAGMENT_PROGRAM, /* st */ + }, + update_fragment_textures /* update */ +}; + +const struct st_tracked_state st_update_vertex_texture = { + "st_update_vertex_texture", /* name */ + { /* dirty */ + _NEW_TEXTURE, /* mesa */ + ST_NEW_VERTEX_PROGRAM, /* st */ + }, + update_vertex_textures /* update */ +}; + +static void +finalize_textures(struct st_context *st) +{ + struct gl_context *ctx = st->ctx; + struct gl_fragment_program *fprog = ctx->FragmentProgram._Current; + const GLboolean prev_missing_textures = st->missing_textures; + GLuint su; + + st->missing_textures = GL_FALSE; + + for (su = 0; su < ctx->Const.MaxTextureCoordUnits; su++) { + if (fprog->Base.SamplersUsed & (1 << su)) { + const GLuint texUnit = fprog->Base.SamplerUnits[su]; + struct gl_texture_object *texObj + = ctx->Texture.Unit[texUnit]._Current; + + if (texObj) { + GLboolean retval; + + retval = st_finalize_texture(ctx, st->pipe, texObj); + if (!retval) { + /* out of mem */ + st->missing_textures = GL_TRUE; + continue; + } + } + } + } + + if (prev_missing_textures != st->missing_textures) + st->dirty.st |= ST_NEW_FRAGMENT_PROGRAM; +} + + + +const struct st_tracked_state st_finalize_textures = { + "st_finalize_textures", /* name */ + { /* dirty */ + _NEW_TEXTURE, /* mesa */ + 0, /* st */ + }, + finalize_textures /* update */ +}; diff --git a/mesalib/src/mesa/state_tracker/st_draw.c b/mesalib/src/mesa/state_tracker/st_draw.c index 6eceba1da..6d86e1310 100644 --- a/mesalib/src/mesa/state_tracker/st_draw.c +++ b/mesalib/src/mesa/state_tracker/st_draw.c @@ -33,7 +33,7 @@ *
* We basically convert the VBO's vertex attribute/array information into
* Gallium vertex state, bind the vertex buffer objects and call
- * pipe->draw_elements(), pipe->draw_range_elements() or pipe->draw_arrays().
+ * pipe->draw_vbo().
*
* Authors:
* Keith Whitwell <keith@tungstengraphics.com>
@@ -237,7 +237,6 @@ st_pipe_vertex_format(GLenum type, GLuint size, GLenum format, /**
* Examine the active arrays to determine if we have interleaved
* vertex arrays all living in one VBO, or all living in user space.
- * \param userSpace returns whether the arrays are in user space.
*/
static GLboolean
is_interleaved_arrays(const struct st_vertex_program *vp,
@@ -247,8 +246,8 @@ is_interleaved_arrays(const struct st_vertex_program *vp, GLuint attr;
const struct gl_buffer_object *firstBufObj = NULL;
GLint firstStride = -1;
- const GLubyte *client_addr = NULL;
- GLboolean user_memory = GL_FALSE;
+ const GLubyte *firstPtr = NULL;
+ GLboolean userSpaceBuffer = GL_FALSE;
for (attr = 0; attr < vpv->num_inputs; attr++) {
const GLuint mesaAttr = vp->index_to_input[attr];
@@ -256,37 +255,26 @@ is_interleaved_arrays(const struct st_vertex_program *vp, const struct gl_buffer_object *bufObj = array->BufferObj;
const GLsizei stride = array->StrideB; /* in bytes */
- if (firstStride < 0) {
+ if (attr == 0) {
+ /* save info about the first array */
firstStride = stride;
- user_memory = !bufObj || !bufObj->Name;
- }
- else if (firstStride != stride) {
- return GL_FALSE;
- }
-
- if (!bufObj || !bufObj->Name) {
- /* Try to detect if the client-space arrays are
- * "close" to each other.
- */
- if (!user_memory) {
- return GL_FALSE;
- }
- if (!client_addr) {
- client_addr = array->Ptr;
- }
- else if (abs(array->Ptr - client_addr) > firstStride) {
- /* arrays start too far apart */
- return GL_FALSE;
- }
- }
- else if (!firstBufObj) {
- if (user_memory) {
- return GL_FALSE;
- }
+ firstPtr = array->Ptr;
firstBufObj = bufObj;
+ userSpaceBuffer = !bufObj || !bufObj->Name;
}
- else if (bufObj != firstBufObj) {
- return GL_FALSE;
+ else {
+ /* check if other arrays interleave with the first, in same buffer */
+ if (stride != firstStride)
+ return GL_FALSE; /* strides don't match */
+
+ if (bufObj != firstBufObj)
+ return GL_FALSE; /* arrays in different VBOs */
+
+ if (abs(array->Ptr - firstPtr) > firstStride)
+ return GL_FALSE; /* arrays start too far apart */
+
+ if ((!bufObj || !_mesa_is_bufferobj(bufObj)) != userSpaceBuffer)
+ return GL_FALSE; /* mix of VBO and user-space arrays */
}
}
@@ -510,6 +498,7 @@ setup_index_buffer(struct gl_context *ctx, }
}
+
/**
* Prior to drawing, check that any uniforms referenced by the
* current shader have been set. If a uniform has not been set,
@@ -556,8 +545,8 @@ translate_prim(const struct gl_context *ctx, unsigned prim) assert(GL_TRIANGLE_STRIP_ADJACENCY == PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY);
/* Avoid quadstrips if it's easy to do so:
- * Note: it's imporant to do the correct trimming if we change the prim type!
- * We do that wherever this function is called.
+ * Note: it's important to do the correct trimming if we change the
+ * prim type! We do that wherever this function is called.
*/
if (prim == GL_QUAD_STRIP &&
ctx->Light.ShadeModel != GL_FLAT &&
@@ -739,8 +728,8 @@ st_draw_vbo(struct gl_context *ctx, }
}
- info.primitive_restart = st->ctx->Array.PrimitiveRestart;
- info.restart_index = st->ctx->Array.RestartIndex;
+ info.primitive_restart = ctx->Array.PrimitiveRestart;
+ info.restart_index = ctx->Array.RestartIndex;
/* do actual drawing */
for (i = 0; i < nr_prims; i++) {
diff --git a/xorg-server/Xi/exevents.c b/xorg-server/Xi/exevents.c index 065b1c4cd..baecb8147 100644 --- a/xorg-server/Xi/exevents.c +++ b/xorg-server/Xi/exevents.c @@ -878,33 +878,6 @@ UpdateDeviceState(DeviceIntPtr device, DeviceEvent* event) return DEFAULT;
}
-static void
-ProcessRawEvent(RawDeviceEvent *ev, DeviceIntPtr device)
-{
- GrabPtr grab = device->deviceGrab.grab;
-
- if (grab)
- DeliverGrabbedEvent((InternalEvent*)ev, device, FALSE);
- else { /* deliver to all root windows */
- xEvent *xi;
- int i;
-
- i = EventToXI2((InternalEvent*)ev, (xEvent**)&xi);
- if (i != Success)
- {
- ErrorF("[Xi] %s: XI2 conversion failed in %s (%d)\n",
- __FUNCTION__, device->name, i);
- return;
- }
-
- for (i = 0; i < screenInfo.numScreens; i++)
- if (screenInfo.screens[i] && screenInfo.screens[i]->root)
- DeliverEventsToWindow(device, screenInfo.screens[i]->root, xi, 1,
- GetEventFilter(device, xi), NULL);
- free(xi);
- }
-}
-
/**
* Main device event processing function.
* Called from when processing the events from the event queue.
@@ -932,7 +905,7 @@ ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device) ev->any.type == ET_RawButtonRelease ||
ev->any.type == ET_RawMotion)
{
- ProcessRawEvent(&ev->raw_event, device);
+ DeliverRawEvent(&ev->raw_event, device);
return;
}
diff --git a/xorg-server/dix/events.c b/xorg-server/dix/events.c index 1a427ea55..f4006e54c 100644 --- a/xorg-server/dix/events.c +++ b/xorg-server/dix/events.c @@ -2040,31 +2040,29 @@ DeliverToWindowOwner(DeviceIntPtr dev, WindowPtr win, return EVENT_NOT_DELIVERED;
}
+
/**
- * Deliver events to clients registered on the window.
+ * Get the list of clients that should be tried for event delivery on the
+ * given window.
*
- * @param client_return On successful delivery, set to the recipient.
- * @param mask_return On successful delivery, set to the recipient's event
- * mask for this event.
+ * @return 1 if the client list should be traversed, zero if the event
+ * should be skipped.
*/
-static enum EventDeliveryState
-DeliverEventToClients(DeviceIntPtr dev, WindowPtr win, xEvent *events,
- int count, Mask filter, GrabPtr grab,
- ClientPtr *client_return, Mask *mask_return)
+static Bool
+GetClientsForDelivery(DeviceIntPtr dev, WindowPtr win,
+ xEvent *events, Mask filter, InputClients **clients)
{
- int attempt;
- enum EventDeliveryState rc = EVENT_SKIP;
- InputClients *other;
+ int rc = 0;
if (core_get_type(events) != 0)
- other = (InputClients *)wOtherClients(win);
+ *clients = (InputClients *)wOtherClients(win);
else if (xi2_get_type(events) != 0)
{
OtherInputMasks *inputMasks = wOtherInputMasks(win);
/* Has any client selected for the event? */
if (!GetWindowXI2Mask(dev, win, events))
goto out;
- other = inputMasks->inputClients;
+ *clients = inputMasks->inputClients;
} else {
OtherInputMasks *inputMasks = wOtherInputMasks(win);
/* Has any client selected for the event? */
@@ -2072,20 +2070,36 @@ DeliverEventToClients(DeviceIntPtr dev, WindowPtr win, xEvent *events, !(inputMasks->inputEvents[dev->id] & filter))
goto out;
- other = inputMasks->inputClients;
+ *clients = inputMasks->inputClients;
}
- rc = EVENT_NOT_DELIVERED;
+ rc = 1;
+out:
+ return rc;
+}
+
+/**
+ * Try delivery on each client in inputclients, provided the event mask
+ * accepts it and there is no interfering core grab..
+ */
+static enum EventDeliveryState
+DeliverEventToInputClients(DeviceIntPtr dev, InputClients *inputclients,
+ WindowPtr win, xEvent *events,
+ int count, Mask filter, GrabPtr grab,
+ ClientPtr *client_return, Mask *mask_return)
+{
+ int attempt;
+ enum EventDeliveryState rc = EVENT_NOT_DELIVERED;
- for (; other; other = other->next)
+ for (; inputclients; inputclients = inputclients->next)
{
Mask mask;
- ClientPtr client = rClient(other);
+ ClientPtr client = rClient(inputclients);
if (IsInterferingGrab(client, dev, events))
continue;
- mask = GetEventMask(dev, events, other);
+ mask = GetEventMask(dev, events, inputclients);
if (XaceHook(XACE_RECEIVE_ACCESS, client, win,
events, count))
@@ -2106,12 +2120,34 @@ DeliverEventToClients(DeviceIntPtr dev, WindowPtr win, xEvent *events, }
}
-out:
return rc;
}
/**
+ * Deliver events to clients registered on the window.
+ *
+ * @param client_return On successful delivery, set to the recipient.
+ * @param mask_return On successful delivery, set to the recipient's event
+ * mask for this event.
+ */
+static enum EventDeliveryState
+DeliverEventToWindowMask(DeviceIntPtr dev, WindowPtr win, xEvent *events,
+ int count, Mask filter, GrabPtr grab,
+ ClientPtr *client_return, Mask *mask_return)
+{
+ InputClients *clients;
+
+ if (!GetClientsForDelivery(dev, win, events, filter, &clients))
+ return EVENT_SKIP;
+
+ return DeliverEventToInputClients(dev, clients, win, events, count, filter,
+ grab, client_return, mask_return);
+
+}
+
+
+/**
* Deliver events to a window. At this point, we do not yet know if the event
* actually needs to be delivered. May activate a grab if the event is a
* button press.
@@ -2173,8 +2209,8 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent {
enum EventDeliveryState rc;
- rc = DeliverEventToClients(pDev, pWin, pEvents, count, filter, grab,
- &client, &deliveryMask);
+ rc = DeliverEventToWindowMask(pDev, pWin, pEvents, count, filter,
+ grab, &client, &deliveryMask);
switch(rc)
{
@@ -2210,6 +2246,35 @@ DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent return nondeliveries;
}
+void
+DeliverRawEvent(RawDeviceEvent *ev, DeviceIntPtr device)
+{
+ GrabPtr grab = device->deviceGrab.grab;
+
+ if (grab)
+ DeliverGrabbedEvent((InternalEvent*)ev, device, FALSE);
+ else { /* deliver to all root windows */
+ xEvent *xi;
+ int i;
+ int filter;
+
+ i = EventToXI2((InternalEvent*)ev, (xEvent**)&xi);
+ if (i != Success)
+ {
+ ErrorF("[Xi] %s: XI2 conversion failed in %s (%d)\n",
+ __func__, device->name, i);
+ return;
+ }
+
+ filter = GetEventFilter(device, xi);
+
+ for (i = 0; i < screenInfo.numScreens; i++)
+ DeliverEventsToWindow(device, screenInfo.screens[i]->root, xi, 1,
+ filter, NullGrab);
+ free(xi);
+ }
+}
+
/* If the event goes to dontClient, don't send it and return 0. if
send works, return 1 or if send didn't work, return 2.
Only works for core events.
diff --git a/xorg-server/include/dix.h b/xorg-server/include/dix.h index daac63a2e..ddff00ebc 100644 --- a/xorg-server/include/dix.h +++ b/xorg-server/include/dix.h @@ -387,6 +387,11 @@ extern _X_EXPORT int DeliverEventsToWindow( Mask /* filter */,
GrabPtr /* grab */);
+extern _X_EXPORT void DeliverRawEvent(
+ RawDeviceEvent* /* ev */,
+ DeviceIntPtr /* dev */
+);
+
extern int DeliverDeviceEvents(
WindowPtr /* pWin */,
InternalEvent* /* event */,
|