summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChia-I Wu <olvaffe@gmail.com>2010-02-01 21:36:18 +0800
committerChia-I Wu <olvaffe@gmail.com>2010-02-01 21:37:34 +0800
commit82c2ece8471d1590d0055e6f0298f1f47c1675d6 (patch)
treeec22b2ea243694015332e3ac5b5aa9762830cde6
parent1b74264f3cd7969c5b994f9a70453dafb17d3873 (diff)
Rename st_module_api to st_api_type and add the type to the context.
Without the change, it is not easy to derive the client API of an st context.
-rw-r--r--st_api.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/st_api.h b/st_api.h
index 9851ce0..c70ecf3 100644
--- a/st_api.h
+++ b/st_api.h
@@ -53,11 +53,11 @@
/**
* The supported rendering API of a state tracker.
*/
-enum st_module_api {
- ST_MODULE_OPENGL,
- ST_MODULE_OPENGL_ES1,
- ST_MODULE_OPENGL_ES2,
- ST_MODULE_OPENVG,
+enum st_api_type {
+ ST_API_OPENGL,
+ ST_API_OPENGL_ES1,
+ ST_API_OPENGL_ES2,
+ ST_API_OPENVG,
};
/**
@@ -223,6 +223,11 @@ struct st_framebuffer
struct st_context
{
/**
+ * The API of the context.
+ */
+ enum st_api_type api;
+
+ /**
* Available for the state tracker to use.
*/
void *st_api_private;
@@ -368,7 +373,7 @@ struct st_api
*/
struct st_module
{
- enum st_module_api api;
+ enum st_api_type api;
struct st_api *(*create_api)(void);
};