February 22, 2015
On Sunday, 22 February 2015 at 22:49:16 UTC, Namespace wrote:
>> Stackoverflow says it is possible. One guy's fix was something like:
>> glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
>> glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
>> glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
>> glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
>>
>> Cause apparently it supports it.
>
> Ok, you could try to use something identical in the Window constructor: https://github.com/Dgame/Dgame/blob/master/Window/Window.d#L124
>
> ----
> SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
> SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0);
> ----

Adding these lines before window creation make it load up to OpenGL 3.3:

SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
	SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2);
	SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);


It runs now except it only displays a white screen. I'm testing your shapes tutorial.
February 23, 2015
On 23/02/2015 11:33 a.m., Gan wrote:
> On Sunday, 22 February 2015 at 22:32:44 UTC, Gan wrote:
>> On Sunday, 22 February 2015 at 22:29:53 UTC, Namespace wrote:
>>> On Sunday, 22 February 2015 at 22:24:59 UTC, Gan wrote:
>>>> On Sunday, 22 February 2015 at 21:58:13 UTC, John Colvin wrote:
>>>>> On Sunday, 22 February 2015 at 21:34:03 UTC, Foo wrote:
>>>>>>> I think you need to install the ogg libraries. Derelict, which
>>>>>>> Dgame uses, only provides bindings to the C/C++ libraries. You
>>>>>>> still need to get the those libraries for things to work.
>>>>>>>
>>>>>>> Sorry I cannot help more. On linux it's just a matter of using
>>>>>>> the pkg manager (apt, pacman, yum etc.) On MAC I have not idea.
>>>>>>>
>>>>>>>
>>>>>>> I can confirm Dgame 0.4.1 is now working on Linux (Debian x86_64)
>>>>>>> after I did a dub upgrade.
>>>>>>>
>>>>>>> Thanks,
>>>>>>> amber
>>>>>>
>>>>>> That is nice to hear. It works for me on Windows 8.1. Someone with
>>>>>> a Mac here?
>>>>>
>>>>> I'll try tomorrow if no-one else has.
>>>>
>>>> I have a Mac. OS Yosemite 10.10. Macbook Pro 2011. Intel HD 3000,
>>>> 16gb of ram, i5 CPU.
>>>>
>>>> When I run one of your Dgame tutorials I get this error:
>>>> Derelict loaded GL version: GL21 (GL21), available GL version: 2.1
>>>> INTEL-10.0.22
>>>> object.Exception@../.dub/packages/dgame-0.4.1/Window/Window.d(144):
>>>> Your OpenGL version (21) is too low. Need at least GL 3.0.
>>>
>>> That is strange. Every PC should be be capable to launch at least
>>> OpenGL 3.0. Did you try to update your graphic driver?
>>
>> You can't really upgrade your graphics driver on a mac.
>
> Stackoverflow says it is possible. One guy's fix was something like:
> glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
> glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
> glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
> glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
>
> Cause apparently it supports it.

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.
February 23, 2015
On Sunday, 22 February 2015 at 20:55:04 UTC, amber wrote:
> On Sunday, 22 February 2015 at 20:42:20 UTC, Gan wrote:
>> On Sunday, 22 February 2015 at 09:30:10 UTC, Namespace wrote:
>>> On Sunday, 22 February 2015 at 09:05:16 UTC, Mike Parker wrote:
>>>> On 2/22/2015 2:43 PM, Gan wrote:
>>>>
>>>>>
>>>>>
>>>>>
>>>>> dub.json:
>>>>> {
>>>>>  "name": "game",
>>>>>  "description": "game",
>>>>>  "dependencies":
>>>>>  {
>>>>>      "dgame": "~master"
>>>>>  }
>>>>> }
>>>>
>>>> First, you need to change your dependency to something like this:
>>>>
>>>> "dependencies":
>>>> >   {
>>>> >       "dgame": "~>0.4.0"
>>>> >   }
>>>>
>>>> Or you can use ==0.4.0, or >=0.4.0. Just don't use branch-based dependencies anymore (like ~master) as those are deprecated.
>>>>
>>>> Second, there's a bug in Dgame's dub.json, which is causing compilation to error out. I'll post a PR for it.
>>>
>>> I have the PR merged, the problem should be fixed now. Thanks to you and growlercab.
>>
>> Now it builds though crashes on run with this error:
>>
>> init openAL
>> derelict.util.exception.SharedLibLoadException@../../.dub/packages/derelict-util-1.9.1/source/derelict/util/exception.d(35): Failed to load one or more shared libraries:
>> 	libogg.dylib - dlopen(libogg.dylib, 2): image not found
>> 	libogg.0.dylib - dlopen(libogg.0.dylib, 2): image not found
>> Error executing command run: Program exited with code 1
>>
>>
>> Press any key to continue...
>
> I think you need to install the ogg libraries. Derelict, which Dgame uses, only provides bindings to the C/C++ libraries. You still need to get the those libraries for things to work.
>
> Sorry I cannot help more. On linux it's just a matter of using the pkg manager (apt, pacman, yum etc.) On MAC I have not idea.
>
>
> I can confirm Dgame 0.4.1 is now working on Linux (Debian x86_64) after I did a dub upgrade.
>
> Thanks,
> amber

