diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/context.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index d8eea2ea867..2b810b0d863 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -996,6 +996,24 @@ _mesa_initialize_context(struct gl_context *ctx, struct gl_shared_state *shared; int i; + switch (api) { + case API_OPENGL_COMPAT: + case API_OPENGL_CORE: + if (!HAVE_OPENGL) + return GL_FALSE; + break; + case API_OPENGLES2: + if (!HAVE_OPENGL_ES_2) + return GL_FALSE; + break; + case API_OPENGLES: + if (!HAVE_OPENGL_ES_1) + return GL_FALSE; + break; + default: + return GL_FALSE; + } + ctx->API = api; ctx->DrawBuffer = NULL; ctx->ReadBuffer = NULL; |