From 57c654324f5577d30c5239cd0c2c3eb7ad474143 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Wed, 23 Jun 2010 17:40:49 +0800 Subject: st/mesa: Add support for multiple APIs. Add st_gl_api_create_es1 and st_gl_api_create_es2 to create OpeGL ES 1.1 and OpenGL ES 2.0 contexts respectively. --- src/mesa/state_tracker/st_context.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'src/mesa/state_tracker/st_context.c') diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index 4b809b61143..7eb5f32611d 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -153,7 +153,7 @@ st_create_context_priv( GLcontext *ctx, struct pipe_context *pipe ) } -struct st_context *st_create_context(struct pipe_context *pipe, +struct st_context *st_create_context(gl_api api, struct pipe_context *pipe, const __GLcontextModes *visual, struct st_context *share) { @@ -164,16 +164,7 @@ struct st_context *st_create_context(struct pipe_context *pipe, memset(&funcs, 0, sizeof(funcs)); st_init_driver_functions(&funcs); -#if FEATURE_GL - ctx = _mesa_create_context_for_api(API_OPENGL, - visual, shareCtx, &funcs, NULL); -#elif FEATURE_ES1 - ctx = _mesa_create_context_for_api(API_OPENGLES, - visual, shareCtx, &funcs, NULL); -#elif FEATURE_ES2 - ctx = _mesa_create_context_for_api(API_OPENGLES2, - visual, shareCtx, &funcs, NULL); -#endif + ctx = _mesa_create_context_for_api(api, visual, shareCtx, &funcs, NULL); /* XXX: need a capability bit in gallium to query if the pipe * driver prefers DP4 or MUL/MAD for vertex transformation. -- cgit v1.2.3