summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChia-I Wu <olvaffe@gmail.com>2010-01-16 23:36:08 +0800
committerChia-I Wu <olvaffe@gmail.com>2010-01-17 00:20:35 +0800
commit1e629198a693dff88b4c0c403ed3471f3d3257e2 (patch)
tree74efdf62a6ca1fa6bb8fcd0e2f012d7f4995bdbd
parent8c6777e9c33a6131dccabc72160d1d5756c5a1ef (diff)
Add symbols for st_api creation.
The idea is that the state tracker manager should dlsym() for a specific symbol to decide whether a state tracker is available. The returned address has type struct st_module and can be used to create the st_api.
-rw-r--r--st_api.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/st_api.h b/st_api.h
index 1908504..6d0c560 100644
--- a/st_api.h
+++ b/st_api.h
@@ -42,6 +42,11 @@
* tracker managers.
*/
+#define ST_MODULE_OPENGL "st_module_OpenGL"
+#define ST_MODULE_OPENGL_ES1 "st_module_OpenGL_ES1"
+#define ST_MODULE_OPENGL_ES2 "st_module_OpenGL_ES2"
+#define ST_MODULE_OPENVG "st_module_OpenVG"
+
struct pipe_context;
struct pipe_texture;
struct pipe_fence_handle;
@@ -315,4 +320,17 @@ struct st_api
void (*destroy)(struct st_api *api);
};
+typedef struct st_api *(*st_create_api_proc)(const struct sm_api *smapi);
+
+struct st_module
+{
+ st_create_api_proc create;
+};
+
+/* these symbols should be dynamically looked up */
+extern PUBLIC const struct st_module st_module_OpenGL;
+extern PUBLIC const struct st_module st_module_OpenGL_ES1;
+extern PUBLIC const struct st_module st_module_OpenGL_ES2;
+extern PUBLIC const struct st_module st_module_OpenVG;
+
#endif