Re: Dgame revived

2015-02-23 Thread Mike Parker via Digitalmars-d-announce

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);

```


Re: Dgame revived

2015-02-23 Thread Namespace via Digitalmars-d-announce

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.


Re: This Week in D, issue 6 - DConf, ddmd, dmd beta, return ref, install tip

2015-02-23 Thread Meta via Digitalmars-d-announce

On Monday, 23 February 2015 at 01:14:29 UTC, Adam D. Ruppe wrote:
Here's the newest This Week in D, the big news being ddmd and 
the dmd beta.


http://arsdnet.net/this-week-in-d/feb-22.html

The tip of this week has to do with installation: as a 
Slackware user, the new download page made me feel left out, 
but the zip still works the same, so I decided to call that out 
so people who want to try the new version will know too.


Also on Reddit, hopefully we can get some more dconf attention:
http://www.reddit.com/r/programming/comments/2wtkgz/this_week_in_d_6_dconf_ddmd_dmd_beta_return_ref/


There's a spurious period at the end of "Major Changes", and a 
typo'd DDOC tag in " In The Community".


Re: Dgame revived

2015-02-23 Thread Namespace via Digitalmars-d-announce
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.


Added


Re: Dgame revived

2015-02-23 Thread Gan via Digitalmars-d-announce

On Monday, 23 February 2015 at 16:03:47 UTC, Namespace wrote:
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.


Added


Doesn't work. Still gives the same OpenGL too low error. I think 
you need to place the lines

SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_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);


before window creation.


Re: Dgame revived

2015-02-23 Thread Namespace via Digitalmars-d-announce
Doesn't work. Still gives the same OpenGL too low error. I 
think you need to place the lines

SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_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);


before window creation.


Could you try it and say if it helps?


Re: Dgame revived

2015-02-23 Thread Gan via Digitalmars-d-announce

On Monday, 23 February 2015 at 23:24:02 UTC, Namespace wrote:
Doesn't work. Still gives the same OpenGL too low error. I 
think you need to place the lines

SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_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);


before window creation.


Could you try it and say if it helps?


Placing the lines before window creation actually allows it to 
run on a Mac. Though there's still the error of blank white 
screen:

http://cl.ly/image/382C28363U41


Re: Dgame revived

2015-02-23 Thread Mike Parker via Digitalmars-d-announce

On 2/24/2015 8:18 AM, Gan wrote:



Doesn't work. Still gives the same OpenGL too low error. I think you
need to place the lines
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
 SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_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);

before window creation.


Yes. All SDL_GL_SetAttributes must be called before window creation for 
them to have any effect. I thought that was already understood.


Re: Dgame revived

2015-02-23 Thread Gan via Digitalmars-d-announce

On Tuesday, 24 February 2015 at 00:53:49 UTC, Mike Parker wrote:

On 2/24/2015 8:18 AM, Gan wrote:



Doesn't work. Still gives the same OpenGL too low error. I 
think you

need to place the lines
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_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);

before window creation.


Yes. All SDL_GL_SetAttributes must be called before window 
creation for them to have any effect. I thought that was 
already understood.


Currently on the repo, these lines are after the window creation. 
That needs changed.