And I can confirm Dgame 0.4.1 is also working with DMD 2.067-b2 on arch linux x86_64.

Cheers,
stew
February 23, 2015
On Monday, 23 February 2015 at 03:03:01 UTC, stewarth wrote:

>
> And I can confirm Dgame 0.4.1 is also working with DMD 2.067-b2 on arch linux x86_64.
>
> Cheers,
> stew

and the same on Debian x86_64 I'm just told :)

/stew
February 23, 2015
On Monday, 23 February 2015 at 00:36:49 UTC, Rikki Cattermole wrote:
> On 23/02/2015 11:33 a.m., Gan wrote:
>> On Sunday, 22 February 2015 at 22:32:44 UTC, Gan wrote:
>>> On Sunday, 22 February 2015 at 22:29:53 UTC, Namespace wrote:
>>>> On Sunday, 22 February 2015 at 22:24:59 UTC, Gan wrote:
>>>>> On Sunday, 22 February 2015 at 21:58:13 UTC, John Colvin wrote:
>>>>>> On Sunday, 22 February 2015 at 21:34:03 UTC, Foo wrote:
>>>>>>>> I think you need to install the ogg libraries. Derelict, which
>>>>>>>> Dgame uses, only provides bindings to the C/C++ libraries. You
>>>>>>>> still need to get the those libraries for things to work.
>>>>>>>>
>>>>>>>> Sorry I cannot help more. On linux it's just a matter of using
>>>>>>>> the pkg manager (apt, pacman, yum etc.) On MAC I have not idea.
>>>>>>>>
>>>>>>>>
>>>>>>>> I can confirm Dgame 0.4.1 is now working on Linux (Debian x86_64)
>>>>>>>> after I did a dub upgrade.
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> amber
>>>>>>>
>>>>>>> That is nice to hear. It works for me on Windows 8.1. Someone with
>>>>>>> a Mac here?
>>>>>>
>>>>>> I'll try tomorrow if no-one else has.
>>>>>
>>>>> I have a Mac. OS Yosemite 10.10. Macbook Pro 2011. Intel HD 3000,
>>>>> 16gb of ram, i5 CPU.
>>>>>
>>>>> When I run one of your Dgame tutorials I get this error:
>>>>> Derelict loaded GL version: GL21 (GL21), available GL version: 2.1
>>>>> INTEL-10.0.22
>>>>> object.Exception@../.dub/packages/dgame-0.4.1/Window/Window.d(144):
>>>>> Your OpenGL version (21) is too low. Need at least GL 3.0.
>>>>
>>>> That is strange. Every PC should be be capable to launch at least
>>>> OpenGL 3.0. Did you try to update your graphic driver?
>>>
>>> You can't really upgrade your graphics driver on a mac.
>>
>> Stackoverflow says it is possible. One guy's fix was something like:
>> glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
>> glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
>> glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
>> glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
>>
>> Cause apparently it supports it.
>
> 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.

Text tutorial doesn't work either on Mac. Just a blank white screen.
February 23, 2015
> 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?
February 23, 2015
>> 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.
>
> Text tutorial doesn't work either on Mac. Just a blank white screen.

I will look into it this evening.
February 23, 2015
On 23/02/2015 8:01 p.m., 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?

This does work on OSX. Again Devisualization.Window supports OpenGL context creation for both "legacy" and non "legacy". It is just dependent upon what you specify as the version to load when creating the context that matters.
February 23, 2015
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);
```
February 23, 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.