[PATCH 4/5] wined3d: Add a setting for the maximum OpenGL version to use.
matteo.mystral at gmail.com
Tue Jul 7 12:43:56 CDT 2015
2015-07-07 19:12 GMT+02:00 Henri Verbeet <hverbeet at gmail.com>:
> On 7 July 2015 at 18:37, Matteo Bruni <matteo.mystral at gmail.com> wrote:
>> 2015-07-07 16:58 GMT+02:00 Henri Verbeet <hverbeet at 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
Yeah, that's probably easier.
>>> 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.
It's a bit ugly in any way. I'll go with the MAKEDWORD_VERSION() style
first and see how it looks.
More information about the wine-devel