From ddc82a634caf4565c184362c30a586ef6a4f65e6 Mon Sep 17 00:00:00 2001 From: Jon TURNEY Date: Mon, 12 May 2014 16:30:26 +0100 Subject: [PATCH 1/3] applegl: Provide requirements of _SET_DrawBuffers _SET_DrawBuffers requires driDispatchRemapTable, so we need to link with libmesa for remap.c. libmesa requires the C++ linker. Also need to arrange to call _mesa_init_remap_table() to initialize the remap table. XXX: There has to be a better way fixing this. Signed-off-by: Jon TURNEY (cherry picked from commit fd9583edffb17028253ecd267b21a137522d67e4) --- src/glx/Makefile.am | 5 ++++- src/glx/apple/apple_glapi.c | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/glx/Makefile.am b/src/glx/Makefile.am index 6e50e09..de24496 100644 --- a/src/glx/Makefile.am +++ b/src/glx/Makefile.am @@ -139,7 +139,10 @@ libglx_la_SOURCES += \ applegl_glx.c SUBDIRS += apple -libglx_la_LIBADD += $(builddir)/apple/libappleglx.la +libglx_la_LIBADD += \ + $(builddir)/apple/libappleglx.la \ + $(top_builddir)/src/mesa/libmesa.la +nodist_EXTRA_lib@GL_LIB@_la_SOURCES = dummy.cpp endif GL_LIBS = \ diff --git a/src/glx/apple/apple_glapi.c b/src/glx/apple/apple_glapi.c index 4d19f7f..849044b 100644 --- a/src/glx/apple/apple_glapi.c +++ b/src/glx/apple/apple_glapi.c @@ -39,6 +39,7 @@ #include #include "main/glheader.h" +#include "main/remap.h" #include "glapi.h" #include "glapitable.h" #include "main/dispatch.h" @@ -54,6 +55,8 @@ static void _apple_glapi_create_table(void) { if (__applegl_api) return; + _mesa_init_remap_table(); + __ogl_framework_api = _glapi_create_table_from_handle(apple_cgl_get_dl_handle(), "gl"); assert(__ogl_framework_api); -- 1.9.5 (Apple Git-50.3)