summaryrefslogtreecommitdiffstats
path: root/src/glx
diff options
context:
space:
mode:
Diffstat (limited to 'src/glx')
-rw-r--r--src/glx/SConscript85
-rw-r--r--src/glx/apple/apple_cgl.c7
-rw-r--r--src/glx/apple/apple_cgl.h3
-rw-r--r--src/glx/apple/apple_glapi.c1142
-rw-r--r--src/glx/apple/apple_glx.c1
-rw-r--r--src/glx/apple/apple_glx.h2
-rw-r--r--src/glx/apple/apple_visual.c47
-rw-r--r--src/glx/apple/apple_visual.h4
-rw-r--r--src/glx/applegl_glx.c14
-rw-r--r--src/glx/dri2_glx.c6
-rw-r--r--src/glx/dri_common.c26
-rw-r--r--src/glx/dri_glx.c7
-rw-r--r--src/glx/drisw_glx.c11
-rw-r--r--src/glx/glx_pbuffer.c71
-rw-r--r--src/glx/glxclient.h4
-rw-r--r--src/glx/glxcmds.c47
-rw-r--r--src/glx/glxcurrent.c47
-rw-r--r--src/glx/indirect_glx.c1
18 files changed, 276 insertions, 1249 deletions
diff --git a/src/glx/SConscript b/src/glx/SConscript
new file mode 100644
index 00000000000..afef33727df
--- /dev/null
+++ b/src/glx/SConscript
@@ -0,0 +1,85 @@
+Import('*')
+
+if env['platform'] == 'windows':
+ Return()
+
+env = env.Clone()
+
+env.Prepend(CPPPATH = [
+ '#include',
+ '#include/GL/internal',
+ '#src/mesa',
+ '#src/mapi',
+ '#src/mapi/glapi',
+ #$(LIBDRM_CFLAGS)
+ #$(DRI2PROTO_CFLAGS)
+ #$(GLPROTO_CFLAGS)
+ #$(X11_INCLUDES)
+])
+
+env.Append(CPPDEFINES = [
+ '_REENTRANT',
+ #('DEFAULT_DRIVER_DIR', 'DRI_DRIVER_SEARCH_DIR')
+])
+
+env.Prepend(LIBS = [
+ glapi
+])
+
+env.PkgUseModules('X11')
+env.PkgUseModules('DRM')
+
+if env['HAVE_XF86VIDMODE']:
+ env.Append(CPPDEFINES = ['XF86VIDMODE'])
+ env.PkgUseModules('XF86VIDMODE')
+
+if False: # XXX: SHARED_GLAPI
+ env.Append(CPPDEFINES = ['GLX_SHARED_GLAPI'])
+
+sources = [
+ 'clientattrib.c',
+ 'compsize.c',
+ 'eval.c',
+ 'glxconfig.c',
+ 'glxcmds.c',
+ 'glxcurrent.c',
+ 'glxext.c',
+ 'glxextensions.c',
+ 'indirect_glx.c',
+ 'indirect.c',
+ 'indirect_init.c',
+ 'indirect_size.c',
+ 'indirect_window_pos.c',
+ 'indirect_texture_compression.c',
+ 'indirect_transpose_matrix.c',
+ 'indirect_vertex_array.c',
+ 'indirect_vertex_program.c',
+ 'pixel.c',
+ 'pixelstore.c',
+ 'render2.c',
+ 'renderpix.c',
+ 'single2.c',
+ 'singlepix.c',
+ 'vertarr.c',
+ 'xfont.c',
+ 'glx_pbuffer.c',
+ 'glx_query.c',
+ 'drisw_glx.c',
+ 'dri_common.c',
+ 'dri_glx.c',
+ 'XF86dri.c',
+ 'glxhash.c',
+ 'dri2_glx.c',
+ 'dri2.c',
+ 'applegl_glx.c',
+]
+
+libgl = env.SharedLibrary(
+ target ='GL',
+ source = sources,
+)
+
+libgl = env.InstallSharedLibrary(libgl, version=(1, 2))
+
+env.Alias('glx', libgl)
+env.Alias('libgl', libgl)
diff --git a/src/glx/apple/apple_cgl.c b/src/glx/apple/apple_cgl.c
index 737d757ed52..648ed869497 100644
--- a/src/glx/apple/apple_cgl.c
+++ b/src/glx/apple/apple_cgl.c
@@ -64,7 +64,6 @@ void
apple_cgl_init(void)
{
void *h;
- GLint major = 0, minor = 0;
const char *opengl_framework_path;
if (initialized)
@@ -88,11 +87,11 @@ apple_cgl_init(void)
apple_cgl.get_version = sym(h, "CGLGetVersion");
- apple_cgl.get_version(&major, &minor);
+ apple_cgl.get_version(&apple_cgl.version_major, &apple_cgl.version_minor);
- apple_glx_diagnostic("CGL major %d minor %d\n", major, minor);
+ apple_glx_diagnostic("CGL major %d minor %d\n", apple_cgl.version_major, apple_cgl.version_minor);
- if (1 != major) {
+ if (1 != apple_cgl.version_major) {
fprintf(stderr, "WARNING: the CGL major version has changed!\n"
"libGL may be incompatible!\n");
}
diff --git a/src/glx/apple/apple_cgl.h b/src/glx/apple/apple_cgl.h
index 5e98a00fe79..002c7e64bad 100644
--- a/src/glx/apple/apple_cgl.h
+++ b/src/glx/apple/apple_cgl.h
@@ -40,7 +40,8 @@
struct apple_cgl_api
{
- void (*get_version) (GLint * majorvers, GLint * minorvers);
+ GLint version_major, version_minor;
+ void (*get_version) (GLint * version_major, GLint * version_minor);
CGLError(*choose_pixel_format) (const CGLPixelFormatAttribute * attribs,
CGLPixelFormatObj * pix, GLint * npix);
diff --git a/src/glx/apple/apple_glapi.c b/src/glx/apple/apple_glapi.c
index f60cacece76..34f726efb64 100644
--- a/src/glx/apple/apple_glapi.c
+++ b/src/glx/apple/apple_glapi.c
@@ -44,1156 +44,20 @@
#include "apple_glx.h"
#include "apple_xgl_api.h"
-
-#ifndef OPENGL_FRAMEWORK_PATH
-#define OPENGL_FRAMEWORK_PATH "/System/Library/Frameworks/OpenGL.framework/OpenGL"
-#endif
+#include "apple_cgl.h"
struct _glapi_table * __ogl_framework_api = NULL;
struct _glapi_table * __applegl_api = NULL;
-void apple_xgl_init_direct(void) {
- static void *handle;
- const char *opengl_framework_path;
-
+void apple_glapi_set_dispatch(void) {
if(__applegl_api) {
_glapi_set_dispatch(__applegl_api);
return;
}
- opengl_framework_path = getenv("OPENGL_FRAMEWORK_PATH");
- if (!opengl_framework_path) {
- opengl_framework_path = OPENGL_FRAMEWORK_PATH;
- }
-
- (void) dlerror(); /*drain dlerror */
- handle = dlopen(opengl_framework_path, RTLD_LOCAL);
-
- if (!handle) {
- fprintf(stderr, "error: unable to dlopen %s : %s\n",
- opengl_framework_path, dlerror());
- abort();
- }
-
- __ogl_framework_api = calloc(1, sizeof(struct _glapi_table));
+ __ogl_framework_api = _glapi_create_table_from_handle(apple_cgl_get_dl_handle(), "gl");
assert(__ogl_framework_api);
- /* to update:
- * for f in $(grep SET_ ../../mesa/main/dispatch.h | grep INLINE | sed 's:^.*\(SET_[^(]*\)(.*$:\1:' | sort -u); do grep -q "$f(" apple_glapi.c || echo $f ; done | sed 's:SET_\(.*\)$: SET_\1(__ogl_framework_api, dlsym(handle, "gl\1"))\;:'
- */
-
- SET_Accum(__ogl_framework_api, dlsym(handle, "glAccum"));
- SET_AlphaFunc(__ogl_framework_api, dlsym(handle, "glAlphaFunc"));
- SET_AreTexturesResident(__ogl_framework_api, dlsym(handle, "glAreTexturesResident"));
- SET_ArrayElement(__ogl_framework_api, dlsym(handle, "glArrayElement"));
- SET_Begin(__ogl_framework_api, dlsym(handle, "glBegin"));
- SET_BindTexture(__ogl_framework_api, dlsym(handle, "glBindTexture"));
- SET_Bitmap(__ogl_framework_api, dlsym(handle, "glBitmap"));
- SET_BlendColor(__ogl_framework_api, dlsym(handle, "glBlendColor"));
- SET_BlendEquation(__ogl_framework_api, dlsym(handle, "glBlendEquation"));
- SET_BlendFunc(__ogl_framework_api, dlsym(handle, "glBlendFunc"));
- SET_CallList(__ogl_framework_api, dlsym(handle, "glCallList"));
- SET_CallLists(__ogl_framework_api, dlsym(handle, "glCallLists"));
- SET_Clear(__ogl_framework_api, dlsym(handle, "glClear"));
- SET_ClearAccum(__ogl_framework_api, dlsym(handle, "glClearAccum"));
- SET_ClearColor(__ogl_framework_api, dlsym(handle, "glClearColor"));
- SET_ClearDepth(__ogl_framework_api, dlsym(handle, "glClearDepth"));
- SET_ClearIndex(__ogl_framework_api, dlsym(handle, "glClearIndex"));
- SET_ClearStencil(__ogl_framework_api, dlsym(handle, "glClearStencil"));
- SET_ClipPlane(__ogl_framework_api, dlsym(handle, "glClipPlane"));
- SET_Color3b(__ogl_framework_api, dlsym(handle, "glColor3b"));
- SET_Color3bv(__ogl_framework_api, dlsym(handle, "glColor3bv"));
- SET_Color3d(__ogl_framework_api, dlsym(handle, "glColor3d"));
- SET_Color3dv(__ogl_framework_api, dlsym(handle, "glColor3dv"));
- SET_Color3f(__ogl_framework_api, dlsym(handle, "glColor3f"));
- SET_Color3fv(__ogl_framework_api, dlsym(handle, "glColor3fv"));
- SET_Color3i(__ogl_framework_api, dlsym(handle, "glColor3i"));
- SET_Color3iv(__ogl_framework_api, dlsym(handle, "glColor3iv"));
- SET_Color3s(__ogl_framework_api, dlsym(handle, "glColor3s"));
- SET_Color3sv(__ogl_framework_api, dlsym(handle, "glColor3sv"));
- SET_Color3ub(__ogl_framework_api, dlsym(handle, "glColor3ub"));
- SET_Color3ubv(__ogl_framework_api, dlsym(handle, "glColor3ubv"));
- SET_Color3ui(__ogl_framework_api, dlsym(handle, "glColor3ui"));
- SET_Color3uiv(__ogl_framework_api, dlsym(handle, "glColor3uiv"));
- SET_Color3us(__ogl_framework_api, dlsym(handle, "glColor3us"));
- SET_Color3usv(__ogl_framework_api, dlsym(handle, "glColor3usv"));
- SET_Color4b(__ogl_framework_api, dlsym(handle, "glColor4b"));
- SET_Color4bv(__ogl_framework_api, dlsym(handle, "glColor4bv"));
- SET_Color4d(__ogl_framework_api, dlsym(handle, "glColor4d"));
- SET_Color4dv(__ogl_framework_api, dlsym(handle, "glColor4dv"));
- SET_Color4f(__ogl_framework_api, dlsym(handle, "glColor4f"));
- SET_Color4fv(__ogl_framework_api, dlsym(handle, "glColor4fv"));
- SET_Color4i(__ogl_framework_api, dlsym(handle, "glColor4i"));
- SET_Color4iv(__ogl_framework_api, dlsym(handle, "glColor4iv"));
- SET_Color4s(__ogl_framework_api, dlsym(handle, "glColor4s"));
- SET_Color4sv(__ogl_framework_api, dlsym(handle, "glColor4sv"));
- SET_Color4ub(__ogl_framework_api, dlsym(handle, "glColor4ub"));
- SET_Color4ubv(__ogl_framework_api, dlsym(handle, "glColor4ubv"));
- SET_Color4ui(__ogl_framework_api, dlsym(handle, "glColor4ui"));
- SET_Color4uiv(__ogl_framework_api, dlsym(handle, "glColor4uiv"));
- SET_Color4us(__ogl_framework_api, dlsym(handle, "glColor4us"));
- SET_Color4usv(__ogl_framework_api, dlsym(handle, "glColor4usv"));
- SET_ColorMask(__ogl_framework_api, dlsym(handle, "glColorMask"));
- SET_ColorMaterial(__ogl_framework_api, dlsym(handle, "glColorMaterial"));
- SET_ColorPointer(__ogl_framework_api, dlsym(handle, "glColorPointer"));
- SET_ColorSubTable(__ogl_framework_api, dlsym(handle, "glColorSubTable"));
- SET_ColorTable(__ogl_framework_api, dlsym(handle, "glColorTable"));
- SET_ColorTableParameterfv(__ogl_framework_api, dlsym(handle, "glColorTableParameterfv"));
- SET_ColorTableParameteriv(__ogl_framework_api, dlsym(handle, "glColorTableParameteriv"));
- SET_ConvolutionFilter1D(__ogl_framework_api, dlsym(handle, "glConvolutionFilter1D"));
- SET_ConvolutionFilter2D(__ogl_framework_api, dlsym(handle, "glConvolutionFilter2D"));
- SET_ConvolutionParameterf(__ogl_framework_api, dlsym(handle, "glConvolutionParameterf"));
- SET_ConvolutionParameterfv(__ogl_framework_api, dlsym(handle, "glConvolutionParameterfv"));
- SET_ConvolutionParameteri(__ogl_framework_api, dlsym(handle, "glConvolutionParameteri"));
- SET_ConvolutionParameteriv(__ogl_framework_api, dlsym(handle, "glConvolutionParameteriv"));
- SET_CopyColorSubTable(__ogl_framework_api, dlsym(handle, "glCopyColorSubTable"));
- SET_CopyColorTable(__ogl_framework_api, dlsym(handle, "glCopyColorTable"));
- SET_CopyConvolutionFilter1D(__ogl_framework_api, dlsym(handle, "glCopyConvolutionFilter1D"));
- SET_CopyConvolutionFilter2D(__ogl_framework_api, dlsym(handle, "glCopyConvolutionFilter2D"));
- SET_CopyPixels(__ogl_framework_api, dlsym(handle, "glCopyPixels"));
- SET_CopyTexImage1D(__ogl_framework_api, dlsym(handle, "glCopyTexImage1D"));
- SET_CopyTexImage2D(__ogl_framework_api, dlsym(handle, "glCopyTexImage2D"));
- SET_CopyTexSubImage1D(__ogl_framework_api, dlsym(handle, "glCopyTexSubImage1D"));
- SET_CopyTexSubImage2D(__ogl_framework_api, dlsym(handle, "glCopyTexSubImage2D"));
- SET_CopyTexSubImage3D(__ogl_framework_api, dlsym(handle, "glCopyTexSubImage3D"));
- SET_CullFace(__ogl_framework_api, dlsym(handle, "glCullFace"));
- SET_DeleteLists(__ogl_framework_api, dlsym(handle, "glDeleteLists"));
- SET_DeleteTextures(__ogl_framework_api, dlsym(handle, "glDeleteTextures"));
- SET_DepthFunc(__ogl_framework_api, dlsym(handle, "glDepthFunc"));
- SET_DepthMask(__ogl_framework_api, dlsym(handle, "glDepthMask"));
- SET_DepthRange(__ogl_framework_api, dlsym(handle, "glDepthRange"));
- SET_Disable(__ogl_framework_api, dlsym(handle, "glDisable"));
- SET_DisableClientState(__ogl_framework_api, dlsym(handle, "glDisableClientState"));
- SET_DrawArrays(__ogl_framework_api, dlsym(handle, "glDrawArrays"));
- SET_DrawBuffer(__ogl_framework_api, dlsym(handle, "glDrawBuffer"));
- SET_DrawElements(__ogl_framework_api, dlsym(handle, "glDrawElements"));
- SET_DrawPixels(__ogl_framework_api, dlsym(handle, "glDrawPixels"));
- SET_DrawRangeElements(__ogl_framework_api, dlsym(handle, "glDrawRangeElements"));
- SET_EdgeFlag(__ogl_framework_api, dlsym(handle, "glEdgeFlag"));
- SET_EdgeFlagPointer(__ogl_framework_api, dlsym(handle, "glEdgeFlagPointer"));
- SET_EdgeFlagv(__ogl_framework_api, dlsym(handle, "glEdgeFlagv"));
- SET_Enable(__ogl_framework_api, dlsym(handle, "glEnable"));
- SET_EnableClientState(__ogl_framework_api, dlsym(handle, "glEnableClientState"));
- SET_End(__ogl_framework_api, dlsym(handle, "glEnd"));
- SET_EndList(__ogl_framework_api, dlsym(handle, "glEndList"));
- SET_EvalCoord1d(__ogl_framework_api, dlsym(handle, "glEvalCoord1d"));
- SET_EvalCoord1dv(__ogl_framework_api, dlsym(handle, "glEvalCoord1dv"));
- SET_EvalCoord1f(__ogl_framework_api, dlsym(handle, "glEvalCoord1f"));
- SET_EvalCoord1fv(__ogl_framework_api, dlsym(handle, "glEvalCoord1fv"));
- SET_EvalCoord2d(__ogl_framework_api, dlsym(handle, "glEvalCoord2d"));
- SET_EvalCoord2dv(__ogl_framework_api, dlsym(handle, "glEvalCoord2dv"));
- SET_EvalCoord2f(__ogl_framework_api, dlsym(handle, "glEvalCoord2f"));
- SET_EvalCoord2fv(__ogl_framework_api, dlsym(handle, "glEvalCoord2fv"));
- SET_EvalMesh1(__ogl_framework_api, dlsym(handle, "glEvalMesh1"));
- SET_EvalMesh2(__ogl_framework_api, dlsym(handle, "glEvalMesh2"));
- SET_EvalPoint1(__ogl_framework_api, dlsym(handle, "glEvalPoint1"));
- SET_EvalPoint2(__ogl_framework_api, dlsym(handle, "glEvalPoint2"));
- SET_FeedbackBuffer(__ogl_framework_api, dlsym(handle, "glFeedbackBuffer"));
- SET_Finish(__ogl_framework_api, dlsym(handle, "glFinish"));
- SET_Flush(__ogl_framework_api, dlsym(handle, "glFlush"));
- SET_Fogf(__ogl_framework_api, dlsym(handle, "glFogf"));
- SET_Fogfv(__ogl_framework_api, dlsym(handle, "glFogfv"));
- SET_Fogi(__ogl_framework_api, dlsym(handle, "glFogi"));
- SET_Fogiv(__ogl_framework_api, dlsym(handle, "glFogiv"));
- SET_FrontFace(__ogl_framework_api, dlsym(handle, "glFrontFace"));
- SET_Frustum(__ogl_framework_api, dlsym(handle, "glFrustum"));
- SET_GenLists(__ogl_framework_api, dlsym(handle, "glGenLists"));
- SET_GenTextures(__ogl_framework_api, dlsym(handle, "glGenTextures"));
- SET_GetBooleanv(__ogl_framework_api, dlsym(handle, "glGetBooleanv"));
- SET_GetClipPlane(__ogl_framework_api, dlsym(handle, "glGetClipPlane"));
- SET_GetColorTable(__ogl_framework_api, dlsym(handle, "glGetColorTable"));
- SET_GetColorTableParameterfv(__ogl_framework_api, dlsym(handle, "glGetColorTableParameterfv"));
- SET_GetColorTableParameteriv(__ogl_framework_api, dlsym(handle, "glGetColorTableParameteriv"));
- SET_GetConvolutionFilter(__ogl_framework_api, dlsym(handle, "glGetConvolutionFilter"));
- SET_GetConvolutionParameterfv(__ogl_framework_api, dlsym(handle, "glGetConvolutionParameterfv"));
- SET_GetConvolutionParameteriv(__ogl_framework_api, dlsym(handle, "glGetConvolutionParameteriv"));
- SET_GetDoublev(__ogl_framework_api, dlsym(handle, "glGetDoublev"));
- SET_GetError(__ogl_framework_api, dlsym(handle, "glGetError"));
- SET_GetFloatv(__ogl_framework_api, dlsym(handle, "glGetFloatv"));
- SET_GetHistogram(__ogl_framework_api, dlsym(handle, "glGetHistogram"));
- SET_GetHistogramParameterfv(__ogl_framework_api, dlsym(handle, "glGetHistogramParameterfv"));
- SET_GetHistogramParameteriv(__ogl_framework_api, dlsym(handle, "glGetHistogramParameteriv"));
- SET_GetIntegerv(__ogl_framework_api, dlsym(handle, "glGetIntegerv"));
- SET_GetLightfv(__ogl_framework_api, dlsym(handle, "glGetLightfv"));
- SET_GetLightiv(__ogl_framework_api, dlsym(handle, "glGetLightiv"));
- SET_GetMapdv(__ogl_framework_api, dlsym(handle, "glGetMapdv"));
- SET_GetMapfv(__ogl_framework_api, dlsym(handle, "glGetMapfv"));
- SET_GetMapiv(__ogl_framework_api, dlsym(handle, "glGetMapiv"));
- SET_GetMaterialfv(__ogl_framework_api, dlsym(handle, "glGetMaterialfv"));
- SET_GetMaterialiv(__ogl_framework_api, dlsym(handle, "glGetMaterialiv"));
- SET_GetMinmax(__ogl_framework_api, dlsym(handle, "glGetMinmax"));
- SET_GetMinmaxParameterfv(__ogl_framework_api, dlsym(handle, "glGetMinmaxParameterfv"));
- SET_GetMinmaxParameteriv(__ogl_framework_api, dlsym(handle, "glGetMinmaxParameteriv"));
- SET_GetPixelMapfv(__ogl_framework_api, dlsym(handle, "glGetPixelMapfv"));
- SET_GetPixelMapuiv(__ogl_framework_api, dlsym(handle, "glGetPixelMapuiv"));
- SET_GetPixelMapusv(__ogl_framework_api, dlsym(handle, "glGetPixelMapusv"));
- SET_GetPointerv(__ogl_framework_api, dlsym(handle, "glGetPointerv"));
- SET_GetPolygonStipple(__ogl_framework_api, dlsym(handle, "glGetPolygonStipple"));
- SET_GetSeparableFilter(__ogl_framework_api, dlsym(handle, "glGetSeparableFilter"));
- SET_GetString(__ogl_framework_api, dlsym(handle, "glGetString"));
- SET_GetTexEnvfv(__ogl_framework_api, dlsym(handle, "glGetTexEnvfv"));
- SET_GetTexEnviv(__ogl_framework_api, dlsym(handle, "glGetTexEnviv"));
- SET_GetTexGendv(__ogl_framework_api, dlsym(handle, "glGetTexGendv"));
- SET_GetTexGenfv(__ogl_framework_api, dlsym(handle, "glGetTexGenfv"));
- SET_GetTexGeniv(__ogl_framework_api, dlsym(handle, "glGetTexGeniv"));
- SET_GetTexImage(__ogl_framework_api, dlsym(handle, "glGetTexImage"));
- SET_GetTexLevelParameterfv(__ogl_framework_api, dlsym(handle, "glGetTexLevelParameterfv"));
- SET_GetTexLevelParameteriv(__ogl_framework_api, dlsym(handle, "glGetTexLevelParameteriv"));
- SET_GetTexParameterfv(__ogl_framework_api, dlsym(handle, "glGetTexParameterfv"));
- SET_GetTexParameteriv(__ogl_framework_api, dlsym(handle, "glGetTexParameteriv"));
- SET_Hint(__ogl_framework_api, dlsym(handle, "glHint"));
- SET_Histogram(__ogl_framework_api, dlsym(handle, "glHistogram"));
- SET_IndexMask(__ogl_framework_api, dlsym(handle, "glIndexMask"));
- SET_IndexPointer(__ogl_framework_api, dlsym(handle, "glIndexPointer"));
- SET_Indexd(__ogl_framework_api, dlsym(handle, "glIndexd"));
- SET_Indexdv(__ogl_framework_api, dlsym(handle, "glIndexdv"));
- SET_Indexf(__ogl_framework_api, dlsym(handle, "glIndexf"));
- SET_Indexfv(__ogl_framework_api, dlsym(handle, "glIndexfv"));
- SET_Indexi(__ogl_framework_api, dlsym(handle, "glIndexi"));
- SET_Indexiv(__ogl_framework_api, dlsym(handle, "glIndexiv"));
- SET_Indexs(__ogl_framework_api, dlsym(handle, "glIndexs"));
- SET_Indexsv(__ogl_framework_api, dlsym(handle, "glIndexsv"));
- SET_Indexub(__ogl_framework_api, dlsym(handle, "glIndexub"));
- SET_Indexubv(__ogl_framework_api, dlsym(handle, "glIndexubv"));
- SET_InitNames(__ogl_framework_api, dlsym(handle, "glInitNames"));
- SET_InterleavedArrays(__ogl_framework_api, dlsym(handle, "glInterleavedArrays"));
- SET_IsEnabled(__ogl_framework_api, dlsym(handle, "glIsEnabled"));
- SET_IsList(__ogl_framework_api, dlsym(handle, "glIsList"));
- SET_IsTexture(__ogl_framework_api, dlsym(handle, "glIsTexture"));
- SET_LightModelf(__ogl_framework_api, dlsym(handle, "glLightModelf"));
- SET_LightModelfv(__ogl_framework_api, dlsym(handle, "glLightModelfv"));
- SET_LightModeli(__ogl_framework_api, dlsym(handle, "glLightModeli"));
- SET_LightModeliv(__ogl_framework_api, dlsym(handle, "glLightModeliv"));
- SET_Lightf(__ogl_framework_api, dlsym(handle, "glLightf"));
- SET_Lightfv(__ogl_framework_api, dlsym(handle, "glLightfv"));
- SET_Lighti(__ogl_framework_api, dlsym(handle, "glLighti"));
- SET_Lightiv(__ogl_framework_api, dlsym(handle, "glLightiv"));
- SET_LineStipple(__ogl_framework_api, dlsym(handle, "glLineStipple"));
- SET_LineWidth(__ogl_framework_api, dlsym(handle, "glLineWidth"));
- SET_ListBase(__ogl_framework_api, dlsym(handle, "glListBase"));
- SET_LoadIdentity(__ogl_framework_api, dlsym(handle, "glLoadIdentity"));
- SET_LoadMatrixd(__ogl_framework_api, dlsym(handle, "glLoadMatrixd"));
- SET_LoadMatrixf(__ogl_framework_api, dlsym(handle, "glLoadMatrixf"));
- SET_LoadName(__ogl_framework_api, dlsym(handle, "glLoadName"));
- SET_LogicOp(__ogl_framework_api, dlsym(handle, "glLogicOp"));
- SET_Map1d(__ogl_framework_api, dlsym(handle, "glMap1d"));
- SET_Map1f(__ogl_framework_api, dlsym(handle, "glMap1f"));
- SET_Map2d(__ogl_framework_api, dlsym(handle, "glMap2d"));
- SET_Map2f(__ogl_framework_api, dlsym(handle, "glMap2f"));
- SET_MapGrid1d(__ogl_framework_api, dlsym(handle, "glMapGrid1d"));
- SET_MapGrid1f(__ogl_framework_api, dlsym(handle, "glMapGrid1f"));
- SET_MapGrid2d(__ogl_framework_api, dlsym(handle, "glMapGrid2d"));
- SET_MapGrid2f(__ogl_framework_api, dlsym(handle, "glMapGrid2f"));
- SET_Materialf(__ogl_framework_api, dlsym(handle, "glMaterialf"));
- SET_Materialfv(__ogl_framework_api, dlsym(handle, "glMaterialfv"));
- SET_Materiali(__ogl_framework_api, dlsym(handle, "glMateriali"));
- SET_Materialiv(__ogl_framework_api, dlsym(handle, "glMaterialiv"));
- SET_MatrixMode(__ogl_framework_api, dlsym(handle, "glMatrixMode"));
- SET_Minmax(__ogl_framework_api, dlsym(handle, "glMinmax"));
- SET_MultMatrixd(__ogl_framework_api, dlsym(handle, "glMultMatrixd"));
- SET_MultMatrixf(__ogl_framework_api, dlsym(handle, "glMultMatrixf"));
- SET_NewList(__ogl_framework_api, dlsym(handle, "glNewList"));
- SET_Normal3b(__ogl_framework_api, dlsym(handle, "glNormal3b"));
- SET_Normal3bv(__ogl_framework_api, dlsym(handle, "glNormal3bv"));
- SET_Normal3d(__ogl_framework_api, dlsym(handle, "glNormal3d"));
- SET_Normal3dv(__ogl_framework_api, dlsym(handle, "glNormal3dv"));
- SET_Normal3f(__ogl_framework_api, dlsym(handle, "glNormal3f"));
- SET_Normal3fv(__ogl_framework_api, dlsym(handle, "glNormal3fv"));
- SET_Normal3i(__ogl_framework_api, dlsym(handle, "glNormal3i"));
- SET_Normal3iv(__ogl_framework_api, dlsym(handle, "glNormal3iv"));
- SET_Normal3s(__ogl_framework_api, dlsym(handle, "glNormal3s"));
- SET_Normal3sv(__ogl_framework_api, dlsym(handle, "glNormal3sv"));
- SET_NormalPointer(__ogl_framework_api, dlsym(handle, "glNormalPointer"));
- SET_Ortho(__ogl_framework_api, dlsym(handle, "glOrtho"));
- SET_PassThrough(__ogl_framework_api, dlsym(handle, "glPassThrough"));
- SET_PixelMapfv(__ogl_framework_api, dlsym(handle, "glPixelMapfv"));
- SET_PixelMapuiv(__ogl_framework_api, dlsym(handle, "glPixelMapuiv"));
- SET_PixelMapusv(__ogl_framework_api, dlsym(handle, "glPixelMapusv"));
- SET_PixelStoref(__ogl_framework_api, dlsym(handle, "glPixelStoref"));
- SET_PixelStorei(__ogl_framework_api, dlsym(handle, "glPixelStorei"));
- SET_PixelTransferf(__ogl_framework_api, dlsym(handle, "glPixelTransferf"));
- SET_PixelTransferi(__ogl_framework_api, dlsym(handle, "glPixelTransferi"));
- SET_PixelZoom(__ogl_framework_api, dlsym(handle, "glPixelZoom"));
- SET_PointSize(__ogl_framework_api, dlsym(handle, "glPointSize"));
- SET_PolygonMode(__ogl_framework_api, dlsym(handle, "glPolygonMode"));
- SET_PolygonOffset(__ogl_framework_api, dlsym(handle, "glPolygonOffset"));
- SET_PolygonStipple(__ogl_framework_api, dlsym(handle, "glPolygonStipple"));
- SET_PopAttrib(__ogl_framework_api, dlsym(handle, "glPopAttrib"));
- SET_PopClientAttrib(__ogl_framework_api, dlsym(handle, "glPopClientAttrib"));
- SET_PopMatrix(__ogl_framework_api, dlsym(handle, "glPopMatrix"));
- SET_PopName(__ogl_framework_api, dlsym(handle, "glPopName"));
- SET_PrioritizeTextures(__ogl_framework_api, dlsym(handle, "glPrioritizeTextures"));
- SET_PushAttrib(__ogl_framework_api, dlsym(handle, "glPushAttrib"));
- SET_PushClientAttrib(__ogl_framework_api, dlsym(handle, "glPushClientAttrib"));
- SET_PushMatrix(__ogl_framework_api, dlsym(handle, "glPushMatrix"));
- SET_PushName(__ogl_framework_api, dlsym(handle, "glPushName"));
- SET_RasterPos2d(__ogl_framework_api, dlsym(handle, "glRasterPos2d"));
- SET_RasterPos2dv(__ogl_framework_api, dlsym(handle, "glRasterPos2dv"));
- SET_RasterPos2f(__ogl_framework_api, dlsym(handle, "glRasterPos2f"));
- SET_RasterPos2fv(__ogl_framework_api, dlsym(handle, "glRasterPos2fv"));
- SET_RasterPos2i(__ogl_framework_api, dlsym(handle, "glRasterPos2i"));
- SET_RasterPos2iv(__ogl_framework_api, dlsym(handle, "glRasterPos2iv"));
- SET_RasterPos2s(__ogl_framework_api, dlsym(handle, "glRasterPos2s"));
- SET_RasterPos2sv(__ogl_framework_api, dlsym(handle, "glRasterPos2sv"));
- SET_RasterPos3d(__ogl_framework_api, dlsym(handle, "glRasterPos3d"));
- SET_RasterPos3dv(__ogl_framework_api, dlsym(handle, "glRasterPos3dv"));
- SET_RasterPos3f(__ogl_framework_api, dlsym(handle, "glRasterPos3f"));
- SET_RasterPos3fv(__ogl_framework_api, dlsym(handle, "glRasterPos3fv"));
- SET_RasterPos3i(__ogl_framework_api, dlsym(handle, "glRasterPos3i"));
- SET_RasterPos3iv(__ogl_framework_api, dlsym(handle, "glRasterPos3iv"));
- SET_RasterPos3s(__ogl_framework_api, dlsym(handle, "glRasterPos3s"));
- SET_RasterPos3sv(__ogl_framework_api, dlsym(handle, "glRasterPos3sv"));
- SET_RasterPos4d(__ogl_framework_api, dlsym(handle, "glRasterPos4d"));
- SET_RasterPos4dv(__ogl_framework_api, dlsym(handle, "glRasterPos4dv"));
- SET_RasterPos4f(__ogl_framework_api, dlsym(handle, "glRasterPos4f"));
- SET_RasterPos4fv(__ogl_framework_api, dlsym(handle, "glRasterPos4fv"));
- SET_RasterPos4i(__ogl_framework_api, dlsym(handle, "glRasterPos4i"));
- SET_RasterPos4iv(__ogl_framework_api, dlsym(handle, "glRasterPos4iv"));
- SET_RasterPos4s(__ogl_framework_api, dlsym(handle, "glRasterPos4s"));
- SET_RasterPos4sv(__ogl_framework_api, dlsym(handle, "glRasterPos4sv"));
- SET_ReadBuffer(__ogl_framework_api, dlsym(handle, "glReadBuffer"));
- SET_ReadPixels(__ogl_framework_api, dlsym(handle, "glReadPixels"));
- SET_Rectd(__ogl_framework_api, dlsym(handle, "glRectd"));
- SET_Rectdv(__ogl_framework_api, dlsym(handle, "glRectdv"));
- SET_Rectf(__ogl_framework_api, dlsym(handle, "glRectf"));
- SET_Rectfv(__ogl_framework_api, dlsym(handle, "glRectfv"));
- SET_Recti(__ogl_framework_api, dlsym(handle, "glRecti"));
- SET_Rectiv(__ogl_framework_api, dlsym(handle, "glRectiv"));
- SET_Rects(__ogl_framework_api, dlsym(handle, "glRects"));
- SET_Rectsv(__ogl_framework_api, dlsym(handle, "glRectsv"));
- SET_RenderMode(__ogl_framework_api, dlsym(handle, "glRenderMode"));
- SET_ResetHistogram(__ogl_framework_api, dlsym(handle, "glResetHistogram"));
- SET_ResetMinmax(__ogl_framework_api, dlsym(handle, "glResetMinmax"));
- SET_Rotated(__ogl_framework_api, dlsym(handle, "glRotated"));
- SET_Rotatef(__ogl_framework_api, dlsym(handle, "glRotatef"));
- SET_Scaled(__ogl_framework_api, dlsym(handle, "glScaled"));
- SET_Scalef(__ogl_framework_api, dlsym(handle, "glScalef"));
- SET_Scissor(__ogl_framework_api, dlsym(handle, "glScissor"));
- SET_SelectBuffer(__ogl_framework_api, dlsym(handle, "glSelectBuffer"));
- SET_SeparableFilter2D(__ogl_framework_api, dlsym(handle, "glSeparableFilter2D"));
- SET_ShadeModel(__ogl_framework_api, dlsym(handle, "glShadeModel"));
- SET_StencilFunc(__ogl_framework_api, dlsym(handle, "glStencilFunc"));
- SET_StencilMask(__ogl_framework_api, dlsym(handle, "glStencilMask"));
- SET_StencilOp(__ogl_framework_api, dlsym(handle, "glStencilOp"));
- SET_TexCoord1d(__ogl_framework_api, dlsym(handle, "glTexCoord1d"));
- SET_TexCoord1dv(__ogl_framework_api, dlsym(handle, "glTexCoord1dv"));
- SET_TexCoord1f(__ogl_framework_api, dlsym(handle, "glTexCoord1f"));
- SET_TexCoord1fv(__ogl_framework_api, dlsym(handle, "glTexCoord1fv"));
- SET_TexCoord1i(__ogl_framework_api, dlsym(handle, "glTexCoord1i"));
- SET_TexCoord1iv(__ogl_framework_api, dlsym(handle, "glTexCoord1iv"));
- SET_TexCoord1s(__ogl_framework_api, dlsym(handle, "glTexCoord1s"));
- SET_TexCoord1sv(__ogl_framework_api, dlsym(handle, "glTexCoord1sv"));
- SET_TexCoord2d(__ogl_framework_api, dlsym(handle, "glTexCoord2d"));
- SET_TexCoord2dv(__ogl_framework_api, dlsym(handle, "glTexCoord2dv"));
- SET_TexCoord2f(__ogl_framework_api, dlsym(handle, "glTexCoord2f"));
- SET_TexCoord2fv(__ogl_framework_api, dlsym(handle, "glTexCoord2fv"));
- SET_TexCoord2i(__ogl_framework_api, dlsym(handle, "glTexCoord2i"));
- SET_TexCoord2iv(__ogl_framework_api, dlsym(handle, "glTexCoord2iv"));
- SET_TexCoord2s(__ogl_framework_api, dlsym(handle, "glTexCoord2s"));
- SET_TexCoord2sv(__ogl_framework_api, dlsym(handle, "glTexCoord2sv"));
- SET_TexCoord3d(__ogl_framework_api, dlsym(handle, "glTexCoord3d"));
- SET_TexCoord3dv(__ogl_framework_api, dlsym(handle, "glTexCoord3dv"));
- SET_TexCoord3f(__ogl_framework_api, dlsym(handle, "glTexCoord3f"));
- SET_TexCoord3fv(__ogl_framework_api, dlsym(handle, "glTexCoord3fv"));
- SET_TexCoord3i(__ogl_framework_api, dlsym(handle, "glTexCoord3i"));
- SET_TexCoord3iv(__ogl_framework_api, dlsym(handle, "glTexCoord3iv"));
- SET_TexCoord3s(__ogl_framework_api, dlsym(handle, "glTexCoord3s"));
- SET_TexCoord3sv(__ogl_framework_api, dlsym(handle, "glTexCoord3sv"));
- SET_TexCoord4d(__ogl_framework_api, dlsym(handle, "glTexCoord4d"));
- SET_TexCoord4dv(__ogl_framework_api, dlsym(handle, "glTexCoord4dv"));
- SET_TexCoord4f(__ogl_framework_api, dlsym(handle, "glTexCoord4f"));
- SET_TexCoord4fv(__ogl_framework_api, dlsym(handle, "glTexCoord4fv"));
- SET_TexCoord4i(__ogl_framework_api, dlsym(handle, "glTexCoord4i"));
- SET_TexCoord4iv(__ogl_framework_api, dlsym(handle, "glTexCoord4iv"));
- SET_TexCoord4s(__ogl_framework_api, dlsym(handle, "glTexCoord4s"));
- SET_TexCoord4sv(__ogl_framework_api, dlsym(handle, "glTexCoord4sv"));
- SET_TexCoordPointer(__ogl_framework_api, dlsym(handle, "glTexCoordPointer"));
- SET_TexEnvf(__ogl_framework_api, dlsym(handle, "glTexEnvf"));
- SET_TexEnvfv(__ogl_framework_api, dlsym(handle, "glTexEnvfv"));
- SET_TexEnvi(__ogl_framework_api, dlsym(handle, "glTexEnvi"));
- SET_TexEnviv(__ogl_framework_api, dlsym(handle, "glTexEnviv"));
- SET_TexGend(__ogl_framework_api, dlsym(handle, "glTexGend"));
- SET_TexGendv(__ogl_framework_api, dlsym(handle, "glTexGendv"));
- SET_TexGenf(__ogl_framework_api, dlsym(handle, "glTexGenf"));
- SET_TexGenfv(__ogl_framework_api, dlsym(handle, "glTexGenfv"));
- SET_TexGeni(__ogl_framework_api, dlsym(handle, "glTexGeni"));
- SET_TexGeniv(__ogl_framework_api, dlsym(handle, "glTexGeniv"));
- SET_TexImage1D(__ogl_framework_api, dlsym(handle, "glTexImage1D"));
- SET_TexImage2D(__ogl_framework_api, dlsym(handle, "glTexImage2D"));
- SET_TexImage3D(__ogl_framework_api, dlsym(handle, "glTexImage3D"));
- SET_TexParameterf(__ogl_framework_api, dlsym(handle, "glTexParameterf"));
- SET_TexParameterfv(__ogl_framework_api, dlsym(handle, "glTexParameterfv"));
- SET_TexParameteri(__ogl_framework_api, dlsym(handle, "glTexParameteri"));
- SET_TexParameteriv(__ogl_framework_api, dlsym(handle, "glTexParameteriv"));
- SET_TexSubImage1D(__ogl_framework_api, dlsym(handle, "glTexSubImage1D"));
- SET_TexSubImage2D(__ogl_framework_api, dlsym(handle, "glTexSubImage2D"));
- SET_TexSubImage3D(__ogl_framework_api, dlsym(handle, "glTexSubImage3D"));
- SET_Translated(__ogl_framework_api, dlsym(handle, "glTranslated"));
- SET_Translatef(__ogl_framework_api, dlsym(handle, "glTranslatef"));
- SET_Vertex2d(__ogl_framework_api, dlsym(handle, "glVertex2d"));
- SET_Vertex2dv(__ogl_framework_api, dlsym(handle, "glVertex2dv"));
- SET_Vertex2f(__ogl_framework_api, dlsym(handle, "glVertex2f"));
- SET_Vertex2fv(__ogl_framework_api, dlsym(handle, "glVertex2fv"));
- SET_Vertex2i(__ogl_framework_api, dlsym(handle, "glVertex2i"));
- SET_Vertex2iv(__ogl_framework_api, dlsym(handle, "glVertex2iv"));
- SET_Vertex2s(__ogl_framework_api, dlsym(handle, "glVertex2s"));
- SET_Vertex2sv(__ogl_framework_api, dlsym(handle, "glVertex2sv"));
- SET_Vertex3d(__ogl_framework_api, dlsym(handle, "glVertex3d"));
- SET_Vertex3dv(__ogl_framework_api, dlsym(handle, "glVertex3dv"));
- SET_Vertex3f(__ogl_framework_api, dlsym(handle, "glVertex3f"));
- SET_Vertex3fv(__ogl_framework_api, dlsym(handle, "glVertex3fv"));
- SET_Vertex3i(__ogl_framework_api, dlsym(handle, "glVertex3i"));
- SET_Vertex3iv(__ogl_framework_api, dlsym(handle, "glVertex3iv"));
- SET_Vertex3s(__ogl_framework_api, dlsym(handle, "glVertex3s"));
- SET_Vertex3sv(__ogl_framework_api, dlsym(handle, "glVertex3sv"));
- SET_Vertex4d(__ogl_framework_api, dlsym(handle, "glVertex4d"));
- SET_Vertex4dv(__ogl_framework_api, dlsym(handle, "glVertex4dv"));
- SET_Vertex4f(__ogl_framework_api, dlsym(handle, "glVertex4f"));
- SET_Vertex4fv(__ogl_framework_api, dlsym(handle, "glVertex4fv"));
- SET_Vertex4i(__ogl_framework_api, dlsym(handle, "glVertex4i"));
- SET_Vertex4iv(__ogl_framework_api, dlsym(handle, "glVertex4iv"));
- SET_Vertex4s(__ogl_framework_api, dlsym(handle, "glVertex4s"));
- SET_Vertex4sv(__ogl_framework_api, dlsym(handle, "glVertex4sv"));
- SET_VertexPointer(__ogl_framework_api, dlsym(handle, "glVertexPointer"));
- SET_Viewport(__ogl_framework_api, dlsym(handle, "glViewport"));
-
- /* GL_VERSION_2_0 */
- SET_AttachShader(__ogl_framework_api, dlsym(handle, "glAttachShader"));
- SET_CreateProgram(__ogl_framework_api, dlsym(handle, "glCreateProgram"));
- SET_CreateShader(__ogl_framework_api, dlsym(handle, "glCreateShader"));
- SET_DeleteProgram(__ogl_framework_api, dlsym(handle, "glDeleteProgram"));
- SET_DeleteShader(__ogl_framework_api, dlsym(handle, "glDeleteShader"));
- SET_DetachShader(__ogl_framework_api, dlsym(handle, "glDetachShader"));
- SET_GetAttachedShaders(__ogl_framework_api, dlsym(handle, "glGetAttachedShaders"));
- SET_GetProgramiv(__ogl_framework_api, dlsym(handle, "glGetProgramiv"));
- SET_GetProgramInfoLog(__ogl_framework_api, dlsym(handle, "glGetProgramInfoLog"));
- SET_GetShaderInfoLog(__ogl_framework_api, dlsym(handle, "glGetShaderInfoLog"));
- SET_GetShaderiv(__ogl_framework_api, dlsym(handle, "glGetShaderiv"));
- SET_IsProgram(__ogl_framework_api, dlsym(handle, "glIsProgram"));
- SET_IsShader(__ogl_framework_api, dlsym(handle, "glIsShader"));
- SET_StencilFuncSeparate(__ogl_framework_api, dlsym(handle, "glStencilFuncSeparate"));
- SET_StencilMaskSeparate(__ogl_framework_api, dlsym(handle, "glStencilMaskSeparate"));
- SET_StencilOpSeparate(__ogl_framework_api, dlsym(handle, "glStencilOpSeparate"));
-
- /* GL_VERSION_2_1 */
- SET_UniformMatrix2x3fv(__ogl_framework_api, dlsym(handle, "glUniformMatrix2x3fv"));
- SET_UniformMatrix2x4fv(__ogl_framework_api, dlsym(handle, "glUniformMatrix2x4fv"));
- SET_UniformMatrix3x2fv(__ogl_framework_api, dlsym(handle, "glUniformMatrix3x2fv"));
- SET_UniformMatrix3x4fv(__ogl_framework_api, dlsym(handle, "glUniformMatrix3x4fv"));
- SET_UniformMatrix4x2fv(__ogl_framework_api, dlsym(handle, "glUniformMatrix4x2fv"));
- SET_UniformMatrix4x3fv(__ogl_framework_api, dlsym(handle, "glUniformMatrix4x3fv"));
-
- /* GL_VERSION_3_0 */
- SET_ClampColor(__ogl_framework_api, dlsym(handle, "glClampColor"));
- SET_ClearBufferfi(__ogl_framework_api, dlsym(handle, "glClearBufferfi"));
- SET_ClearBufferfv(__ogl_framework_api, dlsym(handle, "glClearBufferfv"));
- SET_ClearBufferiv(__ogl_framework_api, dlsym(handle, "glClearBufferiv"));
- SET_ClearBufferuiv(__ogl_framework_api, dlsym(handle, "glClearBufferuiv"));
- SET_GetStringi(__ogl_framework_api, dlsym(handle, "glGetStringi"));
-
- /* GL_VERSION_3_1 */
- SET_TexBuffer(__ogl_framework_api, dlsym(handle, "glTexBuffer"));
-
- /* GL_VERSION_3_2 */
- SET_FramebufferTexture(__ogl_framework_api, dlsym(handle, "glFramebufferTexture"));
- SET_GetBufferParameteri64v(__ogl_framework_api, dlsym(handle, "glGetBufferParameteri64v"));
- SET_GetInteger64i_v(__ogl_framework_api, dlsym(handle, "glGetInteger64i_v"));
-
- /* GL_APPLE_vertex_array_object */
- SET_BindVertexArrayAPPLE(__ogl_framework_api, dlsym(handle, "glBindVertexArrayAPPLE"));
- SET_DeleteVertexArraysAPPLE(__ogl_framework_api, dlsym(handle, "glDeleteVertexArraysAPPLE"));
- SET_GenVertexArraysAPPLE(__ogl_framework_api, dlsym(handle, "glGenVertexArraysAPPLE"));
- SET_IsVertexArrayAPPLE(__ogl_framework_api, dlsym(handle, "glIsVertexArrayAPPLE"));
-
- /* GL_ARB_draw_buffers */
- SET_DrawBuffersARB(__ogl_framework_api, dlsym(handle, "glDrawBuffersARB"));
-
- /* GL_ARB_multisample */
- SET_SampleCoverageARB(__ogl_framework_api, dlsym(handle, "glSampleCoverageARB"));
-
- /* GL_ARB_multitexture */
- SET_ActiveTextureARB(__ogl_framework_api, dlsym(handle, "glActiveTextureARB"));
- SET_ClientActiveTextureARB(__ogl_framework_api, dlsym(handle, "glClientActiveTextureARB"));
- SET_MultiTexCoord1dARB(__ogl_framework_api, dlsym(handle, "glMultiTexCoord1dARB"));
- SET_MultiTexCoord1dvARB(__ogl_framework_api, dlsym(handle, "glMultiTexCoord1dvARB"));
- SET_MultiTexCoord1fARB(__ogl_framework_api, dlsym(handle, "glMultiTexCoord1fARB"));
- SET_MultiTexCoord1fvARB(__ogl_framework_api, dlsym(handle, "glMultiTexCoord1fvARB"));
- SET_MultiTexCoord1iARB(__ogl_framework_api, dlsym(handle, "glMultiTexCoord1iARB"));
- SET_MultiTexCoord1ivARB(__ogl_framework_api, dlsym(handle, "glMultiTexCoord1ivARB"));
- SET_MultiTexCoord1sARB(__ogl_framework_api, dlsym(handle, "glMultiTexCoord1sARB"));
- SET_MultiTexCoord1svARB(__ogl_framework_api, dlsym(handle, "glMultiTexCoord1svARB"));
- SET_MultiTexCoord2dARB(__ogl_framework_api, dlsym(handle, "glMultiTexCoord2dARB"));
- SET_MultiTexCoord2dvARB(__ogl_framework_api, dlsym(handle, "glMultiTexCoord2dvARB"));
- SET_MultiTexCoord2fARB(__ogl_framework_api, dlsym(handle, "glMultiTexCoord2fARB"));
- SET_MultiTexCoord2fvARB(__ogl_framework_api, dlsym(handle, "glMultiTexCoord2fvARB"));
- SET_MultiTexCoord2iARB(__ogl_framework_api, dlsym(handle, "glMultiTexCoord2iARB"));
- SET_MultiTexCoord2ivARB(__ogl_framework_api, dlsym(handle, "glMultiTexCoord2ivARB"));
- SET_MultiTexCoord2sARB(__ogl_framework_api, dlsym(handle, "glMultiTexCoord2sARB"));
- SET_MultiTexCoord2svARB(__ogl_framework_api, dlsym(handle, "glMultiTexCoord2svARB"));
- SET_MultiTexCoord3dARB(__ogl_framework_api, dlsym(handle, "glMultiTexCoord3dARB"));
- SET_MultiTexCoord3dvARB(__ogl_framework_api, dlsym(handle, "glMultiTexCoord3dvARB"));
- SET_MultiTexCoord3fARB(__ogl_framework_api, dlsym(handle, "glMultiTexCoord3fARB"));
- SET_MultiTexCoord3fvARB(__ogl_framework_api, dlsym(handle, "glMultiTexCoord3fvARB"));
- SET_MultiTexCoord3iARB(__ogl_framework_api, dlsym(handle, "glMultiTexCoord3iARB"));
- SET_MultiTexCoord3ivARB(__ogl_framework_api, dlsym(handle, "glMultiTexCoord3ivARB"));
- SET_MultiTexCoord3sARB(__ogl_framework_api, dlsym(handle, "glMultiTexCoord3sARB"));
- SET_MultiTexCoord3svARB(__ogl_framework_api, dlsym(handle, "glMultiTexCoord3svARB"));
- SET_MultiTexCoord4dARB(__ogl_framework_api, dlsym(handle, "glMultiTexCoord4dARB"));
- SET_MultiTexCoord4dvARB(__ogl_framework_api, dlsym(handle, "glMultiTexCoord4dvARB"));
- SET_MultiTexCoord4fARB(__ogl_framework_api, dlsym(handle, "glMultiTexCoord4fARB"));
- SET_MultiTexCoord4fvARB(__ogl_framework_api, dlsym(handle, "glMultiTexCoord4fvARB"));
- SET_MultiTexCoord4iARB(__ogl_framework_api, dlsym(handle, "glMultiTexCoord4iARB"));
- SET_MultiTexCoord4ivARB(__ogl_framework_api, dlsym(handle, "glMultiTexCoord4ivARB"));
- SET_MultiTexCoord4sARB(__ogl_framework_api, dlsym(handle, "glMultiTexCoord4sARB"));
- SET_MultiTexCoord4svARB(__ogl_framework_api, dlsym(handle, "glMultiTexCoord4svARB"));
-
- /* GL_ARB_occlusion_query */
- SET_BeginQueryARB(__ogl_framework_api, dlsym(handle, "glBeginQueryARB"));
- SET_DeleteQueriesARB(__ogl_framework_api, dlsym(handle, "glDeleteQueriesARB"));
- SET_EndQueryARB(__ogl_framework_api, dlsym(handle, "glEndQueryARB"));
- SET_GenQueriesARB(__ogl_framework_api, dlsym(handle, "glGenQueriesARB"));
- SET_GetQueryObjectivARB(__ogl_framework_api, dlsym(handle, "glGetQueryObjectivARB"));
- SET_GetQueryObjectuivARB(__ogl_framework_api, dlsym(handle, "glGetQueryObjectuivARB"));
- SET_GetQueryivARB(__ogl_framework_api, dlsym(handle, "glGetQueryivARB"));
- SET_IsQueryARB(__ogl_framework_api, dlsym(handle, "glIsQueryARB"));
-
- /* GL_ARB_shader_objects */
- SET_AttachObjectARB(__ogl_framework_api, dlsym(handle, "glAttachObjectARB"));
- SET_CompileShaderARB(__ogl_framework_api, dlsym(handle, "glCompileShaderARB"));
- SET_DeleteObjectARB(__ogl_framework_api, dlsym(handle, "glDeleteObjectARB"));
- SET_GetHandleARB(__ogl_framework_api, dlsym(handle, "glGetHandleARB"));
- SET_DetachObjectARB(__ogl_framework_api, dlsym(handle, "glDetachObjectARB"));
- SET_CreateProgramObjectARB(__ogl_framework_api, dlsym(handle, "glCreateProgramObjectARB"));
- SET_CreateShaderObjectARB(__ogl_framework_api, dlsym(handle, "glCreateShaderObjectARB"));
- SET_GetInfoLogARB(__ogl_framework_api, dlsym(handle, "glGetInfoLogARB"));
- SET_GetActiveUniformARB(__ogl_framework_api, dlsym(handle, "glGetActiveUniformARB"));
- SET_GetAttachedObjectsARB(__ogl_framework_api, dlsym(handle, "glGetAttachedObjectsARB"));
- SET_GetObjectParameterfvARB(__ogl_framework_api, dlsym(handle, "glGetObjectParameterfvARB"));
- SET_GetObjectParameterivARB(__ogl_framework_api, dlsym(handle, "glGetObjectParameterivARB"));
- SET_GetShaderSourceARB(__ogl_framework_api, dlsym(handle, "glGetShaderSourceARB"));
- SET_GetUniformLocationARB(__ogl_framework_api, dlsym(handle, "glGetUniformLocationARB"));
- SET_GetUniformfvARB(__ogl_framework_api, dlsym(handle, "glGetUniformfvARB"));
- SET_GetUniformivARB(__ogl_framework_api, dlsym(handle, "glGetUniformivARB"));
- SET_LinkProgramARB(__ogl_framework_api, dlsym(handle, "glLinkProgramARB"));
- SET_ShaderSourceARB(__ogl_framework_api, dlsym(handle, "glShaderSourceARB"));
- SET_Uniform1fARB(__ogl_framework_api, dlsym(handle, "glUniform1fARB"));
- SET_Uniform1fvARB(__ogl_framework_api, dlsym(handle, "glUniform1fvARB"));
- SET_Uniform1iARB(__ogl_framework_api, dlsym(handle, "glUniform1iARB"));
- SET_Uniform1ivARB(__ogl_framework_api, dlsym(handle, "glUniform1ivARB"));
- SET_Uniform2fARB(__ogl_framework_api, dlsym(handle, "glUniform2fARB"));
- SET_Uniform2fvARB(__ogl_framework_api, dlsym(handle, "glUniform2fvARB"));
- SET_Uniform2iARB(__ogl_framework_api, dlsym(handle, "glUniform2iARB"));
- SET_Uniform2ivARB(__ogl_framework_api, dlsym(handle, "glUniform2ivARB"));
- SET_Uniform3fARB(__ogl_framework_api, dlsym(handle, "glUniform3fARB"));
- SET_Uniform3fvARB(__ogl_framework_api, dlsym(handle, "glUniform3fvARB"));
- SET_Uniform3iARB(__ogl_framework_api, dlsym(handle, "glUniform3iARB"));
- SET_Uniform3ivARB(__ogl_framework_api, dlsym(handle, "glUniform3ivARB"));
- SET_Uniform4fARB(__ogl_framework_api, dlsym(handle, "glUniform4fARB"));
- SET_Uniform4fvARB(__ogl_framework_api, dlsym(handle, "glUniform4fvARB"));
- SET_Uniform4iARB(__ogl_framework_api, dlsym(handle, "glUniform4iARB"));
- SET_Uniform4ivARB(__ogl_framework_api, dlsym(handle, "glUniform4ivARB"));
- SET_UniformMatrix2fvARB(__ogl_framework_api, dlsym(handle, "glUniformMatrix2fvARB"));
- SET_UniformMatrix3fvARB(__ogl_framework_api, dlsym(handle, "glUniformMatrix3fvARB"));
- SET_UniformMatrix4fvARB(__ogl_framework_api, dlsym(handle, "glUniformMatrix4fvARB"));
- SET_UseProgramObjectARB(__ogl_framework_api, dlsym(handle, "glUseProgramObjectARB"));
- SET_ValidateProgramARB(__ogl_framework_api, dlsym(handle, "glValidateProgramARB"));
-
- /* GL_ARB_texture_compression */
- SET_CompressedTexImage1DARB(__ogl_framework_api, dlsym(handle, "glCompressedTexImage1DARB"));
- SET_CompressedTexImage2DARB(__ogl_framework_api, dlsym(handle, "glCompressedTexImage2DARB"));
- SET_CompressedTexImage3DARB(__ogl_framework_api, dlsym(handle, "glCompressedTexImage3DARB"));
- SET_CompressedTexSubImage1DARB(__ogl_framework_api, dlsym(handle, "glCompressedTexSubImage1DARB"));
- SET_CompressedTexSubImage2DARB(__ogl_framework_api, dlsym(handle, "glCompressedTexSubImage2DARB"));
- SET_CompressedTexSubImage3DARB(__ogl_framework_api, dlsym(handle, "glCompressedTexSubImage3DARB"));
- SET_GetCompressedTexImageARB(__ogl_framework_api, dlsym(handle, "glGetCompressedTexImageARB"));
-
- /* GL_ARB_transpose_matrix */
- SET_LoadTransposeMatrixdARB(__ogl_framework_api, dlsym(handle, "glLoadTransposeMatrixdARB"));
- SET_LoadTransposeMatrixfARB(__ogl_framework_api, dlsym(handle, "glLoadTransposeMatrixfARB"));
- SET_MultTransposeMatrixdARB(__ogl_framework_api, dlsym(handle, "glMultTransposeMatrixdARB"));
- SET_MultTransposeMatrixfARB(__ogl_framework_api, dlsym(handle, "glMultTransposeMatrixfARB"));
-
- /* GL_ARB_vertex_buffer_object */
- SET_BindBufferARB(__ogl_framework_api, dlsym(handle, "glBindBufferARB"));
- SET_BufferDataARB(__ogl_framework_api, dlsym(handle, "glBufferDataARB"));
- SET_BufferSubDataARB(__ogl_framework_api, dlsym(handle, "glBufferSubDataARB"));
- SET_DeleteBuffersARB(__ogl_framework_api, dlsym(handle, "glDeleteBuffersARB"));
- SET_GenBuffersARB(__ogl_framework_api, dlsym(handle, "glGenBuffersARB"));
- SET_GetBufferParameterivARB(__ogl_framework_api, dlsym(handle, "glGetBufferParameterivARB"));
- SET_GetBufferPointervARB(__ogl_framework_api, dlsym(handle, "glGetBufferPointervARB"));
- SET_GetBufferSubDataARB(__ogl_framework_api, dlsym(handle, "glGetBufferSubDataARB"));
- SET_IsBufferARB(__ogl_framework_api, dlsym(handle, "glIsBufferARB"));
- SET_MapBufferARB(__ogl_framework_api, dlsym(handle, "glMapBufferARB"));
- SET_UnmapBufferARB(__ogl_framework_api, dlsym(handle, "glUnmapBufferARB"));
-
- /* GL_ARB_vertex_program */
- SET_DisableVertexAttribArrayARB(__ogl_framework_api, dlsym(handle, "glDisableVertexAttribArrayARB"));
- SET_EnableVertexAttribArrayARB(__ogl_framework_api, dlsym(handle, "glEnableVertexAttribArrayARB"));
- SET_GetProgramEnvParameterdvARB(__ogl_framework_api, dlsym(handle, "glGetProgramEnvParameterdvARB"));
- SET_GetProgramEnvParameterfvARB(__ogl_framework_api, dlsym(handle, "glGetProgramEnvParameterfvARB"));
- SET_GetProgramLocalParameterdvARB(__ogl_framework_api, dlsym(handle, "glGetProgramLocalParameterdvARB"));
- SET_GetProgramLocalParameterfvARB(__ogl_framework_api, dlsym(handle, "glGetProgramLocalParameterfvARB"));
- SET_GetProgramStringARB(__ogl_framework_api, dlsym(handle, "glGetProgramStringARB"));
- SET_GetProgramivARB(__ogl_framework_api, dlsym(handle, "glGetProgramivARB"));
- SET_GetVertexAttribdvARB(__ogl_framework_api, dlsym(handle, "glGetVertexAttribdvARB"));
- SET_GetVertexAttribfvARB(__ogl_framework_api, dlsym(handle, "glGetVertexAttribfvARB"));
- SET_GetVertexAttribivARB(__ogl_framework_api, dlsym(handle, "glGetVertexAttribivARB"));
- SET_ProgramEnvParameter4dARB(__ogl_framework_api, dlsym(handle, "glProgramEnvParameter4dARB"));
- SET_ProgramEnvParameter4dvARB(__ogl_framework_api, dlsym(handle, "glProgramEnvParameter4dvARB"));
- SET_ProgramEnvParameter4fARB(__ogl_framework_api, dlsym(handle, "glProgramEnvParameter4fARB"));
- SET_ProgramEnvParameter4fvARB(__ogl_framework_api, dlsym(handle, "glProgramEnvParameter4fvARB"));
- SET_ProgramLocalParameter4dARB(__ogl_framework_api, dlsym(handle, "glProgramLocalParameter4dARB"));
- SET_ProgramLocalParameter4dvARB(__ogl_framework_api, dlsym(handle, "glProgramLocalParameter4dvARB"));
- SET_ProgramLocalParameter4fARB(__ogl_framework_api, dlsym(handle, "glProgramLocalParameter4fARB"));
- SET_ProgramLocalParameter4fvARB(__ogl_framework_api, dlsym(handle, "glProgramLocalParameter4fvARB"));
- SET_ProgramStringARB(__ogl_framework_api, dlsym(handle, "glProgramStringARB"));
- SET_VertexAttrib1dARB(__ogl_framework_api, dlsym(handle, "glVertexAttrib1dARB"));
- SET_VertexAttrib1dvARB(__ogl_framework_api, dlsym(handle, "glVertexAttrib1dvARB"));
- SET_VertexAttrib1fARB(__ogl_framework_api, dlsym(handle, "glVertexAttrib1fARB"));
- SET_VertexAttrib1fvARB(__ogl_framework_api, dlsym(handle, "glVertexAttrib1fvARB"));
- SET_VertexAttrib1sARB(__ogl_framework_api, dlsym(handle, "glVertexAttrib1sARB"));
- SET_VertexAttrib1svARB(__ogl_framework_api, dlsym(handle, "glVertexAttrib1svARB"));
- SET_VertexAttrib2dARB(__ogl_framework_api, dlsym(handle, "glVertexAttrib2dARB"));
- SET_VertexAttrib2dvARB(__ogl_framework_api, dlsym(handle, "glVertexAttrib2dvARB"));
- SET_VertexAttrib2fARB(__ogl_framework_api, dlsym(handle, "glVertexAttrib2fARB"));
- SET_VertexAttrib2fvARB(__ogl_framework_api, dlsym(handle, "glVertexAttrib2fvARB"));
- SET_VertexAttrib2sARB(__ogl_framework_api, dlsym(handle, "glVertexAttrib2sARB"));
- SET_VertexAttrib2svARB(__ogl_framework_api, dlsym(handle, "glVertexAttrib2svARB"));
- SET_VertexAttrib3dARB(__ogl_framework_api, dlsym(handle, "glVertexAttrib3dARB"));
- SET_VertexAttrib3dvARB(__ogl_framework_api, dlsym(handle, "glVertexAttrib3dvARB"));
- SET_VertexAttrib3fARB(__ogl_framework_api, dlsym(handle, "glVertexAttrib3fARB"));
- SET_VertexAttrib3fvARB(__ogl_framework_api, dlsym(handle, "glVertexAttrib3fvARB"));
- SET_VertexAttrib3sARB(__ogl_framework_api, dlsym(handle, "glVertexAttrib3sARB"));
- SET_VertexAttrib3svARB(__ogl_framework_api, dlsym(handle, "glVertexAttrib3svARB"));
- SET_VertexAttrib4NbvARB(__ogl_framework_api, dlsym(handle, "glVertexAttrib4NbvARB"));
- SET_VertexAttrib4NivARB(__ogl_framework_api, dlsym(handle, "glVertexAttrib4NivARB"));
- SET_VertexAttrib4NsvARB(__ogl_framework_api, dlsym(handle, "glVertexAttrib4NsvARB"));
- SET_VertexAttrib4NubARB(__ogl_framework_api, dlsym(handle, "glVertexAttrib4NubARB"));
- SET_VertexAttrib4NubvARB(__ogl_framework_api, dlsym(handle, "glVertexAttrib4NubvARB"));
- SET_VertexAttrib4NuivARB(__ogl_framework_api, dlsym(handle, "glVertexAttrib4NuivARB"));
- SET_VertexAttrib4NusvARB(__ogl_framework_api, dlsym(handle, "glVertexAttrib4NusvARB"));
- SET_VertexAttrib4bvARB(__ogl_framework_api, dlsym(handle, "glVertexAttrib4bvARB"));
- SET_VertexAttrib4dARB(__ogl_framework_api, dlsym(handle, "glVertexAttrib4dARB"));
- SET_VertexAttrib4dvARB(__ogl_framework_api, dlsym(handle, "glVertexAttrib4dvARB"));
- SET_VertexAttrib4fARB(__ogl_framework_api, dlsym(handle, "glVertexAttrib4fARB"));
- SET_VertexAttrib4fvARB(__ogl_framework_api, dlsym(handle, "glVertexAttrib4fvARB"));
- SET_VertexAttrib4ivARB(__ogl_framework_api, dlsym(handle, "glVertexAttrib4ivARB"));
- SET_VertexAttrib4sARB(__ogl_framework_api, dlsym(handle, "glVertexAttrib4sARB"));
- SET_VertexAttrib4svARB(__ogl_framework_api, dlsym(handle, "glVertexAttrib4svARB"));
- SET_VertexAttrib4ubvARB(__ogl_framework_api, dlsym(handle, "glVertexAttrib4ubvARB"));
- SET_VertexAttrib4uivARB(__ogl_framework_api, dlsym(handle, "glVertexAttrib4uivARB"));
- SET_VertexAttrib4usvARB(__ogl_framework_api, dlsym(handle, "glVertexAttrib4usvARB"));
- SET_VertexAttribPointerARB(__ogl_framework_api, dlsym(handle, "glVertexAttribPointerARB"));
-
- /* GL_ARB_vertex_shader */
- SET_BindAttribLocationARB(__ogl_framework_api, dlsym(handle, "glBindAttribLocationARB"));
- SET_GetActiveAttribARB(__ogl_framework_api, dlsym(handle, "glGetActiveAttribARB"));
- SET_GetAttribLocationARB(__ogl_framework_api, dlsym(handle, "glGetAttribLocationARB"));
-
- /* GL_ARB_window_pos */
- SET_WindowPos2dMESA(__ogl_framework_api, dlsym(handle, "glWindowPos2dARB"));
- SET_WindowPos2dvMESA(__ogl_framework_api, dlsym(handle, "glWindowPos2dvARB"));
- SET_WindowPos2fMESA(__ogl_framework_api, dlsym(handle, "glWindowPos2fARB"));
- SET_WindowPos2fvMESA(__ogl_framework_api, dlsym(handle, "glWindowPos2fvARB"));
- SET_WindowPos2iMESA(__ogl_framework_api, dlsym(handle, "glWindowPos2iARB"));
- SET_WindowPos2ivMESA(__ogl_framework_api, dlsym(handle, "glWindowPos2ivARB"));
- SET_WindowPos2sMESA(__ogl_framework_api, dlsym(handle, "glWindowPos2sARB"));
- SET_WindowPos2svMESA(__ogl_framework_api, dlsym(handle, "glWindowPos2svARB"));
- SET_WindowPos3dMESA(__ogl_framework_api, dlsym(handle, "glWindowPos3dARB"));
- SET_WindowPos3dvMESA(__ogl_framework_api, dlsym(handle, "glWindowPos3dvARB"));
- SET_WindowPos3fMESA(__ogl_framework_api, dlsym(handle, "glWindowPos3fARB"));
- SET_WindowPos3fvMESA(__ogl_framework_api, dlsym(handle, "glWindowPos3fvARB"));
- SET_WindowPos3iMESA(__ogl_framework_api, dlsym(handle, "glWindowPos3iARB"));
- SET_WindowPos3ivMESA(__ogl_framework_api, dlsym(handle, "glWindowPos3ivARB"));
- SET_WindowPos3sMESA(__ogl_framework_api, dlsym(handle, "glWindowPos3sARB"));
- SET_WindowPos3svMESA(__ogl_framework_api, dlsym(handle, "glWindowPos3svARB"));
-
- /* GL_ATI_fragment_shader / GL_EXT_fragment_shader */
- if(dlsym(handle, "glAlphaFragmentOp1ATI")) {
- /* GL_ATI_fragment_shader */
- SET_AlphaFragmentOp1ATI(__ogl_framework_api, dlsym(handle, "glAlphaFragmentOp1ATI"));
- SET_AlphaFragmentOp2ATI(__ogl_framework_api, dlsym(handle, "glAlphaFragmentOp2ATI"));
- SET_AlphaFragmentOp3ATI(__ogl_framework_api, dlsym(handle, "glAlphaFragmentOp3ATI"));
- SET_BeginFragmentShaderATI(__ogl_framework_api, dlsym(handle, "glBeginFragmentShaderATI"));
- SET_BindFragmentShaderATI(__ogl_framework_api, dlsym(handle, "glBindFragmentShaderATI"));
- SET_ColorFragmentOp1ATI(__ogl_framework_api, dlsym(handle, "glColorFragmentOp1ATI"));
- SET_ColorFragmentOp2ATI(__ogl_framework_api, dlsym(handle, "glColorFragmentOp2ATI"));
- SET_ColorFragmentOp3ATI(__ogl_framework_api, dlsym(handle, "glColorFragmentOp3ATI"));
- SET_DeleteFragmentShaderATI(__ogl_framework_api, dlsym(handle, "glDeleteFragmentShaderATI"));
- SET_EndFragmentShaderATI(__ogl_framework_api, dlsym(handle, "glEndFragmentShaderATI"));
- SET_GenFragmentShadersATI(__ogl_framework_api, dlsym(handle, "glGenFragmentShadersATI"));
- SET_PassTexCoordATI(__ogl_framework_api, dlsym(handle, "glPassTexCoordATI"));
- SET_SampleMapATI(__ogl_framework_api, dlsym(handle, "glSampleMapATI"));
- SET_SetFragmentShaderConstantATI(__ogl_framework_api, dlsym(handle, "glSetFragmentShaderConstantATI"));
- } else {
- /* GL_EXT_fragment_shader */
- SET_AlphaFragmentOp1ATI(__ogl_framework_api, dlsym(handle, "glAlphaFragmentOp1EXT"));
- SET_AlphaFragmentOp2ATI(__ogl_framework_api, dlsym(handle, "glAlphaFragmentOp2EXT"));
- SET_AlphaFragmentOp3ATI(__ogl_framework_api, dlsym(handle, "glAlphaFragmentOp3EXT"));
- SET_BeginFragmentShaderATI(__ogl_framework_api, dlsym(handle, "glBeginFragmentShaderEXT"));
- SET_BindFragmentShaderATI(__ogl_framework_api, dlsym(handle, "glBindFragmentShaderEXT"));
- SET_ColorFragmentOp1ATI(__ogl_framework_api, dlsym(handle, "glColorFragmentOp1EXT"));
- SET_ColorFragmentOp2ATI(__ogl_framework_api, dlsym(handle, "glColorFragmentOp2EXT"));
- SET_ColorFragmentOp3ATI(__ogl_framework_api, dlsym(handle, "glColorFragmentOp3EXT"));
- SET_DeleteFragmentShaderATI(__ogl_framework_api, dlsym(handle, "glDeleteFragmentShaderEXT"));
- SET_EndFragmentShaderATI(__ogl_framework_api, dlsym(handle, "glEndFragmentShaderEXT"));
- SET_GenFragmentShadersATI(__ogl_framework_api, dlsym(handle, "glGenFragmentShadersEXT"));
- SET_PassTexCoordATI(__ogl_framework_api, dlsym(handle, "glPassTexCoordEXT"));
- SET_SampleMapATI(__ogl_framework_api, dlsym(handle, "glSampleMapEXT"));
- SET_SetFragmentShaderConstantATI(__ogl_framework_api, dlsym(handle, "glSetFragmentShaderConstantEXT"));
- }
-
- /* GL_ATI_separate_stencil */
- SET_StencilFuncSeparateATI(__ogl_framework_api, dlsym(handle, "glStencilFuncSeparateATI"));
-
- /* GL_EXT_blend_equation_separate */
- SET_BlendEquationSeparateEXT(__ogl_framework_api, dlsym(handle, "glBlendEquationSeparateEXT"));
-
- /* GL_EXT_blend_func_separate */
- SET_BlendFuncSeparateEXT(__ogl_framework_api, dlsym(handle, "glBlendFuncSeparateEXT"));
-
- /* GL_EXT_depth_bounds_test */
- SET_DepthBoundsEXT(__ogl_framework_api, dlsym(handle, "glDepthBoundsEXT"));
-
- /* GL_EXT_compiled_vertex_array */
- SET_LockArraysEXT(__ogl_framework_api, dlsym(handle, "glLockArraysEXT"));
- SET_UnlockArraysEXT(__ogl_framework_api, dlsym(handle, "glUnlockArraysEXT"));
-
- /* GL_EXT_cull_vertex */
-// SET_CullParameterdvEXT(__ogl_framework_api, dlsym(handle, "glCullParameterdvEXT"));
-// SET_CullParameterfvEXT(__ogl_framework_api, dlsym(handle, "glCullParameterfvEXT"));
-
- /* GL_EXT_fog_coord */
- SET_FogCoordPointerEXT(__ogl_framework_api, dlsym(handle, "glFogCoordPointerEXT"));
- SET_FogCoorddEXT(__ogl_framework_api, dlsym(handle, "glFogCoorddEXT"));
- SET_FogCoorddvEXT(__ogl_framework_api, dlsym(handle, "glFogCoorddvEXT"));
- SET_FogCoordfEXT(__ogl_framework_api, dlsym(handle, "glFogCoordfEXT"));
- SET_FogCoordfvEXT(__ogl_framework_api, dlsym(handle, "glFogCoordfvEXT"));
-
- /* GL_EXT_framebuffer_blit */
- SET_BlitFramebufferEXT(__ogl_framework_api, dlsym(handle, "glBlitFramebufferEXT"));
-
- /* GL_EXT_framebuffer_object */
- SET_BindFramebufferEXT(__ogl_framework_api, dlsym(handle, "glBindFramebufferEXT"));
- SET_BindRenderbufferEXT(__ogl_framework_api, dlsym(handle, "glBindRenderbufferEXT"));
- SET_CheckFramebufferStatusEXT(__ogl_framework_api, dlsym(handle, "glCheckFramebufferStatusEXT"));
- SET_DeleteFramebuffersEXT(__ogl_framework_api, dlsym(handle, "glDeleteFramebuffersEXT"));
- SET_DeleteRenderbuffersEXT(__ogl_framework_api, dlsym(handle, "glDeleteRenderbuffersEXT"));
- SET_FramebufferRenderbufferEXT(__ogl_framework_api, dlsym(handle, "glFramebufferRenderbufferEXT"));
- SET_FramebufferTexture1DEXT(__ogl_framework_api, dlsym(handle, "glFramebufferTexture1DEXT"));
- SET_FramebufferTexture2DEXT(__ogl_framework_api, dlsym(handle, "glFramebufferTexture2DEXT"));
- SET_FramebufferTexture3DEXT(__ogl_framework_api, dlsym(handle, "glFramebufferTexture3DEXT"));
- SET_GenerateMipmapEXT(__ogl_framework_api, dlsym(handle, "glGenerateMipmapEXT"));
- SET_GenFramebuffersEXT(__ogl_framework_api, dlsym(handle, "glGenFramebuffersEXT"));
- SET_GenRenderbuffersEXT(__ogl_framework_api, dlsym(handle, "glGenRenderbuffersEXT"));
- SET_GetFramebufferAttachmentParameterivEXT(__ogl_framework_api, dlsym(handle, "glGetFramebufferAttachmentParameterivEXT"));
- SET_GetRenderbufferParameterivEXT(__ogl_framework_api, dlsym(handle, "glGetRenderbufferParameterivEXT"));
- SET_IsFramebufferEXT(__ogl_framework_api, dlsym(handle, "glIsFramebufferEXT"));
- SET_IsRenderbufferEXT(__ogl_framework_api, dlsym(handle, "glIsRenderbufferEXT"));
- SET_RenderbufferStorageEXT(__ogl_framework_api, dlsym(handle, "glRenderbufferStorageEXT"));
-
- /* GL_EXT_gpu_program_parameters */
- SET_ProgramEnvParameters4fvEXT(__ogl_framework_api, dlsym(handle, "glProgramEnvParameters4fvEXT"));
- SET_ProgramLocalParameters4fvEXT(__ogl_framework_api, dlsym(handle, "glProgramLocalParameters4fvEXT"));
-
- /* GL_EXT_multi_draw_arrays */
- SET_MultiDrawArraysEXT(__ogl_framework_api, (void *)dlsym(handle, "glMultiDrawArraysEXT"));
- SET_MultiDrawElementsEXT(__ogl_framework_api, dlsym(handle, "glMultiDrawElementsEXT"));
-
- /* GL_EXT_point_parameters / GL_ARB_point_parameters */
- if(dlsym(handle, "glPointParameterfEXT")) {
- /* GL_EXT_point_parameters */
- SET_PointParameterfEXT(__ogl_framework_api, dlsym(handle, "glPointParameterfEXT"));
- SET_PointParameterfvEXT(__ogl_framework_api, dlsym(handle, "glPointParameterfvEXT"));
- } else {
- /* GL_ARB_point_parameters */
- SET_PointParameterfEXT(__ogl_framework_api, dlsym(handle, "glPointParameterfARB"));
- SET_PointParameterfvEXT(__ogl_framework_api, dlsym(handle, "glPointParameterfvARB"));
- }
-
- /* GL_EXT_polygon_offset */
- SET_PolygonOffsetEXT(__ogl_framework_api, dlsym(handle, "glPolygonOffsetEXT"));
-
- /* GL_EXT_secondary_color */
- SET_SecondaryColor3bEXT(__ogl_framework_api, dlsym(handle, "glSecondaryColor3bEXT"));
- SET_SecondaryColor3bvEXT(__ogl_framework_api, dlsym(handle, "glSecondaryColor3bvEXT"));
- SET_SecondaryColor3dEXT(__ogl_framework_api, dlsym(handle, "glSecondaryColor3dEXT"));
- SET_SecondaryColor3dvEXT(__ogl_framework_api, dlsym(handle, "glSecondaryColor3dvEXT"));
- SET_SecondaryColor3fEXT(__ogl_framework_api, dlsym(handle, "glSecondaryColor3fEXT"));
- SET_SecondaryColor3fvEXT(__ogl_framework_api, dlsym(handle, "glSecondaryColor3fvEXT"));
- SET_SecondaryColor3iEXT(__ogl_framework_api, dlsym(handle, "glSecondaryColor3iEXT"));
- SET_SecondaryColor3ivEXT(__ogl_framework_api, dlsym(handle, "glSecondaryColor3ivEXT"));
- SET_SecondaryColor3sEXT(__ogl_framework_api, dlsym(handle, "glSecondaryColor3sEXT"));
- SET_SecondaryColor3svEXT(__ogl_framework_api, dlsym(handle, "glSecondaryColor3svEXT"));
- SET_SecondaryColor3ubEXT(__ogl_framework_api, dlsym(handle, "glSecondaryColor3ubEXT"));
- SET_SecondaryColor3ubvEXT(__ogl_framework_api, dlsym(handle, "glSecondaryColor3ubvEXT"));
- SET_SecondaryColor3uiEXT(__ogl_framework_api, dlsym(handle, "glSecondaryColor3uiEXT"));
- SET_SecondaryColor3uivEXT(__ogl_framework_api, dlsym(handle, "glSecondaryColor3uivEXT"));
- SET_SecondaryColor3usEXT(__ogl_framework_api, dlsym(handle, "glSecondaryColor3usEXT"));
- SET_SecondaryColor3usvEXT(__ogl_framework_api, dlsym(handle, "glSecondaryColor3usvEXT"));
- SET_SecondaryColorPointerEXT(__ogl_framework_api, dlsym(handle, "glSecondaryColorPointerEXT"));
-
- /* GL_EXT_stencil_two_side */
- SET_ActiveStencilFaceEXT(__ogl_framework_api, dlsym(handle, "glActiveStencilFaceEXT"));
-
- /* GL_EXT_timer_query */
- SET_GetQueryObjecti64vEXT(__ogl_framework_api, dlsym(handle, "glGetQueryObjecti64vEXT"));
- SET_GetQueryObjectui64vEXT(__ogl_framework_api, dlsym(handle, "glGetQueryObjectui64vEXT"));
-
- /* GL_EXT_vertex_array */
- SET_ColorPointerEXT(__ogl_framework_api, dlsym(handle, "glColorPointerEXT"));
- SET_EdgeFlagPointerEXT(__ogl_framework_api, dlsym(handle, "glEdgeFlagPointerEXT"));
- SET_IndexPointerEXT(__ogl_framework_api, dlsym(handle, "glIndexPointerEXT"));
- SET_NormalPointerEXT(__ogl_framework_api, dlsym(handle, "glNormalPointerEXT"));
- SET_TexCoordPointerEXT(__ogl_framework_api, dlsym(handle, "glTexCoordPointerEXT"));
- SET_VertexPointerEXT(__ogl_framework_api, dlsym(handle, "glVertexPointerEXT"));
-
- /* GL_IBM_multimode_draw_arrays */
- SET_MultiModeDrawArraysIBM(__ogl_framework_api, dlsym(handle, "glMultiModeDrawArraysIBM"));
- SET_MultiModeDrawElementsIBM(__ogl_framework_api, dlsym(handle, "glMultiModeDrawElementsIBM"));
-
- /* GL_MESA_resize_buffers */
- SET_ResizeBuffersMESA(__ogl_framework_api, dlsym(handle, "glResizeBuffersMESA"));
-
- /* GL_MESA_window_pos */
- SET_WindowPos4dMESA(__ogl_framework_api, dlsym(handle, "glWindowPos4dMESA"));
- SET_WindowPos4dvMESA(__ogl_framework_api, dlsym(handle, "glWindowPos4dvMESA"));
- SET_WindowPos4fMESA(__ogl_framework_api, dlsym(handle, "glWindowPos4fMESA"));
- SET_WindowPos4fvMESA(__ogl_framework_api, dlsym(handle, "glWindowPos4fvMESA"));
- SET_WindowPos4iMESA(__ogl_framework_api, dlsym(handle, "glWindowPos4iMESA"));
- SET_WindowPos4ivMESA(__ogl_framework_api, dlsym(handle, "glWindowPos4ivMESA"));
- SET_WindowPos4sMESA(__ogl_framework_api, dlsym(handle, "glWindowPos4sMESA"));
- SET_WindowPos4svMESA(__ogl_framework_api, dlsym(handle, "glWindowPos4svMESA"));
-
- /* GL_NV_fence */
- SET_DeleteFencesNV(__ogl_framework_api, dlsym(handle, "glDeleteFencesNV"));
- SET_FinishFenceNV(__ogl_framework_api, dlsym(handle, "glFinishFenceNV"));
- SET_GenFencesNV(__ogl_framework_api, dlsym(handle, "glGenFencesNV"));
- SET_GetFenceivNV(__ogl_framework_api, dlsym(handle, "glGetFenceivNV"));
- SET_IsFenceNV(__ogl_framework_api, dlsym(handle, "glIsFenceNV"));
- SET_SetFenceNV(__ogl_framework_api, dlsym(handle, "glSetFenceNV"));
- SET_TestFenceNV(__ogl_framework_api, dlsym(handle, "glTestFenceNV"));
-
- /* GL_NV_fragment_program */
- SET_GetProgramNamedParameterdvNV(__ogl_framework_api, dlsym(handle, "glGetProgramNamedParameterdvNV"));
- SET_GetProgramNamedParameterfvNV(__ogl_framework_api, dlsym(handle, "glGetProgramNamedParameterfvNV"));
- SET_ProgramNamedParameter4dNV(__ogl_framework_api, dlsym(handle, "glProgramNamedParameter4dNV"));
- SET_ProgramNamedParameter4dvNV(__ogl_framework_api, dlsym(handle, "glProgramNamedParameter4dvNV"));
- SET_ProgramNamedParameter4fNV(__ogl_framework_api, dlsym(handle, "glProgramNamedParameter4fNV"));
- SET_ProgramNamedParameter4fvNV(__ogl_framework_api, dlsym(handle, "glProgramNamedParameter4fvNV"));
-
- /* GL_NV_geometry_program4 */
- SET_FramebufferTextureLayerEXT(__ogl_framework_api, dlsym(handle, "glFramebufferTextureLayerEXT"));
-
- /* GL_NV_point_sprite */
- SET_PointParameteriNV(__ogl_framework_api, dlsym(handle, "glPointParameteriNV"));
- SET_PointParameterivNV(__ogl_framework_api, dlsym(handle, "glPointParameterivNV"));
-
- /* GL_NV_register_combiners */
- SET_CombinerInputNV(__ogl_framework_api, dlsym(handle, "glCombinerInputNV"));
- SET_CombinerOutputNV(__ogl_framework_api, dlsym(handle, "glCombinerOutputNV"));
- SET_CombinerParameterfNV(__ogl_framework_api, dlsym(handle, "glCombinerParameterfNV"));
- SET_CombinerParameterfvNV(__ogl_framework_api, dlsym(handle, "glCombinerParameterfvNV"));
- SET_CombinerParameteriNV(__ogl_framework_api, dlsym(handle, "glCombinerParameteriNV"));
- SET_CombinerParameterivNV(__ogl_framework_api, dlsym(handle, "glCombinerParameterivNV"));
- SET_FinalCombinerInputNV(__ogl_framework_api, dlsym(handle, "glFinalCombinerInputNV"));
- SET_GetCombinerInputParameterfvNV(__ogl_framework_api, dlsym(handle, "glGetCombinerInputParameterfvNV"));
- SET_GetCombinerInputParameterivNV(__ogl_framework_api, dlsym(handle, "glGetCombinerInputParameterivNV"));
- SET_GetCombinerOutputParameterfvNV(__ogl_framework_api, dlsym(handle, "glGetCombinerOutputParameterfvNV"));
- SET_GetCombinerOutputParameterivNV(__ogl_framework_api, dlsym(handle, "glGetCombinerOutputParameterivNV"));
- SET_GetFinalCombinerInputParameterfvNV(__ogl_framework_api, dlsym(handle, "glGetFinalCombinerInputParameterfvNV"));
- SET_GetFinalCombinerInputParameterivNV(__ogl_framework_api, dlsym(handle, "glGetFinalCombinerInputParameterivNV"));
-
- /* GL_NV_vertex_array_range */
- SET_FlushVertexArrayRangeNV(__ogl_framework_api, dlsym(handle, "glFlushVertexArrayRangeNV"));
- SET_VertexArrayRangeNV(__ogl_framework_api, dlsym(handle, "glVertexArrayRangeNV"));
-
- /* GL_NV_vertex_program */
- SET_AreProgramsResidentNV(__ogl_framework_api, dlsym(handle, "glAreProgramsResidentNV"));
- SET_BindProgramNV(__ogl_framework_api, dlsym(handle, "glBindProgramNV"));
- SET_DeleteProgramsNV(__ogl_framework_api, dlsym(handle, "glDeleteProgramsNV"));
- SET_ExecuteProgramNV(__ogl_framework_api, dlsym(handle, "glExecuteProgramNV"));
- SET_GenProgramsNV(__ogl_framework_api, dlsym(handle, "glGenProgramsNV"));
- SET_GetProgramParameterdvNV(__ogl_framework_api, dlsym(handle, "glGetProgramParameterdvNV"));
- SET_GetProgramParameterfvNV(__ogl_framework_api, dlsym(handle, "glGetProgramParameterfvNV"));
- SET_GetProgramStringNV(__ogl_framework_api, dlsym(handle, "glGetProgramStringNV"));
- SET_GetProgramivNV(__ogl_framework_api, dlsym(handle, "glGetProgramivNV"));
- SET_GetTrackMatrixivNV(__ogl_framework_api, dlsym(handle, "glGetTrackMatrixivNV"));
- SET_GetVertexAttribPointervNV(__ogl_framework_api, dlsym(handle, "glGetVertexAttribPointervNV"));
- SET_GetVertexAttribdvNV(__ogl_framework_api, dlsym(handle, "glGetVertexAttribdvNV"));
- SET_GetVertexAttribfvNV(__ogl_framework_api, dlsym(handle, "glGetVertexAttribfvNV"));
- SET_GetVertexAttribivNV(__ogl_framework_api, dlsym(handle, "glGetVertexAttribivNV"));
- SET_IsProgramNV(__ogl_framework_api, dlsym(handle, "glIsProgramNV"));
- SET_LoadProgramNV(__ogl_framework_api, dlsym(handle, "glLoadProgramNV"));
- SET_ProgramParameters4dvNV(__ogl_framework_api, dlsym(handle, "glProgramParameters4dvNV"));
- SET_ProgramParameters4fvNV(__ogl_framework_api, dlsym(handle, "glProgramParameters4fvNV"));
- SET_RequestResidentProgramsNV(__ogl_framework_api, dlsym(handle, "glRequestResidentProgramsNV"));
- SET_TrackMatrixNV(__ogl_framework_api, dlsym(handle, "glTrackMatrixNV"));
- SET_VertexAttrib1dNV(__ogl_framework_api, dlsym(handle, "glVertexAttrib1dNV"));
- SET_VertexAttrib1dvNV(__ogl_framework_api, dlsym(handle, "glVertexAttrib1dvNV"));
- SET_VertexAttrib1fNV(__ogl_framework_api, dlsym(handle, "glVertexAttrib1fNV"));
- SET_VertexAttrib1fvNV(__ogl_framework_api, dlsym(handle, "glVertexAttrib1fvNV"));
- SET_VertexAttrib1sNV(__ogl_framework_api, dlsym(handle, "glVertexAttrib1sNV"));
- SET_VertexAttrib1svNV(__ogl_framework_api, dlsym(handle, "glVertexAttrib1svNV"));
- SET_VertexAttrib2dNV(__ogl_framework_api, dlsym(handle, "glVertexAttrib2dNV"));
- SET_VertexAttrib2dvNV(__ogl_framework_api, dlsym(handle, "glVertexAttrib2dvNV"));
- SET_VertexAttrib2fNV(__ogl_framework_api, dlsym(handle, "glVertexAttrib2fNV"));
- SET_VertexAttrib2fvNV(__ogl_framework_api, dlsym(handle, "glVertexAttrib2fvNV"));
- SET_VertexAttrib2sNV(__ogl_framework_api, dlsym(handle, "glVertexAttrib2sNV"));
- SET_VertexAttrib2svNV(__ogl_framework_api, dlsym(handle, "glVertexAttrib2svNV"));
- SET_VertexAttrib3dNV(__ogl_framework_api, dlsym(handle, "glVertexAttrib3dNV"));
- SET_VertexAttrib3dvNV(__ogl_framework_api, dlsym(handle, "glVertexAttrib3dvNV"));
- SET_VertexAttrib3fNV(__ogl_framework_api, dlsym(handle, "glVertexAttrib3fNV"));
- SET_VertexAttrib3fvNV(__ogl_framework_api, dlsym(handle, "glVertexAttrib3fvNV"));
- SET_VertexAttrib3sNV(__ogl_framework_api, dlsym(handle, "glVertexAttrib3sNV"));
- SET_VertexAttrib3svNV(__ogl_framework_api, dlsym(handle, "glVertexAttrib3svNV"));
- SET_VertexAttrib4dNV(__ogl_framework_api, dlsym(handle, "glVertexAttrib4dNV"));
- SET_VertexAttrib4dvNV(__ogl_framework_api, dlsym(handle, "glVertexAttrib4dvNV"));
- SET_VertexAttrib4fNV(__ogl_framework_api, dlsym(handle, "glVertexAttrib4fNV"));
- SET_VertexAttrib4fvNV(__ogl_framework_api, dlsym(handle, "glVertexAttrib4fvNV"));
- SET_VertexAttrib4sNV(__ogl_framework_api, dlsym(handle, "glVertexAttrib4sNV"));
- SET_VertexAttrib4svNV(__ogl_framework_api, dlsym(handle, "glVertexAttrib4svNV"));
- SET_VertexAttrib4ubNV(__ogl_framework_api, dlsym(handle, "glVertexAttrib4ubNV"));
- SET_VertexAttrib4ubvNV(__ogl_framework_api, dlsym(handle, "glVertexAttrib4ubvNV"));
- SET_VertexAttribPointerNV(__ogl_framework_api, dlsym(handle, "glVertexAttribPointerNV"));
- SET_VertexAttribs1dvNV(__ogl_framework_api, dlsym(handle, "glVertexAttribs1dvNV"));
- SET_VertexAttribs1fvNV(__ogl_framework_api, dlsym(handle, "glVertexAttribs1fvNV"));
- SET_VertexAttribs1svNV(__ogl_framework_api, dlsym(handle, "glVertexAttribs1svNV"));
- SET_VertexAttribs2dvNV(__ogl_framework_api, dlsym(handle, "glVertexAttribs2dvNV"));
- SET_VertexAttribs2fvNV(__ogl_framework_api, dlsym(handle, "glVertexAttribs2fvNV"));
- SET_VertexAttribs2svNV(__ogl_framework_api, dlsym(handle, "glVertexAttribs2svNV"));
- SET_VertexAttribs3dvNV(__ogl_framework_api, dlsym(handle, "glVertexAttribs3dvNV"));
- SET_VertexAttribs3fvNV(__ogl_framework_api, dlsym(handle, "glVertexAttribs3fvNV"));
- SET_VertexAttribs3svNV(__ogl_framework_api, dlsym(handle, "glVertexAttribs3svNV"));
- SET_VertexAttribs4dvNV(__ogl_framework_api, dlsym(handle, "glVertexAttribs4dvNV"));
- SET_VertexAttribs4fvNV(__ogl_framework_api, dlsym(handle, "glVertexAttribs4fvNV"));
- SET_VertexAttribs4svNV(__ogl_framework_api, dlsym(handle, "glVertexAttribs4svNV"));
- SET_VertexAttribs4ubvNV(__ogl_framework_api, dlsym(handle, "glVertexAttribs4ubvNV"));
-
- /* GL_SGIS_multisample */
- SET_SampleMaskSGIS(__ogl_framework_api, dlsym(handle, "glSampleMaskSGIS"));
- SET_SamplePatternSGIS(__ogl_framework_api, dlsym(handle, "glSamplePatternSGIS"));
-
- /* GL_SGIS_pixel_texture */
- SET_GetPixelTexGenParameterfvSGIS(__ogl_framework_api, dlsym(handle, "glGetPixelTexGenParameterfvSGIS"));
- SET_GetPixelTexGenParameterivSGIS(__ogl_framework_api, dlsym(handle, "glGetPixelTexGenParameterivSGIS"));
- SET_PixelTexGenParameterfSGIS(__ogl_framework_api, dlsym(handle, "glPixelTexGenParameterfSGIS"));
- SET_PixelTexGenParameterfvSGIS(__ogl_framework_api, dlsym(handle, "glPixelTexGenParameterfvSGIS"));
- SET_PixelTexGenParameteriSGIS(__ogl_framework_api, dlsym(handle, "glPixelTexGenParameteriSGIS"));
- SET_PixelTexGenParameterivSGIS(__ogl_framework_api, dlsym(handle, "glPixelTexGenParameterivSGIS"));
- SET_PixelTexGenSGIX(__ogl_framework_api, dlsym(handle, "glPixelTexGenSGIX"));
-
- /* GL_EXT_separate_shader_objects */
- SET_ActiveProgramEXT(__ogl_framework_api, dlsym(handle, "glActiveProgramEXT"));
- SET_CreateShaderProgramEXT(__ogl_framework_api, dlsym(handle, "glCreateShaderProgramEXT"));
- SET_UseShaderProgramEXT(__ogl_framework_api, dlsym(handle, "glUseShaderProgramEXT"));
-
- /* GL_NV_conditional_render */
- SET_BeginConditionalRenderNV(__ogl_framework_api, dlsym(handle, "glBeginConditionalRenderNV"));
- SET_EndConditionalRenderNV(__ogl_framework_api, dlsym(handle, "glEndConditionalRenderNV"));
-
- /* GL_EXT_transform_feedback */
- SET_BeginTransformFeedbackEXT(__ogl_framework_api, dlsym(handle, "glBeginTransformFeedbackEXT"));
- SET_EndTransformFeedbackEXT(__ogl_framework_api, dlsym(handle, "glEndTransformFeedbackEXT"));
- SET_BindBufferBaseEXT(__ogl_framework_api, dlsym(handle, "glBindBufferBaseEXT"));
- SET_BindBufferOffsetEXT(__ogl_framework_api, dlsym(handle, "glBindBufferOffsetEXT"));
- SET_BindBufferRangeEXT(__ogl_framework_api, dlsym(handle, "glBindBufferRangeEXT"));
- SET_TransformFeedbackVaryingsEXT(__ogl_framework_api, dlsym(handle, "glTransformFeedbackVaryingsEXT"));
- SET_GetTransformFeedbackVaryingEXT(__ogl_framework_api, dlsym(handle, "glGetTransformFeedbackVaryingEXT"));
-
- /* GL_EXT_gpu_shader4 */
- SET_BindFragDataLocationEXT(__ogl_framework_api, dlsym(handle, "glBindFragDataLocationEXT"));
- SET_GetFragDataLocationEXT(__ogl_framework_api, dlsym(handle, "glGetFragDataLocationEXT"));
- SET_GetUniformuivEXT(__ogl_framework_api, dlsym(handle, "glGetUniformuivEXT"));
- SET_Uniform1uiEXT(__ogl_framework_api, dlsym(handle, "glUniform1uiEXT"));
- SET_Uniform1uivEXT(__ogl_framework_api, dlsym(handle, "glUniform1uivEXT"));
- SET_Uniform2uiEXT(__ogl_framework_api, dlsym(handle, "glUniform2uiEXT"));
- SET_Uniform2uivEXT(__ogl_framework_api, dlsym(handle, "glUniform2uivEXT"));
- SET_Uniform3uiEXT(__ogl_framework_api, dlsym(handle, "glUniform3uiEXT"));
- SET_Uniform3uivEXT(__ogl_framework_api, dlsym(handle, "glUniform3uivEXT"));
- SET_Uniform4uiEXT(__ogl_framework_api, dlsym(handle, "glUniform4uiEXT"));
- SET_Uniform4uivEXT(__ogl_framework_api, dlsym(handle, "glUniform4uivEXT"));
-
- /* GL_ARB_sampler_objects */
- SET_BindSampler(__ogl_framework_api, dlsym(handle, "glBindSampler"));
- SET_DeleteSamplers(__ogl_framework_api, dlsym(handle, "glDeleteSamplers"));
- SET_GenSamplers(__ogl_framework_api, dlsym(handle, "glGenSamplers"));
- SET_GetSamplerParameterIiv(__ogl_framework_api, dlsym(handle, "glGetSamplerParameterIiv"));
- SET_GetSamplerParameterIuiv(__ogl_framework_api, dlsym(handle, "glGetSamplerParameterIuiv"));
- SET_GetSamplerParameterfv(__ogl_framework_api, dlsym(handle, "glGetSamplerParameterfv"));
- SET_GetSamplerParameteriv(__ogl_framework_api, dlsym(handle, "glGetSamplerParameteriv"));
- SET_IsSampler(__ogl_framework_api, dlsym(handle, "glIsSampler"));
- SET_SamplerParameterIiv(__ogl_framework_api, dlsym(handle, "glSamplerParameterIiv"));
- SET_SamplerParameterIuiv(__ogl_framework_api, dlsym(handle, "glSamplerParameterIuiv"));
- SET_SamplerParameterf(__ogl_framework_api, dlsym(handle, "glSamplerParameterf"));
- SET_SamplerParameterfv(__ogl_framework_api, dlsym(handle, "glSamplerParameterfv"));
- SET_SamplerParameteri(__ogl_framework_api, dlsym(handle, "glSamplerParameteri"));
- SET_SamplerParameteriv(__ogl_framework_api, dlsym(handle, "glSamplerParameteriv"));
-
- /* GL_ARB_transform_feedback2 */
- SET_BindTransformFeedback(__ogl_framework_api, dlsym(handle, "glBindTransformFeedback"));
- SET_DeleteTransformFeedbacks(__ogl_framework_api, dlsym(handle, "glDeleteTransformFeedbacks"));
- SET_DrawTransformFeedback(__ogl_framework_api, dlsym(handle, "glDrawTransformFeedback"));
- SET_GenTransformFeedbacks(__ogl_framework_api, dlsym(handle, "glGenTransformFeedbacks"));
- SET_IsTransformFeedback(__ogl_framework_api, dlsym(handle, "glIsTransformFeedback"));
- SET_PauseTransformFeedback(__ogl_framework_api, dlsym(handle, "glPauseTransformFeedback"));
- SET_ResumeTransformFeedback(__ogl_framework_api, dlsym(handle, "glResumeTransformFeedback"));
-
- /* GL_ARB_vertex_array_object */
- SET_BindVertexArray(__ogl_framework_api, dlsym(handle, "glBindVertexArray"));
- SET_GenVertexArrays(__ogl_framework_api, dlsym(handle, "glGenVertexArrays"));
-
- /* GL_ARB_draw_buffers_blend */
- SET_BlendEquationSeparateiARB(__ogl_framework_api, dlsym(handle, "glBlendEquationSeparateiARB"));
- SET_BlendEquationiARB(__ogl_framework_api, dlsym(handle, "glBlendEquationiARB"));
- SET_BlendFuncSeparateiARB(__ogl_framework_api, dlsym(handle, "glBlendFuncSeparateiARB"));
- SET_BlendFunciARB(__ogl_framework_api, dlsym(handle, "glBlendFunciARB"));
-
- /* GL_APPLE_flush_buffer_range */
- SET_BufferParameteriAPPLE(__ogl_framework_api, dlsym(handle, "glBufferParameteriAPPLE"));
- SET_FlushMappedBufferRangeAPPLE(__ogl_framework_api, dlsym(handle, "glFlushMappedBufferRangeAPPLE"));
-
- /* GL_ARB_color_buffer_float */
- SET_ClampColorARB(__ogl_framework_api, dlsym(handle, "glClampColorARB"));
-
- /* GL_EXT_texture_integer */
- SET_ClearColorIiEXT(__ogl_framework_api, dlsym(handle, "glClearColorIiEXT"));
- SET_ClearColorIuiEXT(__ogl_framework_api, dlsym(handle, "glClearColorIuiEXT"));
- SET_TexParameterIivEXT(__ogl_framework_api, dlsym(handle, "glTexParameterIivEXT"));
- SET_TexParameterIuivEXT(__ogl_framework_api, dlsym(handle, "glTexParameterIuivEXT"));
- SET_GetTexParameterIivEXT(__ogl_framework_api, dlsym(handle, "glGetTexParameterIivEXT"));
- SET_GetTexParameterIuivEXT(__ogl_framework_api, dlsym(handle, "glGetTexParameterIuivEXT"));
-
- /* GL_ARB_ES2_compatibility */
- SET_ClearDepthf(__ogl_framework_api, dlsym(handle, "glClearDepthf"));
- SET_DepthRangef(__ogl_framework_api, dlsym(handle, "glDepthRangef"));
- SET_GetShaderPrecisionFormat(__ogl_framework_api, dlsym(handle, "glGetShaderPrecisionFormat"));
- SET_ReleaseShaderCompiler(__ogl_framework_api, dlsym(handle, "glReleaseShaderCompiler"));
- SET_ShaderBinary(__ogl_framework_api, dlsym(handle, "glShaderBinary"));
-
- /* GL_EXT_draw_buffers2 */
- SET_ColorMaskIndexedEXT(__ogl_framework_api, dlsym(handle, "glColorMaskIndexedEXT"));
- SET_DisableIndexedEXT(__ogl_framework_api, dlsym(handle, "glDisableIndexedEXT"));
- SET_EnableIndexedEXT(__ogl_framework_api, dlsym(handle, "glEnableIndexedEXT"));
- SET_GetBooleanIndexedvEXT(__ogl_framework_api, dlsym(handle, "glGetBooleanIndexedvEXT"));
- SET_GetIntegerIndexedvEXT(__ogl_framework_api, dlsym(handle, "glGetIntegerIndexedvEXT"));
- SET_IsEnabledIndexedEXT(__ogl_framework_api, dlsym(handle, "glIsEnabledIndexedEXT"));
-
- /* GL_ARB_draw_instanced */
- SET_DrawArraysInstancedARB(__ogl_framework_api, dlsym(handle, "glDrawArraysInstancedARB"));
- SET_DrawElementsInstancedARB(__ogl_framework_api, dlsym(handle, "glDrawElementsInstancedARB"));
-
- /* GL_ARB_geometry_shader4 */
- SET_FramebufferTextureARB(__ogl_framework_api, dlsym(handle, "glFramebufferTextureARB"));
- SET_FramebufferTextureFaceARB(__ogl_framework_api, dlsym(handle, "glFramebufferTextureFaceARB"));
- SET_ProgramParameteriARB(__ogl_framework_api, dlsym(handle, "glProgramParameteriARB"));
-
- /* GL_ARB_sync */
- SET_ClientWaitSync(__ogl_framework_api, dlsym(handle, "glClientWaitSync"));
- SET_DeleteSync(__ogl_framework_api, dlsym(handle, "glDeleteSync"));
- SET_FenceSync(__ogl_framework_api, dlsym(handle, "glFenceSync"));
- SET_GetInteger64v(__ogl_framework_api, dlsym(handle, "glGetInteger64v"));
- SET_GetSynciv(__ogl_framework_api, dlsym(handle, "glGetSynciv"));
- SET_IsSync(__ogl_framework_api, dlsym(handle, "glIsSync"));
- SET_WaitSync(__ogl_framework_api, dlsym(handle, "glWaitSync"));
-
- /* GL_ARB_copy_buffer */
- SET_CopyBufferSubData(__ogl_framework_api, dlsym(handle, "glCopyBufferSubData"));
-
- /* GL_ARB_draw_elements_base_vertex */
- SET_DrawElementsBaseVertex(__ogl_framework_api, dlsym(handle, "glDrawElementsBaseVertex"));
- SET_DrawElementsInstancedBaseVertex(__ogl_framework_api, dlsym(handle, "glDrawElementsInstancedBaseVertex"));
- SET_DrawRangeElementsBaseVertex(__ogl_framework_api, dlsym(handle, "glDrawRangeElementsBaseVertex"));
- SET_MultiDrawElementsBaseVertex(__ogl_framework_api, dlsym(handle, "glMultiDrawElementsBaseVertex"));
-
- /* GL_ARB_map_buffer_range */
- SET_FlushMappedBufferRange(__ogl_framework_api, dlsym(handle, "glFlushMappedBufferRange"));
- SET_MapBufferRange(__ogl_framework_api, dlsym(handle, "glMapBufferRange"));
-
- /* GL_ARB_robustness */
- SET_GetGraphicsResetStatusARB(__ogl_framework_api, dlsym(handle, "glGetGraphicsResetStatusARB"));
- SET_GetnColorTableARB(__ogl_framework_api, dlsym(handle, "glGetnColorTableARB"));
- SET_GetnCompressedTexImageARB(__ogl_framework_api, dlsym(handle, "glGetnCompressedTexImageARB"));
- SET_GetnConvolutionFilterARB(__ogl_framework_api, dlsym(handle, "glGetnConvolutionFilterARB"));
- SET_GetnHistogramARB(__ogl_framework_api, dlsym(handle, "glGetnHistogramARB"));
- SET_GetnMapdvARB(__ogl_framework_api, dlsym(handle, "glGetnMapdvARB"));
- SET_GetnMapfvARB(__ogl_framework_api, dlsym(handle, "glGetnMapfvARB"));
- SET_GetnMapivARB(__ogl_framework_api, dlsym(handle, "glGetnMapivARB"));
- SET_GetnMinmaxARB(__ogl_framework_api, dlsym(handle, "glGetnMinmaxARB"));
- SET_GetnPixelMapfvARB(__ogl_framework_api, dlsym(handle, "glGetnPixelMapfvARB"));
- SET_GetnPixelMapuivARB(__ogl_framework_api, dlsym(handle, "glGetnPixelMapuivARB"));
- SET_GetnPixelMapusvARB(__ogl_framework_api, dlsym(handle, "glGetnPixelMapusvARB"));
- SET_GetnPolygonStippleARB(__ogl_framework_api, dlsym(handle, "glGetnPolygonStippleARB"));
- SET_GetnSeparableFilterARB(__ogl_framework_api, dlsym(handle, "glGetnSeparableFilterARB"));
- SET_GetnTexImageARB(__ogl_framework_api, dlsym(handle, "glGetnTexImageARB"));
- SET_GetnUniformdvARB(__ogl_framework_api, dlsym(handle, "glGetnUniformdvARB"));
- SET_GetnUniformfvARB(__ogl_framework_api, dlsym(handle, "glGetnUniformfvARB"));
- SET_GetnUniformivARB(__ogl_framework_api, dlsym(handle, "glGetnUniformivARB"));
- SET_GetnUniformuivARB(__ogl_framework_api, dlsym(handle, "glGetnUniformuivARB"));
- SET_ReadnPixelsARB(__ogl_framework_api, dlsym(handle, "glReadnPixelsARB"));
-
- /* GL_APPLE_object_purgeable */
- SET_GetObjectParameterivAPPLE(__ogl_framework_api, dlsym(handle, "glGetObjectParameterivAPPLE"));
- SET_ObjectPurgeableAPPLE(__ogl_framework_api, dlsym(handle, "glObjectPurgeableAPPLE"));
- SET_ObjectUnpurgeableAPPLE(__ogl_framework_api, dlsym(handle, "glObjectUnpurgeableAPPLE"));
-
- /* GL_ATI_envmap_bumpmap */
- SET_GetTexBumpParameterfvATI(__ogl_framework_api, dlsym(handle, "glGetTexBumpParameterfvATI"));
- SET_GetTexBumpParameterivATI(__ogl_framework_api, dlsym(handle, "glGetTexBumpParameterivATI"));
- SET_TexBumpParameterfvATI(__ogl_framework_api, dlsym(handle, "glTexBumpParameterfvATI"));
- SET_TexBumpParameterivATI(__ogl_framework_api, dlsym(handle, "glTexBumpParameterivATI"));
-
- /* GL_APPLE_texture_range */
- SET_GetTexParameterPointervAPPLE(__ogl_framework_api, dlsym(handle, "glGetTexParameterPointervAPPLE"));
- SET_TextureRangeAPPLE(__ogl_framework_api, dlsym(handle, "glTextureRangeAPPLE"));
-
- /* GL_NV_vertex_program4 */
- SET_GetVertexAttribIivEXT(__ogl_framework_api, dlsym(handle, "glGetVertexAttribIivEXT"));
- SET_GetVertexAttribIuivEXT(__ogl_framework_api, dlsym(handle, "glGetVertexAttribIuivEXT"));
- SET_VertexAttribDivisor(__ogl_framework_api, dlsym(handle, "glVertexAttribDivisor"));
- SET_VertexAttribDivisorARB(__ogl_framework_api, dlsym(handle, "glVertexAttribDivisorARB"));
- SET_VertexAttribI1iEXT(__ogl_framework_api, dlsym(handle, "glVertexAttribI1iEXT"));
- SET_VertexAttribI1ivEXT(__ogl_framework_api, dlsym(handle, "glVertexAttribI1ivEXT"));
- SET_VertexAttribI1uiEXT(__ogl_framework_api, dlsym(handle, "glVertexAttribI1uiEXT"));
- SET_VertexAttribI1uivEXT(__ogl_framework_api, dlsym(handle, "glVertexAttribI1uivEXT"));
- SET_VertexAttribI2iEXT(__ogl_framework_api, dlsym(handle, "glVertexAttribI2iEXT"));
- SET_VertexAttribI2ivEXT(__ogl_framework_api, dlsym(handle, "glVertexAttribI2ivEXT"));
- SET_VertexAttribI2uiEXT(__ogl_framework_api, dlsym(handle, "glVertexAttribI2uiEXT"));
- SET_VertexAttribI2uivEXT(__ogl_framework_api, dlsym(handle, "glVertexAttribI2uivEXT"));
- SET_VertexAttribI3iEXT(__ogl_framework_api, dlsym(handle, "glVertexAttribI3iEXT"));
- SET_VertexAttribI3ivEXT(__ogl_framework_api, dlsym(handle, "glVertexAttribI3ivEXT"));
- SET_VertexAttribI3uiEXT(__ogl_framework_api, dlsym(handle, "glVertexAttribI3uiEXT"));
- SET_VertexAttribI3uivEXT(__ogl_framework_api, dlsym(handle, "glVertexAttribI3uivEXT"));
- SET_VertexAttribI4bvEXT(__ogl_framework_api, dlsym(handle, "glVertexAttribI4bvEXT"));
- SET_VertexAttribI4iEXT(__ogl_framework_api, dlsym(handle, "glVertexAttribI4iEXT"));
- SET_VertexAttribI4ivEXT(__ogl_framework_api, dlsym(handle, "glVertexAttribI4ivEXT"));
- SET_VertexAttribI4svEXT(__ogl_framework_api, dlsym(handle, "glVertexAttribI4svEXT"));
- SET_VertexAttribI4ubvEXT(__ogl_framework_api, dlsym(handle, "glVertexAttribI4ubvEXT"));
- SET_VertexAttribI4uiEXT(__ogl_framework_api, dlsym(handle, "glVertexAttribI4uiEXT"));
- SET_VertexAttribI4uivEXT(__ogl_framework_api, dlsym(handle, "glVertexAttribI4uivEXT"));
- SET_VertexAttribI4usvEXT(__ogl_framework_api, dlsym(handle, "glVertexAttribI4usvEXT"));
- SET_VertexAttribIPointerEXT(__ogl_framework_api, dlsym(handle, "glVertexAttribIPointerEXT"));
-
- /* GL_NV_primitive_restart */
- SET_PrimitiveRestartIndexNV(__ogl_framework_api, dlsym(handle, "glPrimitiveRestartIndexNV"));
- SET_PrimitiveRestartNV(__ogl_framework_api, dlsym(handle, "glPrimitiveRestartNV"));
-
- /* GL_EXT_provoking_vertex */
- SET_ProvokingVertexEXT(__ogl_framework_api, dlsym(handle, "glProvokingVertexEXT"));
-
- /* GL_ARB_texture_buffer_object */
- SET_TexBufferARB(__ogl_framework_api, dlsym(handle, "glTexBufferARB"));
-
- /* GL_NV_texture_barrier */
- SET_TextureBarrierNV(__ogl_framework_api, dlsym(handle, "glTextureBarrierNV"));
-
- /* GL_ARB_framebuffer_object */
- SET_RenderbufferStorageMultisample(__ogl_framework_api, dlsym(handle, "glRenderbufferStorageMultisample"));
-
- /* GL_OES_EGL_image */
- SET_EGLImageTargetRenderbufferStorageOES(__ogl_framework_api, dlsym(handle, "glEGLImageTargetRenderbufferStorageOES"));
- SET_EGLImageTargetTexture2DOES(__ogl_framework_api, dlsym(handle, "glEGLImageTargetTexture2DOES"));
-
__applegl_api = malloc(sizeof(struct _glapi_table));
assert(__applegl_api);
memcpy(__applegl_api, __ogl_framework_api, sizeof(struct _glapi_table));
diff --git a/src/glx/apple/apple_glx.c b/src/glx/apple/apple_glx.c
index a76cb4cac1f..d94c1e0fb16 100644
--- a/src/glx/apple/apple_glx.c
+++ b/src/glx/apple/apple_glx.c
@@ -131,7 +131,6 @@ apple_init_glx(Display * dpy)
}
apple_cgl_init();
- apple_xgl_init_direct();
(void) apple_glx_get_client_id();
XAppleDRISetSurfaceNotifyHandler(surface_notify_handler);
diff --git a/src/glx/apple/apple_glx.h b/src/glx/apple/apple_glx.h
index 25f5ea66ee3..c70fc009dd5 100644
--- a/src/glx/apple/apple_glx.h
+++ b/src/glx/apple/apple_glx.h
@@ -45,6 +45,6 @@ void apple_glx_swap_buffers(void *ptr);
void apple_glx_waitx(Display * dpy, void *ptr);
int apple_get_dri_event_base(void);
-void apple_xgl_init_direct(void);
+void apple_glapi_set_dispatch(void);
#endif
diff --git a/src/glx/apple/apple_visual.c b/src/glx/apple/apple_visual.c
index 29c6f16c4ac..a24616480ab 100644
--- a/src/glx/apple/apple_visual.c
+++ b/src/glx/apple/apple_visual.c
@@ -40,10 +40,19 @@
#include <OpenGL/OpenGL.h>
#include <OpenGL/CGLContext.h>
#include <OpenGL/CGLRenderers.h>
+#include <OpenGL/CGLTypes.h>
#undef glTexImage1D
#undef glTexImage2D
#undef glTexImage3D
+#ifndef kCGLPFAOpenGLProfile
+#define kCGLPFAOpenGLProfile 99
+#endif
+
+#ifndef kCGLOGLPVersion_3_2_Core
+#define kCGLOGLPVersion_3_2_Core 0x3200
+#endif
+
#include "apple_cgl.h"
#include "apple_visual.h"
#include "apple_glx.h"
@@ -54,18 +63,22 @@ enum
MAX_ATTR = 60
};
-/*mode is a __GlcontextModes*/
void
-apple_visual_create_pfobj(CGLPixelFormatObj * pfobj, const void *mode,
+apple_visual_create_pfobj(CGLPixelFormatObj * pfobj, const struct glx_config * mode,
bool * double_buffered, bool * uses_stereo,
bool offscreen)
{
CGLPixelFormatAttribute attr[MAX_ATTR];
- const struct glx_config *c = mode;
int numattr = 0;
GLint vsref = 0;
CGLError error = 0;
+ /* Request an OpenGL 3.2 profile if one is available */
+ if(apple_cgl.version_major > 1 || (apple_cgl.version_major == 1 && apple_cgl.version_minor >= 3)) {
+ attr[numattr++] = kCGLPFAOpenGLProfile;
+ attr[numattr++] = kCGLOGLPVersion_3_2_Core;
+ }
+
if (offscreen) {
apple_glx_diagnostic
("offscreen rendering enabled. Using kCGLPFAOffScreen\n");
@@ -95,7 +108,7 @@ apple_visual_create_pfobj(CGLPixelFormatObj * pfobj, const void *mode,
*/
attr[numattr++] = kCGLPFAClosestPolicy;
- if (c->stereoMode) {
+ if (mode->stereoMode) {
attr[numattr++] = kCGLPFAStereo;
*uses_stereo = true;
}
@@ -103,7 +116,7 @@ apple_visual_create_pfobj(CGLPixelFormatObj * pfobj, const void *mode,
*uses_stereo = false;
}
- if (c->doubleBufferMode) {
+ if (mode->doubleBufferMode) {
attr[numattr++] = kCGLPFADoubleBuffer;
*double_buffered = true;
}
@@ -112,32 +125,32 @@ apple_visual_create_pfobj(CGLPixelFormatObj * pfobj, const void *mode,
}
attr[numattr++] = kCGLPFAColorSize;
- attr[numattr++] = c->redBits + c->greenBits + c->blueBits;
+ attr[numattr++] = mode->redBits + mode->greenBits + mode->blueBits;
attr[numattr++] = kCGLPFAAlphaSize;
- attr[numattr++] = c->alphaBits;
+ attr[numattr++] = mode->alphaBits;
- if ((c->accumRedBits + c->accumGreenBits + c->accumBlueBits) > 0) {
+ if ((mode->accumRedBits + mode->accumGreenBits + mode->accumBlueBits) > 0) {
attr[numattr++] = kCGLPFAAccumSize;
- attr[numattr++] = c->accumRedBits + c->accumGreenBits +
- c->accumBlueBits + c->accumAlphaBits;
+ attr[numattr++] = mode->accumRedBits + mode->accumGreenBits +
+ mode->accumBlueBits + mode->accumAlphaBits;
}
- if (c->depthBits > 0) {
+ if (mode->depthBits > 0) {
attr[numattr++] = kCGLPFADepthSize;
- attr[numattr++] = c->depthBits;
+ attr[numattr++] = mode->depthBits;
}
- if (c->stencilBits > 0) {
+ if (mode->stencilBits > 0) {
attr[numattr++] = kCGLPFAStencilSize;
- attr[numattr++] = c->stencilBits;
+ attr[numattr++] = mode->stencilBits;
}
- if (c->sampleBuffers > 0) {
+ if (mode->sampleBuffers > 0) {
attr[numattr++] = kCGLPFAMultisample;
attr[numattr++] = kCGLPFASampleBuffers;
- attr[numattr++] = c->sampleBuffers;
+ attr[numattr++] = mode->sampleBuffers;
attr[numattr++] = kCGLPFASamples;
- attr[numattr++] = c->samples;
+ attr[numattr++] = mode->samples;
}
attr[numattr++] = 0;
diff --git a/src/glx/apple/apple_visual.h b/src/glx/apple/apple_visual.h
index 2cf9a9e2513..65bbc2e10ab 100644
--- a/src/glx/apple/apple_visual.h
+++ b/src/glx/apple/apple_visual.h
@@ -32,9 +32,9 @@
#include <stdbool.h>
#include <OpenGL/CGLTypes.h>
+#include "glxconfig.h"
-/* mode is expected to be of type struct glx_config. */
-void apple_visual_create_pfobj(CGLPixelFormatObj * pfobj, const void *mode,
+void apple_visual_create_pfobj(CGLPixelFormatObj * pfobj, const struct glx_config * mode,
bool * double_buffered, bool * uses_stereo,
bool offscreen);
diff --git a/src/glx/applegl_glx.c b/src/glx/applegl_glx.c
index 9b8605f4075..8766c88a136 100644
--- a/src/glx/applegl_glx.c
+++ b/src/glx/applegl_glx.c
@@ -34,16 +34,18 @@
#if defined(GLX_USE_APPLEGL)
#include <stdbool.h>
+#include <dlfcn.h>
#include "glxclient.h"
#include "apple_glx_context.h"
#include "apple_glx.h"
+#include "apple_cgl.h"
#include "glx_error.h"
static void
applegl_destroy_context(struct glx_context *gc)
{
- apple_glx_destroy_context(&gc->driContext, gc->currentDpy);
+ apple_glx_destroy_context(&gc->driContext, gc->psc->dpy);
}
static int
@@ -59,6 +61,8 @@ applegl_bind_context(struct glx_context *gc, struct glx_context *old,
if (error)
return 1; /* GLXBadContext is the same as Success (0) */
+ apple_glapi_set_dispatch();
+
return Success;
}
@@ -80,6 +84,12 @@ applegl_wait_x(struct glx_context *gc)
apple_glx_waitx(dpy, gc->driContext);
}
+static void *
+applegl_get_proc_address(const char *symbol)
+{
+ return dlsym(apple_cgl_get_dl_handle(), symbol);
+}
+
static const struct glx_context_vtable applegl_context_vtable = {
applegl_destroy_context,
applegl_bind_context,
@@ -89,6 +99,7 @@ static const struct glx_context_vtable applegl_context_vtable = {
DRI_glXUseXFont,
NULL, /* bind_tex_image, */
NULL, /* release_tex_image, */
+ applegl_get_proc_address,
};
struct glx_context *
@@ -116,7 +127,6 @@ applegl_create_context(struct glx_screen *psc,
gc->vtable = &applegl_context_vtable;
gc->driContext = NULL;
- gc->do_destroy = False;
/* TODO: darwin: Integrate with above to do indirect */
if(apple_glx_create_context(&gc->driContext, dpy, screen, config,
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 506754ccc1f..80e4da30beb 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -143,6 +143,8 @@ dri2_bind_context(struct glx_context *context, struct glx_context *old,
pdraw = (struct dri2_drawable *) driFetchDrawable(context, draw);
pread = (struct dri2_drawable *) driFetchDrawable(context, read);
+ driReleaseDrawables(&pcp->base);
+
if (pdraw == NULL || pread == NULL)
return GLXBadDrawable;
@@ -170,9 +172,6 @@ dri2_unbind_context(struct glx_context *context, struct glx_context *new)
struct dri2_screen *psc = (struct dri2_screen *) pcp->base.psc;
(*psc->core->unbindContext) (pcp->driContext);
-
- if (context == new)
- driReleaseDrawables(&pcp->base);
}
static struct glx_context *
@@ -768,6 +767,7 @@ static const struct glx_context_vtable dri2_context_vtable = {
DRI_glXUseXFont,
dri2_bind_tex_image,
dri2_release_tex_image,
+ NULL, /* get_proc_address */
};
static void
diff --git a/src/glx/dri_common.c b/src/glx/dri_common.c
index 06a73e4a6b2..bac0c9e5911 100644
--- a/src/glx/dri_common.c
+++ b/src/glx/dri_common.c
@@ -369,8 +369,10 @@ driFetchDrawable(struct glx_context *gc, GLXDrawable glxDrawable)
if (priv->drawHash == NULL)
return NULL;
- if (__glxHashLookup(priv->drawHash, glxDrawable, (void *) &pdraw) == 0)
+ if (__glxHashLookup(priv->drawHash, glxDrawable, (void *) &pdraw) == 0) {
+ pdraw->refcount ++;
return pdraw;
+ }
pdraw = psc->driScreen->createDrawable(psc, glxDrawable,
glxDrawable, gc->config);
@@ -378,6 +380,7 @@ driFetchDrawable(struct glx_context *gc, GLXDrawable glxDrawable)
(*pdraw->destroyDrawable) (pdraw);
return NULL;
}
+ pdraw->refcount = 1;
return pdraw;
}
@@ -394,19 +397,28 @@ driReleaseDrawables(struct glx_context *gc)
if (__glxHashLookup(priv->drawHash,
gc->currentDrawable, (void *) &pdraw) == 0) {
if (pdraw->drawable == pdraw->xDrawable) {
- (*pdraw->destroyDrawable)(pdraw);
- __glxHashDelete(priv->drawHash, gc->currentDrawable);
+ pdraw->refcount --;
+ if (pdraw->refcount == 0) {
+ (*pdraw->destroyDrawable)(pdraw);
+ __glxHashDelete(priv->drawHash, gc->currentDrawable);
+ }
}
}
- if (gc->currentDrawable != gc->currentReadable &&
- __glxHashLookup(priv->drawHash,
+ if (__glxHashLookup(priv->drawHash,
gc->currentReadable, (void *) &pdraw) == 0) {
if (pdraw->drawable == pdraw->xDrawable) {
- (*pdraw->destroyDrawable)(pdraw);
- __glxHashDelete(priv->drawHash, gc->currentReadable);
+ pdraw->refcount --;
+ if (pdraw->refcount == 0) {
+ (*pdraw->destroyDrawable)(pdraw);
+ __glxHashDelete(priv->drawHash, gc->currentReadable);
+ }
}
}
+
+ gc->currentDrawable = None;
+ gc->currentReadable = None;
+
}
#endif /* GLX_DIRECT_RENDERING */
diff --git a/src/glx/dri_glx.c b/src/glx/dri_glx.c
index ff027dc9e9c..6f3b2b8900c 100644
--- a/src/glx/dri_glx.c
+++ b/src/glx/dri_glx.c
@@ -503,6 +503,8 @@ dri_destroy_context(struct glx_context * context)
struct dri_context *pcp = (struct dri_context *) context;
struct dri_screen *psc = (struct dri_screen *) context->psc;
+ driReleaseDrawables(&pcp->base);
+
if (context->xid)
glx_send_destroy_context(psc->base.dpy, context->xid);
@@ -526,6 +528,8 @@ dri_bind_context(struct glx_context *context, struct glx_context *old,
pdraw = (struct dri_drawable *) driFetchDrawable(context, draw);
pread = (struct dri_drawable *) driFetchDrawable(context, read);
+ driReleaseDrawables(&pcp->base);
+
if (pdraw == NULL || pread == NULL)
return GLXBadDrawable;
@@ -543,8 +547,6 @@ dri_unbind_context(struct glx_context *context, struct glx_context *new)
struct dri_screen *psc = (struct dri_screen *) pcp->base.psc;
(*psc->core->unbindContext) (pcp->driContext);
-
- driReleaseDrawables(&pcp->base);
}
static const struct glx_context_vtable dri_context_vtable = {
@@ -556,6 +558,7 @@ static const struct glx_context_vtable dri_context_vtable = {
DRI_glXUseXFont,
NULL,
NULL,
+ NULL, /* get_proc_address */
};
static struct glx_context *
diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c
index 2eaa3c59348..d63f6e8d5ff 100644
--- a/src/glx/drisw_glx.c
+++ b/src/glx/drisw_glx.c
@@ -242,6 +242,8 @@ drisw_destroy_context(struct glx_context *context)
struct drisw_context *pcp = (struct drisw_context *) context;
struct drisw_screen *psc = (struct drisw_screen *) context->psc;
+ driReleaseDrawables(&pcp->base);
+
if (context->xid)
glx_send_destroy_context(psc->base.dpy, context->xid);
@@ -264,6 +266,8 @@ drisw_bind_context(struct glx_context *context, struct glx_context *old,
pdraw = (struct drisw_drawable *) driFetchDrawable(context, draw);
pread = (struct drisw_drawable *) driFetchDrawable(context, read);
+ driReleaseDrawables(&pcp->base);
+
if (pdraw == NULL || pread == NULL)
return GLXBadDrawable;
@@ -281,8 +285,6 @@ drisw_unbind_context(struct glx_context *context, struct glx_context *new)
struct drisw_screen *psc = (struct drisw_screen *) pcp->base.psc;
(*psc->core->unbindContext) (pcp->driContext);
-
- driReleaseDrawables(&pcp->base);
}
static const struct glx_context_vtable drisw_context_vtable = {
@@ -294,6 +296,7 @@ static const struct glx_context_vtable drisw_context_vtable = {
DRI_glXUseXFont,
NULL,
NULL,
+ NULL, /* get_proc_address */
};
static struct glx_context *
@@ -359,10 +362,6 @@ driswCreateDrawable(struct glx_screen *base, XID xDrawable,
const __DRIswrastExtension *swrast = psc->swrast;
- /* Old dri can't handle GLX 1.3+ drawable constructors. */
- if (xDrawable != drawable)
- return NULL;
-
pdp = Xmalloc(sizeof(*pdp));
if (!pdp)
return NULL;
diff --git a/src/glx/glx_pbuffer.c b/src/glx/glx_pbuffer.c
index 1f4c0f309fc..0e74e7ccd0e 100644
--- a/src/glx/glx_pbuffer.c
+++ b/src/glx/glx_pbuffer.c
@@ -187,7 +187,7 @@ determineTextureFormat(const int *attribs, int numAttribs)
return 0;
}
-static void
+static GLboolean
CreateDRIDrawable(Display *dpy, struct glx_config *config,
XID drawable, XID glxdrawable,
const int *attrib_list, size_t num_attribs)
@@ -198,22 +198,24 @@ CreateDRIDrawable(Display *dpy, struct glx_config *config,
psc = priv->screens[config->screen];
if (psc->driScreen == NULL)
- return;
+ return GL_TRUE;
pdraw = psc->driScreen->createDrawable(psc, drawable,
glxdrawable, config);
if (pdraw == NULL) {
fprintf(stderr, "failed to create drawable\n");
- return;
+ return GL_FALSE;
}
if (__glxHashInsert(priv->drawHash, glxdrawable, pdraw)) {
(*pdraw->destroyDrawable) (pdraw);
- return; /* FIXME: Check what we're supposed to do here... */
+ return GL_FALSE;
}
pdraw->textureTarget = determineTextureTarget(attrib_list, num_attribs);
pdraw->textureFormat = determineTextureFormat(attrib_list, num_attribs);
+
+ return GL_TRUE;
}
static void
@@ -234,11 +236,12 @@ DestroyDRIDrawable(Display *dpy, GLXDrawable drawable, int destroy_xdrawable)
#else
-static void
+static GLboolean
CreateDRIDrawable(Display *dpy, const struct glx_config * fbconfig,
XID drawable, XID glxdrawable,
const int *attrib_list, size_t num_attribs)
{
+ return GL_FALSE;
}
static void
@@ -364,6 +367,27 @@ GetDrawableAttribute(Display * dpy, GLXDrawable drawable,
return 0;
}
+static void
+protocolDestroyDrawable(Display *dpy, GLXDrawable drawable, CARD32 glxCode)
+{
+ xGLXDestroyPbufferReq *req;
+ CARD8 opcode;
+
+ opcode = __glXSetupForCommand(dpy);
+ if (!opcode)
+ return;
+
+ LockDisplay(dpy);
+
+ GetReq(GLXDestroyPbuffer, req);
+ req->reqType = opcode;
+ req->glxCode = glxCode;
+ req->pbuffer = (GLXPbuffer) drawable;
+
+ UnlockDisplay(dpy);
+ SyncHandle();
+}
+
/**
* Create a non-pbuffer GLX drawable.
*/
@@ -405,7 +429,14 @@ CreateDrawable(Display *dpy, struct glx_config *config,
UnlockDisplay(dpy);
SyncHandle();
- CreateDRIDrawable(dpy, config, drawable, xid, attrib_list, i);
+ if (!CreateDRIDrawable(dpy, config, drawable, xid, attrib_list, i)) {
+ if (glxCode == X_GLXCreatePixmap)
+ glxCode = X_GLXDestroyPixmap;
+ else
+ glxCode = X_GLXDestroyWindow;
+ protocolDestroyDrawable(dpy, xid, glxCode);
+ xid = None;
+ }
return xid;
}
@@ -417,27 +448,11 @@ CreateDrawable(Display *dpy, struct glx_config *config,
static void
DestroyDrawable(Display * dpy, GLXDrawable drawable, CARD32 glxCode)
{
- xGLXDestroyPbufferReq *req;
- CARD8 opcode;
-
if ((dpy == NULL) || (drawable == 0)) {
return;
}
-
- opcode = __glXSetupForCommand(dpy);
- if (!opcode)
- return;
-
- LockDisplay(dpy);
-
- GetReq(GLXDestroyPbuffer, req);
- req->reqType = opcode;
- req->glxCode = glxCode;
- req->pbuffer = (GLXPbuffer) drawable;
-
- UnlockDisplay(dpy);
- SyncHandle();
+ protocolDestroyDrawable(dpy, drawable, glxCode);
DestroyDRIDrawable(dpy, drawable, GL_FALSE);
@@ -466,6 +481,7 @@ CreatePbuffer(Display * dpy, struct glx_config *config,
CARD8 opcode;
unsigned int i;
Pixmap pixmap;
+ GLboolean glx_1_3 = GL_FALSE;
i = 0;
if (attrib_list) {
@@ -484,6 +500,8 @@ CreatePbuffer(Display * dpy, struct glx_config *config,
xGLXCreatePbufferReq *req;
unsigned int extra = (size_in_attribs) ? 0 : 2;
+ glx_1_3 = GL_TRUE;
+
GetReqExtra(GLXCreatePbuffer, (8 * (i + extra)), req);
data = (CARD32 *) (req + 1);
@@ -528,7 +546,12 @@ CreatePbuffer(Display * dpy, struct glx_config *config,
pixmap = XCreatePixmap(dpy, RootWindow(dpy, config->screen),
width, height, config->rgbBits);
- CreateDRIDrawable(dpy, config, pixmap, id, attrib_list, i);
+ if (!CreateDRIDrawable(dpy, config, pixmap, id, attrib_list, i)) {
+ CARD32 o = glx_1_3 ? X_GLXDestroyPbuffer : X_GLXvop_DestroyGLXPbufferSGIX;
+ XFreePixmap(dpy, pixmap);
+ protocolDestroyDrawable(dpy, id, o);
+ id = None;
+ }
return id;
}
diff --git a/src/glx/glxclient.h b/src/glx/glxclient.h
index 9262f86f1f3..06415288165 100644
--- a/src/glx/glxclient.h
+++ b/src/glx/glxclient.h
@@ -138,6 +138,7 @@ struct __GLXDRIdrawableRec
GLenum textureTarget;
GLenum textureFormat; /* EXT_texture_from_pixmap support */
unsigned long eventMask;
+ int refcount;
};
/*
@@ -223,7 +224,7 @@ struct glx_context_vtable {
GLXDrawable drawable,
int buffer, const int *attrib_list);
void (*release_tex_image)(Display * dpy, GLXDrawable drawable, int buffer);
-
+ void * (*get_proc_address)(const char *symbol);
};
extern void
@@ -335,7 +336,6 @@ struct glx_context
#if defined(GLX_DIRECT_RENDERING) && defined(GLX_USE_APPLEGL)
void *driContext;
- Bool do_destroy;
#endif
/**
diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c
index 774d38b2634..191b321ce32 100644
--- a/src/glx/glxcmds.c
+++ b/src/glx/glxcmds.c
@@ -354,8 +354,9 @@ glx_send_destroy_context(Display *dpy, XID xid)
/*
** Destroy the named context
*/
-static void
-DestroyContext(Display * dpy, GLXContext ctx)
+
+_X_EXPORT void
+glXDestroyContext(Display * dpy, GLXContext ctx)
{
struct glx_context *gc = (struct glx_context *) ctx;
@@ -377,14 +378,7 @@ DestroyContext(Display * dpy, GLXContext ctx)
}
__glXUnlock();
- if (gc->vtable->destroy)
- gc->vtable->destroy(gc);
-}
-
-_X_EXPORT void
-glXDestroyContext(Display * dpy, GLXContext gc)
-{
- DestroyContext(dpy, gc);
+ gc->vtable->destroy(gc);
}
/*
@@ -646,19 +640,33 @@ glXCreateGLXPixmap(Display * dpy, XVisualInfo * vis, Pixmap pixmap)
psc = priv->screens[vis->screen];
if (psc->driScreen == NULL)
- break;
+ return xid;
+
config = glx_config_find_visual(psc->visuals, vis->visualid);
pdraw = psc->driScreen->createDrawable(psc, pixmap, xid, config);
if (pdraw == NULL) {
fprintf(stderr, "failed to create pixmap\n");
+ xid = None;
break;
}
if (__glxHashInsert(priv->drawHash, xid, pdraw)) {
(*pdraw->destroyDrawable) (pdraw);
- return None; /* FIXME: Check what we're supposed to do here... */
+ xid = None;
+ break;
}
} while (0);
+
+ if (xid == None) {
+ xGLXDestroyGLXPixmapReq *dreq;
+ LockDisplay(dpy);
+ GetReq(GLXDestroyGLXPixmap, dreq);
+ dreq->reqType = opcode;
+ dreq->glxCode = X_GLXDestroyGLXPixmap;
+ dreq->glxpixmap = xid;
+ UnlockDisplay(dpy);
+ SyncHandle();
+ }
#endif
return xid;
@@ -1480,12 +1488,9 @@ _X_EXPORT GLXContextID glXGetContextIDEXT(const GLXContext ctx_user)
return ctx->xid;
}
-_X_EXPORT void
-glXFreeContextEXT(Display * dpy, GLXContext ctx)
-{
- DestroyContext(dpy, ctx);
-}
-
+_X_EXPORT
+GLX_ALIAS_VOID(glXFreeContextEXT, (Display *dpy, GLXContext ctx), (dpy, ctx),
+ glXDestroyContext);
_X_EXPORT GLXFBConfig *
glXChooseFBConfig(Display * dpy, int screen,
@@ -2522,6 +2527,12 @@ _X_EXPORT void (*glXGetProcAddressARB(const GLubyte * procName)) (void)
#endif
if (!f)
f = (gl_function) _glapi_get_proc_address((const char *) procName);
+ if (!f) {
+ struct glx_context *gc = __glXGetCurrentContext();
+
+ if (gc != NULL && gc->vtable->get_proc_address != NULL)
+ f = gc->vtable->get_proc_address((const char *) procName);
+ }
}
return f;
}
diff --git a/src/glx/glxcurrent.c b/src/glx/glxcurrent.c
index 064fd71ae6e..c92a2fd3cc2 100644
--- a/src/glx/glxcurrent.c
+++ b/src/glx/glxcurrent.c
@@ -212,7 +212,6 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw,
{
struct glx_context *gc = (struct glx_context *) gc_user;
struct glx_context *oldGC = __glXGetCurrentContext();
- int ret = Success;
/* XXX: If this is left out, then libGL ends up not having this
* symbol, and drivers using it fail to load. Compare the
@@ -255,37 +254,45 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw,
if (--oldGC->thread_refcount == 0) {
oldGC->vtable->unbind(oldGC, gc);
oldGC->currentDpy = 0;
- oldGC->currentDrawable = None;
- oldGC->currentReadable = None;
-
- if (oldGC->xid == None && oldGC != gc) {
- /* We are switching away from a context that was
- * previously destroyed, so we need to free the memory
- * for the old handle. */
- oldGC->vtable->destroy(oldGC);
- }
}
}
if (gc) {
- if (gc->thread_refcount++ == 0) {
- gc->currentDpy = dpy;
- gc->currentDrawable = draw;
- gc->currentReadable = read;
+ /* Attempt to bind the context. We do this before mucking with
+ * gc and __glXSetCurrentContext to properly handle our state in
+ * case of an error.
+ *
+ * If an error occurs, set the Null context since we've already
+ * blown away our old context. The caller is responsible for
+ * figuring out how to handle setting a valid context.
+ */
+ if (gc->vtable->bind(gc, oldGC, draw, read) != Success) {
+ __glXSetCurrentContextNull();
+ __glXUnlock();
+ __glXGenerateError(dpy, None, GLXBadContext, X_GLXMakeContextCurrent);
+ return GL_FALSE;
}
+
+ if (gc->thread_refcount == 0) {
+ gc->currentDpy = dpy;
+ gc->currentDrawable = draw;
+ gc->currentReadable = read;
+ }
+ gc->thread_refcount++;
__glXSetCurrentContext(gc);
- ret = gc->vtable->bind(gc, oldGC, draw, read);
} else {
__glXSetCurrentContextNull();
}
- __glXUnlock();
-
- if (ret) {
- __glXGenerateError(dpy, None, ret, X_GLXMakeContextCurrent);
- return GL_FALSE;
+ if (oldGC->thread_refcount == 0 && oldGC != &dummyContext && oldGC->xid == None) {
+ /* We are switching away from a context that was
+ * previously destroyed, so we need to free the memory
+ * for the old handle. */
+ oldGC->vtable->destroy(oldGC);
}
+ __glXUnlock();
+
return GL_TRUE;
}
diff --git a/src/glx/indirect_glx.c b/src/glx/indirect_glx.c
index b4f16c72536..7b542dd159c 100644
--- a/src/glx/indirect_glx.c
+++ b/src/glx/indirect_glx.c
@@ -335,6 +335,7 @@ static const struct glx_context_vtable indirect_context_vtable = {
indirect_use_x_font,
indirect_bind_tex_image,
indirect_release_tex_image,
+ NULL, /* get_proc_address */
};
/**