[PATCH 2/5] winemac: Implement wglCreateContextAttribsARB.

Ken Thomases ken at codeweavers.com
Mon Jan 5 16:21:34 CST 2015


On Jan 5, 2015, at 2:04 PM, Ken Thomases <ken at codeweavers.com> wrote:

> On Jan 5, 2015, at 10:17 AM, Matteo Bruni <mbruni at codeweavers.com> wrote:
> 
>> +    register_extension("WGL_ARB_create_context");
>> +    register_extension("WGL_ARB_create_context_profile");
>> +    opengl_funcs.ext.p_wglCreateContextAttribsARB = macdrv_wglCreateContextAttribsARB;
> 
> These should only be advertised when building against the 10.7 SDK or later.  So, this should be guarded by the SDK #if directive.
> 
> Also, given that it's possible to build against a 10.7+ SDK but target deployment back to 10.6, I'm tempted to say we should determine if core profiles are actually available and only advertise those extensions if so.  Basically, call CGLChoosePixelFormat() with the simplest set of attributes that specify the core profile and see if it succeeds.

Actually, after reviewing the WGL_ARB_create_context spec, I have changed my mind about this.  Those extensions and the entry point can still be advertised regardless of the SDK or the actual capabilities of the system.

However, wglCreateContextAttribsARB() should reject requests for anything which can't be supported because of the SDK or the capabilities of the system.

Probably the capabilities of the system with respect to core profile support should be tested once during initialization and recorded.

-Ken




More information about the wine-devel mailing list