#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
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,
DRI_glXUseXFont,
NULL, /* bind_tex_image, */
NULL, /* release_tex_image, */
+ applegl_get_proc_address,
};
struct glx_context *
DRI_glXUseXFont,
dri2_bind_tex_image,
dri2_release_tex_image,
+ NULL, /* get_proc_address */
};
static void
DRI_glXUseXFont,
NULL,
NULL,
+ NULL, /* get_proc_address */
};
static struct glx_context *
DRI_glXUseXFont,
NULL,
NULL,
+ NULL, /* get_proc_address */
};
static struct glx_context *
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
#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;
}
indirect_use_x_font,
indirect_bind_tex_image,
indirect_release_tex_image,
+ NULL, /* get_proc_address */
};
/**