summaryrefslogtreecommitdiffstats
path: root/src/gallium/targets/egl-static/st_GL.c
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2011-06-23 20:08:53 +0900
committerChia-I Wu <[email protected]>2011-06-24 16:43:03 +0900
commit7451bffad41a8ab7c61c9799b351c031852eb780 (patch)
tree300d42077d9802b7bb7aa998d563ba2960da286d /src/gallium/targets/egl-static/st_GL.c
parenta000745f80f695cfa0cd1dc206869eeb5f87f36f (diff)
targets/egl-static: allow st/mesa to be dynamically loaded
When shared glapi is not enabled, there are two glapi providers and we cannot decide which one to link to at build time. It results in unresolved symbols in st/mesa. This commit makes st/mesa a loadable module when shared glapi is not enabled, and hopes that the apps will link to one of the glapi providers (GL or GLES).
Diffstat (limited to 'src/gallium/targets/egl-static/st_GL.c')
-rw-r--r--src/gallium/targets/egl-static/st_GL.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/gallium/targets/egl-static/st_GL.c b/src/gallium/targets/egl-static/st_GL.c
new file mode 100644
index 00000000000..d9ca834c267
--- /dev/null
+++ b/src/gallium/targets/egl-static/st_GL.c
@@ -0,0 +1,35 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 7.10
+ *
+ * Copyright (C) 2011 LunarG Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Authors:
+ * Chia-I Wu <[email protected]>
+ */
+#include "state_tracker/st_gl_api.h"
+#include "pipe/p_compiler.h"
+
+PUBLIC struct st_api *
+st_api_create_OpenGL(void)
+{
+ return st_gl_api_create();
+}