On Jan 5, 2015, at 2:04 PM, Ken Thomases ken@codeweavers.com wrote:
On Jan 5, 2015, at 10:17 AM, Matteo Bruni mbruni@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