diff options
author | Chia-I Wu <olvaffe@gmail.com> | 2010-01-18 11:34:48 +0800 |
---|---|---|
committer | Chia-I Wu <olvaffe@gmail.com> | 2010-01-18 11:38:19 +0800 |
commit | 9b93671ae6927b9d6f5ebccbd614714973d26d82 (patch) | |
tree | 0466bb15a090b29bb375f9d42f2857f32bbbfa8a | |
parent | 02d9e0cb9e8f143628a384dc20a659861926ca8e (diff) |
Amend st_module.
Add a enum to st_module to describe the API supported by the module.
-rw-r--r-- | st_api.h | 21 |
1 files changed, 16 insertions, 5 deletions
@@ -45,10 +45,20 @@ /** * The entry points of the state trackers. */ -#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" +#define ST_MODULE_OPENGL_SYMBOL "st_module_OpenGL" +#define ST_MODULE_OPENGL_ES1_SYMBOL "st_module_OpenGL_ES1" +#define ST_MODULE_OPENGL_ES2_SYMBOL "st_module_OpenGL_ES2" +#define ST_MODULE_OPENVG_SYMBOL "st_module_OpenVG" + +/** + * 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, +}; /** * Used in st_context->teximage. @@ -326,10 +336,11 @@ struct st_api */ struct st_module { + enum st_module_api api; struct st_api *(*create_api)(const struct st_manager_api *smapi); }; -/* these symbols should be dynamically looked up */ +/* these symbols may need to be dynamically lookup 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; |