summaryrefslogtreecommitdiff
path: root/src/mesa/main/context.h
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2010-04-22 09:25:51 -0400
committerKristian Høgsberg <krh@bitplanet.net>2010-04-22 09:25:51 -0400
commit2ab18d63cb71d988265eeab431e4363081978144 (patch)
tree20a7af40ac207b3e9189a34a04e9f5534f33db19 /src/mesa/main/context.h
parentbd91f665a7c12f114619a4f6f1e00059e4f4cb5e (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/context.h')
-rw-r--r--src/mesa/main/context.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h
index 09bf1777da..e9405c8bc2 100644
--- a/src/mesa/main/context.h
+++ b/src/mesa/main/context.h
@@ -112,6 +112,21 @@ _mesa_initialize_context( GLcontext *ctx,
const struct dd_function_table *driverFunctions,
void *driverContext );
+extern GLcontext *
+_mesa_create_context_for_api(gl_api api,
+ const GLvisual *visual,
+ GLcontext *share_list,
+ const struct dd_function_table *driverFunctions,
+ void *driverContext);
+
+extern GLboolean
+_mesa_initialize_context_for_api(GLcontext *ctx,
+ gl_api api,
+ const GLvisual *visual,
+ GLcontext *share_list,
+ const struct dd_function_table *driverFunctions,
+ void *driverContext);
+
extern void
_mesa_initialize_context_extra(GLcontext *ctx);