mesa: allow MESA_GL_VERSION_OVERRIDE to override the API type

Change the format to MAJOR.MINOR[FC]
For example: 2.1, 3.0FC, 3.1

The FC suffix indicates a forward compatible context, and
is only valid for versions >= 3.0.

Examples:
2.1:   GL Legacy/Compatibility context
3.0:   GL Legacy/Compatibility context
3.0FC: GL Core Profile context + Forward Compatible
3.1:   GL Core Profile context
3.1FC: GL Core Profile context + Forward Compatible

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
Jordan Justen
2012-09-01 01:38:08 -07:00
parent e87c63f288
commit 00905dbf19
4 changed files with 88 additions and 23 deletions

View File

@@ -921,6 +921,10 @@ _mesa_initialize_context(struct gl_context *ctx,
ctx->WinSysDrawBuffer = NULL;
ctx->WinSysReadBuffer = NULL;
if (_mesa_is_desktop_gl(ctx)) {
_mesa_override_gl_version(ctx);
}
/* misc one-time initializations */
one_time_init(ctx);