On 7 July 2015 at 18:37, Matteo Bruni matteo.mystral@gmail.com wrote:
2015-07-07 16:58 GMT+02:00 Henri Verbeet hverbeet@gmail.com:
- glGetIntegerv(GL_CONTEXT_PROFILE_MASK, &context_profile);
- if (glGetError() != GL_NO_ERROR)
context_profile = 0;
Should this perhaps just check for gl_info->p_wglCreateContextAttribsARB instead of eating errors?
You mean just check whether wglCreateContextAttribsARB succeeded for a GL version >= 3.2? That should work, although it might be a bit awkward (but not necessarily more than the current code).
I actually meant "if (gl_info->p_wglCreateContextAttribsARB)", but that doesn't work because the query is only supported on 3.2 or later contexts. But we could probably just check "gl_version" against 3.2 instead.
I'd make this a DWORD, if nothing else for consistency with MaxShaderModelVS etc.
Hmm, how would you expect the (major, minor) version to be encoded in the registry DWORD? Same as MAKEDWORD_VERSION()?
We could, but there are of course other options as well. (E.g. 0x00030002, 0x0302, 0x32, 302, 32.) We could also have separate entries for the major and minor numbers, although I suppose that's awkward if one is set but not the other.