Dgame revived

Namespace via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Mon Feb 23 04:52:24 PST 2015


On Monday, 23 February 2015 at 10:10:17 UTC, Mike Parker wrote:
> On 2/23/2015 4:01 PM, Namespace wrote:
>>> On OSX you can load either "legacy" version of OpenGL so 
>>> 1.x/2.x or
>>> 3.x+. Not both. I found this out for Devisualization.Window. 
>>> Most
>>> likely dgame by default is loading it in legacy mode.
>>
>> Derelict GL is loading in legacy mode. You have to call 
>> 'reload' after
>> creating a valid GL Context to update your OpenGL to the 
>> highest
>> possible version. Maybe that doesn't work on Mac?
>
> load will pull in 1.1 functions only, nothing more. reload will 
> load in whatever is supported by the current context. So if 
> your context only supports 2.1, only functions up to 2.1 will 
> be loaded. One of the earlier posts showed what needs to be 
> done on Mac to get a 3.x context. In SDL, that means the 
> following:
>
> ```
> SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
> SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
> SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, 
> SDL_GL_CONTEXT_PROFILE_CORE);
> SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, 
> SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG);

Yes, that was my suggestion. But now where you confirm it, I'll 
add it.


More information about the Digitalmars-d-announce mailing list