diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2010-04-22 09:25:51 -0400 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2010-04-22 09:25:51 -0400 |
commit | 2ab18d63cb71d988265eeab431e4363081978144 (patch) | |
tree | 20a7af40ac207b3e9189a34a04e9f5534f33db19 /src/mesa/main/mtypes.h | |
parent | bd91f665a7c12f114619a4f6f1e00059e4f4cb5e (diff) |
mesa: Track the OpenGL API we're implementing in the context
This introduces a new way to create or initialize a context:
_mesa_create_context_for_api and
_mesa_initialize_context_for_api
which in addition to the current arguments take an api enum to indicate
which OpenGL API the context should implement. At this point the
API field in GLcontext isn't used anywhere, but later commits will
key certain functionality off of it.
The _mesa_create_context and _mesa_initialize_context functions are
kept in place as wrappers around the *_for_api versions, passing in
API_OPENGL to get the same behavior as before.
Diffstat (limited to 'src/mesa/main/mtypes.h')
-rw-r--r-- | src/mesa/main/mtypes.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 349d5f51e6..e5e099acc3 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2869,6 +2869,14 @@ struct gl_dlist_state } Current; }; +/** + * Enum for the OpenGL APIs we know about and may support. + */ +typedef enum { + API_OPENGL, + API_OPENGLES, + API_OPENGLES2, +} gl_api; /** * Mesa rendering context. @@ -2887,6 +2895,7 @@ struct __GLcontextRec /** \name API function pointer tables */ /*@{*/ + gl_api API; struct _glapi_table *Save; /**< Display list save functions */ struct _glapi_table *Exec; /**< Execute functions */ struct _glapi_table *CurrentDispatch; /**< == Save or Exec !! */ |