Re: Dgame revived

2015-03-17 Thread Namespace via Digitalmars-d-announce
Since it can be somewhat annoying to create the necessary shared 
libraries, it would be very helpful if those who have already 
created these files (specifically * .so and * .dylib) could send 
those files to me (rswhi...@gmail.com). New user could reuse 
these files. Of course you should also write me, on what 
operating system you are. ;)
I'd do it myself, but my time is still sorely limited by end of 
next week. Therefore I would be grateful to everyone, which does 
the hard work for me.


Thank you in advance.


Re: Dgame revived

2015-03-16 Thread Foo via Digitalmars-d-announce

On Sunday, 15 March 2015 at 23:17:10 UTC, Joel wrote:

On Sunday, 15 March 2015 at 22:51:17 UTC, Namespace wrote:

On Sunday, 15 March 2015 at 22:30:06 UTC, Joel wrote:

I've been getting these errors:

I found two places that have 'package(Dgame):' - 
source\Dgame\Graphic\Color.d(30) and 
source\Dgame\Math\Rect.d(44), and if I remove them (comment 
them out), then only one error remains:
Yeah, I've used a dmd 2.067 version. I will fix this tomorrow, 
so that Dgame is useable with dmd 2.066.



Compiling using dmd...
Error: cannot read file main.d
FAIL 
.dub\build\main-debug-windows-x86-dmd_2066-7A96EE8F0A68A2410292AA6D54ADEF4C

\ dgame-example executable
Error executing command run: dmd failed with exit code 1.

That error should be fixed now.


I still get this error. Or am I using the wrong zip file?


Keep up the good work!

Thanks!
Currently you should use the Master branch until I fixed the 
package thing.


Re: Dgame revived

2015-03-16 Thread Namespace via Digitalmars-d-announce
Currently you should use the Master branch until I fixed the 
package thing.


I hate to post from my mobile phone. I've always have this 
no-name account there.


I hope I've fixed the errors. It was my fault, because I was too 
excited about the new release, I forgot completely to test with 
the current version 2.066.


Re: Dgame revived

2015-03-16 Thread Namespace via Digitalmars-d-announce

On Monday, 16 March 2015 at 07:49:52 UTC, Namespace wrote:
Currently you should use the Master branch until I fixed the 
package thing.


I hate to post from my mobile phone. I've always have this 
no-name account there.


I hope I've fixed the errors. It was my fault, because I was 
too excited about the new release, I forgot completely to test 
with the current version 2.066.


Forgot to mention the new Beta tag (hopefully the last :)):
https://github.com/Dgame/Dgame/releases/tag/v0.5.0-beta.3


Re: Dgame revived

2015-03-15 Thread Foo via Digitalmars-d-announce
I think a tutorial on how to do tile map with sprites would be 
awesome


http://dgame-dev.de/?page=tutorialtut=tilemap


Re: Dgame revived

2015-03-15 Thread Namespace via Digitalmars-d-announce

On Friday, 13 March 2015 at 18:59:48 UTC, Namespace wrote:
I will merge the 0.5.0 branch this evening and tag a release 
candidate v0.5.0rc.

https://github.com/Dgame/Dgame/releases/tag/v0.5.0-beta.1


New Beta:
https://github.com/Dgame/Dgame/releases/tag/v0.5.0-beta.2

and two new Tutorials:
http://dgame-dev.de/?page=tutorialtut=gl_settings
http://dgame-dev.de/?page=tutorialtut=tilemap

I hope my english is not that bad.


Re: Dgame revived

2015-03-15 Thread Namespace via Digitalmars-d-announce

On Sunday, 15 March 2015 at 22:30:06 UTC, Joel wrote:

I've been getting these errors:

I found two places that have 'package(Dgame):' - 
source\Dgame\Graphic\Color.d(30) and 
source\Dgame\Math\Rect.d(44), and if I remove them (comment 
them out), then only one error remains:
Yeah, I've used a dmd 2.067 version. I will fix this tomorrow, so 
that Dgame is useable with dmd 2.066.



Compiling using dmd...
Error: cannot read file main.d
FAIL 
.dub\build\main-debug-windows-x86-dmd_2066-7A96EE8F0A68A2410292AA6D54ADEF4C

\ dgame-example executable
Error executing command run: dmd failed with exit code 1.

That error should be fixed now.

Keep up the good work!

Thanks!


Re: Dgame revived

2015-03-15 Thread Joel via Digitalmars-d-announce

I've been getting these errors:

I found two places that have 'package(Dgame):' - 
source\Dgame\Graphic\Color.d(30) and 
source\Dgame\Math\Rect.d(44), and if I remove them (comment them 
out), then only one error remains:


Compiling using dmd...
Error: cannot read file main.d
FAIL 
.dub\build\main-debug-windows-x86-dmd_2066-7A96EE8F0A68A2410292AA6D54ADEF4C

\ dgame-example executable
Error executing command run: dmd failed with exit code 1.

Keep up the good work!


Re: Dgame revived

2015-03-15 Thread Joel via Digitalmars-d-announce

On Sunday, 15 March 2015 at 22:51:17 UTC, Namespace wrote:

On Sunday, 15 March 2015 at 22:30:06 UTC, Joel wrote:

I've been getting these errors:

I found two places that have 'package(Dgame):' - 
source\Dgame\Graphic\Color.d(30) and 
source\Dgame\Math\Rect.d(44), and if I remove them (comment 
them out), then only one error remains:
Yeah, I've used a dmd 2.067 version. I will fix this tomorrow, 
so that Dgame is useable with dmd 2.066.



Compiling using dmd...
Error: cannot read file main.d
FAIL 
.dub\build\main-debug-windows-x86-dmd_2066-7A96EE8F0A68A2410292AA6D54ADEF4C

\ dgame-example executable
Error executing command run: dmd failed with exit code 1.

That error should be fixed now.


I still get this error. Or am I using the wrong zip file?


Keep up the good work!

Thanks!


Re: Dgame revived

2015-03-15 Thread amber via Digitalmars-d-announce

On Sunday, 15 March 2015 at 18:12:36 UTC, Namespace wrote:

On Friday, 13 March 2015 at 18:59:48 UTC, Namespace wrote:
I will merge the 0.5.0 branch this evening and tag a release 
candidate v0.5.0rc.

https://github.com/Dgame/Dgame/releases/tag/v0.5.0-beta.1


New Beta:
https://github.com/Dgame/Dgame/releases/tag/v0.5.0-beta.2

and two new Tutorials:
http://dgame-dev.de/?page=tutorialtut=gl_settings
http://dgame-dev.de/?page=tutorialtut=tilemap

I hope my english is not that bad.


This is great, thanks for the tilemap tute.

And as a non-native speaker myself I think your English is very 
good :)


bye,
amber



Re: Dgame revived

2015-03-14 Thread stewarth via Digitalmars-d-announce

On Saturday, 14 March 2015 at 15:19:20 UTC, Namespace wrote:

On Saturday, 14 March 2015 at 03:12:56 UTC, stewarth wrote:

On Friday, 13 March 2015 at 14:23:27 UTC, Namespace wrote:

On Friday, 13 March 2015 at 10:51:22 UTC, stewarth wrote:

On Friday, 13 March 2015 at 08:31:28 UTC, Namespace wrote:
The most of Dgame is ready, only the tutorials are missing 
to arrive to the release state.
Is there anything you wanted absolutely in Dgame? A module, 
a tutorial?
Since I removed the TileMap tutorial I may want to write an 
replacement how you could easily built one with Sprites. 
Any further ideas?


At the end of this month I wanted to participate on One 
game a month (http://www.onegameamonth.com/). Mainly with 
C++ but I think it would be a good test for Dgame, if I 
would programm some games with it. And it could be helpfull 
to get more attention on D.


Nice work :)

I just tried on Arch Linux x86_64  and it worked out of the 
box using dub.


Time to upgrade my Dgame projects !!

Thanks,
Stew


How many do you have?


Four in total, all half finished -- just the way I like them 
:-)


I do intend to finish them off, I just need to find more the 
time between work and sleep...


Cheers,
Stew


Even half finished, I would like to see them.
http://dgame-dev.de/?page=show is also called Work in Progress 
;)


When I get something to a state that I'm comfortable sharing I'll 
let you know.


The hardest part is the resources, graphics etc. My sprites are 
pretty  embarrassing :)



Cheers,
Stew


Re: Dgame revived

2015-03-14 Thread Namespace via Digitalmars-d-announce

On Saturday, 14 March 2015 at 03:12:56 UTC, stewarth wrote:

On Friday, 13 March 2015 at 14:23:27 UTC, Namespace wrote:

On Friday, 13 March 2015 at 10:51:22 UTC, stewarth wrote:

On Friday, 13 March 2015 at 08:31:28 UTC, Namespace wrote:
The most of Dgame is ready, only the tutorials are missing 
to arrive to the release state.
Is there anything you wanted absolutely in Dgame? A module, 
a tutorial?
Since I removed the TileMap tutorial I may want to write an 
replacement how you could easily built one with Sprites. Any 
further ideas?


At the end of this month I wanted to participate on One 
game a month (http://www.onegameamonth.com/). Mainly with 
C++ but I think it would be a good test for Dgame, if I 
would programm some games with it. And it could be helpfull 
to get more attention on D.


Nice work :)

I just tried on Arch Linux x86_64  and it worked out of the 
box using dub.


Time to upgrade my Dgame projects !!

Thanks,
Stew


How many do you have?


Four in total, all half finished -- just the way I like them :-)

I do intend to finish them off, I just need to find more the 
time between work and sleep...


Cheers,
Stew


Even half finished, I would like to see them.
http://dgame-dev.de/?page=show is also called Work in Progress ;)


Re: Dgame revived

2015-03-13 Thread Namespace via Digitalmars-d-announce

On Friday, 13 March 2015 at 08:31:28 UTC, Namespace wrote:
The most of Dgame is ready, only the tutorials are missing to 
arrive to the release state.

http://dgame-dev.de/?page=tutorial

I've worked the whole day to get them updated. Hopefully I don't 
missed something.
I will merge the 0.5.0 branch this evening and tag a release 
candidate v0.5.0rc. If someone wants to he can test Dgame 
extensive. If no complaints are made, I will release the 0.5.0 
version next friday.


Re: Dgame revived

2015-03-13 Thread Namespace via Digitalmars-d-announce
I will merge the 0.5.0 branch this evening and tag a release 
candidate v0.5.0rc.

https://github.com/Dgame/Dgame/releases/tag/v0.5.0-beta.1


Re: Dgame revived

2015-03-13 Thread stewarth via Digitalmars-d-announce

On Friday, 13 March 2015 at 14:23:27 UTC, Namespace wrote:

On Friday, 13 March 2015 at 10:51:22 UTC, stewarth wrote:

On Friday, 13 March 2015 at 08:31:28 UTC, Namespace wrote:
The most of Dgame is ready, only the tutorials are missing to 
arrive to the release state.
Is there anything you wanted absolutely in Dgame? A module, a 
tutorial?
Since I removed the TileMap tutorial I may want to write an 
replacement how you could easily built one with Sprites. Any 
further ideas?


At the end of this month I wanted to participate on One game 
a month (http://www.onegameamonth.com/). Mainly with C++ but 
I think it would be a good test for Dgame, if I would 
programm some games with it. And it could be helpfull to get 
more attention on D.


Nice work :)

I just tried on Arch Linux x86_64  and it worked out of the 
box using dub.


Time to upgrade my Dgame projects !!

Thanks,
Stew


How many do you have?


Four in total, all half finished -- just the way I like them :-)

I do intend to finish them off, I just need to find more the time 
between work and sleep...


Cheers,
Stew


Re: Dgame revived

2015-03-13 Thread Namespace via Digitalmars-d-announce
The most of Dgame is ready, only the tutorials are missing to 
arrive to the release state.
Is there anything you wanted absolutely in Dgame? A module, a 
tutorial?
Since I removed the TileMap tutorial I may want to write an 
replacement how you could easily built one with Sprites. Any 
further ideas?


At the end of this month I wanted to participate on One game a 
month (http://www.onegameamonth.com/). Mainly with C++ but I 
think it would be a good test for Dgame, if I would programm some 
games with it. And it could be helpfull to get more attention on 
D.


Re: Dgame revived

2015-03-13 Thread stewarth via Digitalmars-d-announce

On Friday, 13 March 2015 at 08:31:28 UTC, Namespace wrote:
The most of Dgame is ready, only the tutorials are missing to 
arrive to the release state.
Is there anything you wanted absolutely in Dgame? A module, a 
tutorial?
Since I removed the TileMap tutorial I may want to write an 
replacement how you could easily built one with Sprites. Any 
further ideas?


At the end of this month I wanted to participate on One game a 
month (http://www.onegameamonth.com/). Mainly with C++ but I 
think it would be a good test for Dgame, if I would programm 
some games with it. And it could be helpfull to get more 
attention on D.


Nice work :)

I just tried on Arch Linux x86_64  and it worked out of the box 
using dub.


Time to upgrade my Dgame projects !!

Thanks,
Stew


Re: Dgame revived

2015-03-13 Thread Namespace via Digitalmars-d-announce

On Friday, 13 March 2015 at 10:51:22 UTC, stewarth wrote:

On Friday, 13 March 2015 at 08:31:28 UTC, Namespace wrote:
The most of Dgame is ready, only the tutorials are missing to 
arrive to the release state.
Is there anything you wanted absolutely in Dgame? A module, a 
tutorial?
Since I removed the TileMap tutorial I may want to write an 
replacement how you could easily built one with Sprites. Any 
further ideas?


At the end of this month I wanted to participate on One game 
a month (http://www.onegameamonth.com/). Mainly with C++ but 
I think it would be a good test for Dgame, if I would programm 
some games with it. And it could be helpfull to get more 
attention on D.


Nice work :)

I just tried on Arch Linux x86_64  and it worked out of the box 
using dub.


Time to upgrade my Dgame projects !!

Thanks,
Stew


How many do you have?


Re: Dgame revived

2015-03-13 Thread Namespace via Digitalmars-d-announce

A TileMap with Sprites is pretty simple:

class Tile : Sprite {
// ... more features
}

Each Tile is stored on fixed points on the screen and represent 
the Tile-Image.


Forget to mention: This construct is not as fast as the old 
implementation which use a VertexBuffer, but it is more dynamic. 
E.G. if you have a game with destroyable Tiles this approach is 
much more common and suitable because it is easier and cheaper to 
nullify an Tile.


See also my last implementation in my unfinished game Quinn 
Quadrat:

https://github.com/Dgame/SDL-Game/blob/master/Tile.hpp
https://github.com/Dgame/SDL-Game/blob/master/Tile.cpp
https://github.com/Dgame/SDL-Game/blob/master/TileMap.hpp
https://github.com/Dgame/SDL-Game/blob/master/TileMap.cpp


Re: Dgame revived

2015-03-13 Thread Namespace via Digitalmars-d-announce

On Friday, 13 March 2015 at 10:34:50 UTC, amber wrote:

On Friday, 13 March 2015 at 08:31:28 UTC, Namespace wrote:
The most of Dgame is ready, only the tutorials are missing to 
arrive to the release state.
Is there anything you wanted absolutely in Dgame? A module, a 
tutorial?
Since I removed the TileMap tutorial I may want to write an 
replacement how you could easily built one with Sprites. Any 
further ideas?


At the end of this month I wanted to participate on One game 
a month (http://www.onegameamonth.com/). Mainly with C++ but 
I think it would be a good test for Dgame, if I would programm 
some games with it. And it could be helpfull to get more 
attention on D.


I think a tutorial on how to do tile map with sprites would be 
awesome and the one game a month would be a great way to stress 
test Dgame and find those missing features.

I think so too.

A TileMap with Sprites is pretty simple:

class Tile : Sprite {
// ... more features
}

Each Tile is stored on fixed points on the screen and represent 
the Tile-Image.


But maybe I will implement the old TileMap implementation again. 
;)

Let's see.

One feature that I think would be useful is a console to help 
with development and tweak settings at run time.
That's not possible in the near future. ;) Sorry. But an 
interesting idea.
Thanks for your work on Dgame. I'm going to switch over to the 
new version and give it a try :)

Glad to hear that!

bye,
amber




Re: Dgame revived

2015-03-04 Thread Namespace via Digitalmars-d-announce

On Tuesday, 3 March 2015 at 23:01:21 UTC, Gan wrote:
Oh also the green circle anti alias isn't happening. Just a 
plain un-anti-alis circle.


Should be fixed now. Note that you now must specify the 
anti-aliasing, when you create the window. And you can now 
specify by yourself which opengl context version should be 
supported. See:

http://dgame-dev.de/?package=Windowmodule=GLSettings


Re: Dgame revived

2015-03-04 Thread Gan via Digitalmars-d-announce

On Wednesday, 4 March 2015 at 09:24:55 UTC, Namespace wrote:

On Tuesday, 3 March 2015 at 23:01:21 UTC, Gan wrote:
Oh also the green circle anti alias isn't happening. Just a 
plain un-anti-alis circle.


Should be fixed now. Note that you now must specify the 
anti-aliasing, when you create the window. And you can now 
specify by yourself which opengl context version should be 
supported. See:

http://dgame-dev.de/?package=Windowmodule=GLSettings


Looks great. How do I use the new version in dub? Do I just set 
the dependency version to 0.5.0?


Re: Dgame revived

2015-03-04 Thread stewarth via Digitalmars-d-announce

On Wednesday, 4 March 2015 at 11:56:28 UTC, stewarth wrote:

On Wednesday, 4 March 2015 at 09:42:57 UTC, Gan wrote:

On Wednesday, 4 March 2015 at 09:24:55 UTC, Namespace wrote:

On Tuesday, 3 March 2015 at 23:01:21 UTC, Gan wrote:
Oh also the green circle anti alias isn't happening. Just a 
plain un-anti-alis circle.


Should be fixed now. Note that you now must specify the 
anti-aliasing, when you create the window. And you can now 
specify by yourself which opengl context version should be 
supported. See:

http://dgame-dev.de/?package=Windowmodule=GLSettings


Looks great. How do I use the new version in dub? Do I just 
set the dependency version to 0.5.0?


I think that because 0.5.0 is on a branch you will need to tell 
dub to switch branches. This is done with a '~' in the 
dependencies line. You also need to run dub upgrade.


Something like this (untested):

---
...
sourcePaths:[.],
dependencies: {
dgame:~0.5.0
},
targetType:executable
...

$ dub upgraade
$ dub build


Cheers,
stew


Sorry, cut-paste noise, the only interesting part is this:

dependencies: {
 dgame:~0.5.0
},


Re: Dgame revived

2015-03-04 Thread stewarth via Digitalmars-d-announce

On Wednesday, 4 March 2015 at 09:42:57 UTC, Gan wrote:

On Wednesday, 4 March 2015 at 09:24:55 UTC, Namespace wrote:

On Tuesday, 3 March 2015 at 23:01:21 UTC, Gan wrote:
Oh also the green circle anti alias isn't happening. Just a 
plain un-anti-alis circle.


Should be fixed now. Note that you now must specify the 
anti-aliasing, when you create the window. And you can now 
specify by yourself which opengl context version should be 
supported. See:

http://dgame-dev.de/?package=Windowmodule=GLSettings


Looks great. How do I use the new version in dub? Do I just set 
the dependency version to 0.5.0?


I think that because 0.5.0 is on a branch you will need to tell 
dub to switch branches. This is done with a '~' in the 
dependencies line. You also need to run dub upgrade.


Something like this (untested):

---
...
sourcePaths:[.],
dependencies: {
dgame:~0.5.0
},
targetType:executable
...

$ dub upgraade
$ dub build


Cheers,
stew


Re: Dgame revived

2015-03-04 Thread Namespace via Digitalmars-d-announce

Do I just set the dependency version to 0.5.0?


Yes that should work.


Re: Dgame revived

2015-03-03 Thread Namespace via Digitalmars-d-announce

On Sunday, 1 March 2015 at 10:00:35 UTC, Namespace wrote:

On Sunday, 1 March 2015 at 00:10:22 UTC, stewarth wrote:

On Saturday, 28 February 2015 at 22:52:47 UTC, Namespace wrote:
On Saturday, 28 February 2015 at 11:02:31 UTC, Namespace 
wrote:
Next step is Font, Text and Spritesheet. Then I'll inspect 
Clock, Power and MessageBox and in the end I'll inspect 
Audio. I think the most breaking changes will happen here, 
because I'll use this time SDL_Audio instead of OpenAL.


Font, Text, Clock (renamed to StopWatch) and Power (renamed 
to Battery) were also ported. The Audio package also. 
Spritesheet should be redundant now, because Sprite has now 
a clipRect, to support the Spritesheet behaviour.


What is left: add missing comments / complete comments and 
renew the documentation. After that I will update the 
website.


We are moving forward! :)


Comments are finished so far - the documentation can be 
generated.
I've also begun to update the website and to update the 
tutorials, but I need at least a whole day to get ready. So 
I'll be ready in mid-March at the latest - because the next 
week I have to learn for my exams completely again.

But you can already begin with your tests. ;)


Thank you for updating Dgame so quickly. I'll give it a test 
later this week and report any issues on github.


Cheers,
stew


Forget to mention: until aldacron fixed DerelictSDL2 
(https://github.com/DerelictOrg/DerelictSDL2/issues/39) you 
have to manually annotate the makros and functions with @nogc. 
Maybe you should wait, until aldacron fixes this.


The most things are fixed now. But should I organize Dgame like 
the official DUB style: 'source/Dgame/...'?


Re: Dgame revived

2015-03-03 Thread Namespace via Digitalmars-d-announce
Looks good. Except for the text. It gets longer over time. I 
added an issue.


That should be fixed with the last commit.


Re: Dgame revived

2015-03-03 Thread Gan via Digitalmars-d-announce
Oh also the green circle anti alias isn't happening. Just a plain 
un-anti-alis circle.


Re: Dgame revived

2015-03-03 Thread Gan via Digitalmars-d-announce

On Tuesday, 3 March 2015 at 16:59:35 UTC, Namespace wrote:

On Sunday, 1 March 2015 at 10:00:35 UTC, Namespace wrote:

On Sunday, 1 March 2015 at 00:10:22 UTC, stewarth wrote:
On Saturday, 28 February 2015 at 22:52:47 UTC, Namespace 
wrote:
On Saturday, 28 February 2015 at 11:02:31 UTC, Namespace 
wrote:
Next step is Font, Text and Spritesheet. Then I'll inspect 
Clock, Power and MessageBox and in the end I'll inspect 
Audio. I think the most breaking changes will happen here, 
because I'll use this time SDL_Audio instead of OpenAL.


Font, Text, Clock (renamed to StopWatch) and Power (renamed 
to Battery) were also ported. The Audio package also. 
Spritesheet should be redundant now, because Sprite has now 
a clipRect, to support the Spritesheet behaviour.


What is left: add missing comments / complete comments and 
renew the documentation. After that I will update the 
website.


We are moving forward! :)


Comments are finished so far - the documentation can be 
generated.
I've also begun to update the website and to update the 
tutorials, but I need at least a whole day to get ready. So 
I'll be ready in mid-March at the latest - because the next 
week I have to learn for my exams completely again.

But you can already begin with your tests. ;)


Thank you for updating Dgame so quickly. I'll give it a test 
later this week and report any issues on github.


Cheers,
stew


Forget to mention: until aldacron fixed DerelictSDL2 
(https://github.com/DerelictOrg/DerelictSDL2/issues/39) you 
have to manually annotate the makros and functions with @nogc. 
Maybe you should wait, until aldacron fixes this.


The most things are fixed now. But should I organize Dgame like 
the official DUB style: 'source/Dgame/...'?


I have no idea.

Looks good. Except for the text. It gets longer over time. I 
added an issue.


Re: Dgame revived

2015-03-01 Thread Namespace via Digitalmars-d-announce

On Sunday, 1 March 2015 at 00:10:22 UTC, stewarth wrote:

On Saturday, 28 February 2015 at 22:52:47 UTC, Namespace wrote:

On Saturday, 28 February 2015 at 11:02:31 UTC, Namespace wrote:
Next step is Font, Text and Spritesheet. Then I'll inspect 
Clock, Power and MessageBox and in the end I'll inspect 
Audio. I think the most breaking changes will happen here, 
because I'll use this time SDL_Audio instead of OpenAL.


Font, Text, Clock (renamed to StopWatch) and Power (renamed 
to Battery) were also ported. The Audio package also. 
Spritesheet should be redundant now, because Sprite has now a 
clipRect, to support the Spritesheet behaviour.


What is left: add missing comments / complete comments and 
renew the documentation. After that I will update the website.


We are moving forward! :)


Comments are finished so far - the documentation can be 
generated.
I've also begun to update the website and to update the 
tutorials, but I need at least a whole day to get ready. So 
I'll be ready in mid-March at the latest - because the next 
week I have to learn for my exams completely again.

But you can already begin with your tests. ;)


Thank you for updating Dgame so quickly. I'll give it a test 
later this week and report any issues on github.


Cheers,
stew


Forget to mention: until aldacron fixed DerelictSDL2 
(https://github.com/DerelictOrg/DerelictSDL2/issues/39) you have 
to manually annotate the makros and functions with @nogc. Maybe 
you should wait, until aldacron fixes this.


Re: Dgame revived

2015-02-28 Thread Namespace via Digitalmars-d-announce
Next step is Font, Text and Spritesheet. Then I'll inspect 
Clock, Power and MessageBox and in the end I'll inspect Audio. 
I think the most breaking changes will happen here, because 
I'll use this time SDL_Audio instead of OpenAL.


Font, Text, Clock (renamed to StopWatch) and Power (renamed to 
Battery) were also ported. The Audio package also. Spritesheet 
should be redundant now, because Sprite has now a clipRect, to 
support the Spritesheet behaviour.


What is left: add missing comments / complete comments and renew 
the documentation. After that I will update the website.


We are moving forward! :)


Re: Dgame revived

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

On Saturday, 28 February 2015 at 12:22:46 UTC, Gan wrote:

On Saturday, 28 February 2015 at 11:02:31 UTC, Namespace wrote:
Next step is Font, Text and Spritesheet. Then I'll inspect 
Clock, Power and MessageBox and in the end I'll inspect 
Audio. I think the most breaking changes will happen here, 
because I'll use this time SDL_Audio instead of OpenAL.


Font, Text, Clock (renamed to StopWatch) and Power (renamed to 
Battery) were also ported. The Audio package also. Spritesheet 
should be redundant now, because Sprite has now a clipRect, to 
support the Spritesheet behaviour.


What is left: add missing comments / complete comments and 
renew the documentation. After that I will update the website.


We are moving forward! :)


This is exciting. I'll test my space background in DGame to 
compare performance to SFML. If it's favorable, I'm immediately 
switching.


That's great. It would be nice if you post the differences here. 
:)


Re: Dgame revived

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

On Saturday, 28 February 2015 at 11:02:31 UTC, Namespace wrote:
Next step is Font, Text and Spritesheet. Then I'll inspect 
Clock, Power and MessageBox and in the end I'll inspect Audio. 
I think the most breaking changes will happen here, because 
I'll use this time SDL_Audio instead of OpenAL.


Font, Text, Clock (renamed to StopWatch) and Power (renamed to 
Battery) were also ported. The Audio package also. Spritesheet 
should be redundant now, because Sprite has now a clipRect, to 
support the Spritesheet behaviour.


What is left: add missing comments / complete comments and 
renew the documentation. After that I will update the website.


We are moving forward! :)


This is exciting. I'll test my space background in DGame to 
compare performance to SFML. If it's favorable, I'm immediately 
switching.


Re: Dgame revived

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

On Saturday, 28 February 2015 at 11:02:31 UTC, Namespace wrote:
Next step is Font, Text and Spritesheet. Then I'll inspect 
Clock, Power and MessageBox and in the end I'll inspect Audio. 
I think the most breaking changes will happen here, because 
I'll use this time SDL_Audio instead of OpenAL.


Font, Text, Clock (renamed to StopWatch) and Power (renamed to 
Battery) were also ported. The Audio package also. Spritesheet 
should be redundant now, because Sprite has now a clipRect, to 
support the Spritesheet behaviour.


What is left: add missing comments / complete comments and 
renew the documentation. After that I will update the website.


We are moving forward! :)


Comments are finished so far - the documentation can be generated.
I've also begun to update the website and to update the 
tutorials, but I need at least a whole day to get ready. So I'll 
be ready in mid-March at the latest - because the next week I 
have to learn for my exams completely again.

But you can already begin with your tests. ;)


Re: Dgame revived

2015-02-28 Thread stewarth via Digitalmars-d-announce

On Saturday, 28 February 2015 at 22:52:47 UTC, Namespace wrote:

On Saturday, 28 February 2015 at 11:02:31 UTC, Namespace wrote:
Next step is Font, Text and Spritesheet. Then I'll inspect 
Clock, Power and MessageBox and in the end I'll inspect 
Audio. I think the most breaking changes will happen here, 
because I'll use this time SDL_Audio instead of OpenAL.


Font, Text, Clock (renamed to StopWatch) and Power (renamed to 
Battery) were also ported. The Audio package also. Spritesheet 
should be redundant now, because Sprite has now a clipRect, to 
support the Spritesheet behaviour.


What is left: add missing comments / complete comments and 
renew the documentation. After that I will update the website.


We are moving forward! :)


Comments are finished so far - the documentation can be 
generated.
I've also begun to update the website and to update the 
tutorials, but I need at least a whole day to get ready. So 
I'll be ready in mid-March at the latest - because the next 
week I have to learn for my exams completely again.

But you can already begin with your tests. ;)


Thank you for updating Dgame so quickly. I'll give it a test 
later this week and report any issues on github.


Cheers,
stew


Re: Dgame revived

2015-02-27 Thread amber via Digitalmars-d-announce

On Thursday, 26 February 2015 at 22:27:12 UTC, Namespace wrote:

On Thursday, 26 February 2015 at 22:09:33 UTC, stewarth wrote:

On Thursday, 26 February 2015 at 20:43:20 UTC, Namespace wrote:

I've just pushed the current state of the 0.5.0 version:
https://github.com/Dgame/Dgame/tree/0.5.0

It's far from finished but it works. So if anyone has 
requests, wishes or suggestions: now is the time. :)


That's great :)


At the moment my small test apps don't build due to missing 
features such as Audio, System.Clock etc. I assume these will 
be added as work progresses?



No, only the tests in test/main.d are working currently.
But it's possible, that Dgame 0.5.0 will break some things.
E.g. The static make methods in Shape and Surface were 
converted into CTor calls and I guess that I will abandon Image 
and TileMap.


Next step is Font, Text and Spritesheet. Then I'll inspect 
Clock, Power and MessageBox and in the end I'll inspect Audio. 
I think the most breaking changes will happen here, because 
I'll use this time SDL_Audio instead of OpenAL.


I'll do some testing over the weekend with what's in place on 
the 0.5.0 branch and submit bug reports if I find anything.


Cheers,
Stew


Thanks, that would be great!


Hey, I'm using tilemap :P

I guess a separate project for tilemaps built on Dgame would be 
cool. I might look into this during the semester break.


One thing that would be cool is some sort of support for 2D 
physics. It's probably outside Dgame scope but as a separate 
project that keeps a consistent API with Dgame would be nice. 
Kind of like the way SDL, SDL_image, SDL_ttf all do.


Cool, two new projects for me to look into when I should be 
studying :)



Thanks,
amber



Re: Dgame revived

2015-02-27 Thread John Colvin via Digitalmars-d-announce

On Thursday, 26 February 2015 at 02:22:18 UTC, stewarth wrote:

On Wednesday, 25 February 2015 at 15:36:21 UTC, Gan wrote:

On Tuesday, 24 February 2015 at 22:03:29 UTC, stewarth wrote:

On Tuesday, 24 February 2015 at 21:10:53 UTC, Gan wrote:

On Tuesday, 24 February 2015 at 21:07:04 UTC, stewarth wrote:

On Tuesday, 24 February 2015 at 19:32:08 UTC, Gan wrote:
On Tuesday, 24 February 2015 at 16:28:59 UTC, Namespace 
wrote:
I had to force dub to upgrade in order for it to pull 
the latest code from the master branch.


But on the plus side it runs.

On the downside it still only displays a blank white 
screen for Mac users.


As growlercab pointed out 
(https://github.com/Dgame/Dgame/pull/29), I think also 
that you should set the Version to 3.2 rather than 3.0. 
Could you give it a try and say if that works for you?


No dice. Running the shapes tutorial again, just a blank 
screen. Console output looks good though:

init openAL
Derelict loaded GL version: GL33 (GL33), available GL 
version: 3.3 INTEL-10.0.22

Quit Event
Finalize Sound (0)
 Sound Finalized
Text: Finalize Font
Font finalized
Close open Windows.
Open Windows closed.
Finalize Texture (0)
 Texture Finalized
quit sdl


Did you try commenting out the line that sets the forward 
compatibility flag as well?

(sorry it isn't clear from the posts)

if (style  Style.OpenGL) {
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);
*/
}

This fixed a similar issue for me on Linux.

Cheers,
stew


Yeah I did that, doesn't show anything but a blank white 
screen.


OK, thanks for letting me know.


Is there anything more I can test to try to get it working on 
Mac?


Also anyone else have a Mac to test on? I wanna make sure it's 
not just me getting the blank white screen.


Without a MAC I am just guessing, but my next steps would be 
along the lines of:


1. The venerable printf binary search bug hunt approach :)

Check glGetError, which you can turn the error into a string 
with GLU as follows:


---
void reportGLErrors() {
GLenum errCode;
const GLubyte *errString;
if ((errCode = glGetError()) != GL_NO_ERROR)
{
errString = gluErrorString(errCode);
writeln(errString.fromStringz)
}
// UNTESTED!!
}
---


This module should work as a standalone with a few tiny import 
changes: 
https://github.com/Dav1dde/glamour/blob/master/glamour/util.d


The interesting bit is checkgl, used for example like this:

checkgl!glDrawArrays(GL_POINTS, 0, 10);

then you get a nice debug message if glDrawArrays reports an 
error. It will also report if a previous error has occurred and 
wasn't cleared, but of course in that case it won't be able to 
tell you where.


I wrap every OpenGL call with checkgl, it helps immensely.


Re: Dgame revived

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

Hey, I'm using tilemap :P

I guess a separate project for tilemaps built on Dgame would be 
cool. I might look into this during the semester break.


It's very easy to build a TileMap if you use Sprites. So I don't 
see (currently) any use case of the TileMap module.


One thing that would be cool is some sort of support for 2D 
physics. It's probably outside Dgame scope but as a separate 
project that keeps a consistent API with Dgame would be nice. 
Kind of like the way SDL, SDL_image, SDL_ttf all do.


Yeah, that would be nice and usefull for future games. :)

Cool, two new projects for me to look into when I should be 
studying :)



Thanks,
amber




Re: Dgame revived

2015-02-27 Thread Namespace via Digitalmars-d-announce
This module should work as a standalone with a few tiny import 
changes: 
https://github.com/Dav1dde/glamour/blob/master/glamour/util.d


The interesting bit is checkgl, used for example like this:

checkgl!glDrawArrays(GL_POINTS, 0, 10);

then you get a nice debug message if glDrawArrays reports an 
error. It will also report if a previous error has occurred and 
wasn't cleared, but of course in that case it won't be able to 
tell you where.


I wrap every OpenGL call with checkgl, it helps immensely.


Yes, I will do so in the future too.


Re: Dgame revived

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

I've just pushed the current state of the 0.5.0 version:
https://github.com/Dgame/Dgame/tree/0.5.0

It's far from finished but it works. So if anyone has requests, 
wishes or suggestions: now is the time. :)


Re: Dgame revived

2015-02-26 Thread stewarth via Digitalmars-d-announce

On Thursday, 26 February 2015 at 08:03:59 UTC, Gan wrote:

On Thursday, 26 February 2015 at 06:33:26 UTC, Gan wrote:

On Thursday, 26 February 2015 at 06:32:07 UTC, Gan wrote:

On Thursday, 26 February 2015 at 03:17:32 UTC, stewarth wrote:
On Thursday, 26 February 2015 at 03:01:42 UTC, Rikki 
Cattermole wrote:

On 26/02/2015 3:57 p.m., Gan wrote:
On Thursday, 26 February 2015 at 02:32:51 UTC, stewarth 
wrote:



I'd also try hacking in Window.d directly to see if even 
basic gl
commands work, e.g. immediately after window and context 
creation, try
rendering a triangle then tweak the context 
initialisation to see if

it affects anything.

It may help you track down exactly which part of the GL 
setup is

causing problems.

Cheers,
Stew


I know almost nothing about OpenGL but using your 
method(sorta):

void reportGLErrors() {
GLenum errCode;
const GLubyte *errString;
if ((errCode = glGetError()) != GL_NO_ERROR)
{
writeln(OPEN GL ERROR: , errCode);
}
}

I get error code 1282 repeatedly.

From a google search someone says:
First, glGetError() will return 1282 - invalid operation 
if the GL
context is not current (or not yet created). So, create 
your context
first, then call glGetError. And, verify that any parent 
class or member
class does not call GL functions in their constructors or 
prior to

context being created.

Can someone with more OpenGL knowledge clarify what this 
means?


1. Program starts
2. Window gets created
3. Context gets created
4. Context is activated
5. Profit???

Basically before the context is created and activated you 
cannot call any OpenGL functions. If you do, they will 
error out.


The bit about constructors ext. don't worry about it. Its 
just about e.g. where the calls to OpenGL can exist.


Yes, my bad sorry, but whatever works. The point is dive in 
and start printfing about in Window.d, checking error codes 
to try and figure out where things become stuffed up.



Cheers,
Stew


I did what you suggested. I added a bunch of writeln and 
reportGLErrors. These are the results:

glMatrixMode(GL_PROJECTION);
OPEN GL ERROR: 1282



glLoadIdentity();
OPEN GL ERROR: 1282



glShadeModel(GL_FLAT);
OPEN GL ERROR: 1282


glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST);
OPEN GL ERROR: 1280


glHint(GL_GENERATE_MIPMAP_HINT, GL_FASTEST);
OPEN GL ERROR: 1280


glOrtho(0, vMode.width, vMode.height, 0, 1, -1);
OPEN GL ERROR: 1282


Each error happens after each line is called. I'm not sure 
why this happens or what it means.


According to docs: 1280 is GL_INVALID_ENUM


Figured it out. DGame wants OpenGL 3.0+ context. However it 
uses some functions in OpenGL 2.1 that have been depreciated. 
The mac OpenGL doesn't allow depreciated functions.


DGame's OpenGL code is too outdated to run on a 3.0+ GL context 
on mac.


Required fix: Either lower the context to 2.1 or upgrade the 
code to not use depreciated functions.


Great job, well done :)

It's never easy debugging those sorts of errors.

/stew





Re: Dgame revived

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

On Thursday, 26 February 2015 at 06:33:26 UTC, Gan wrote:

On Thursday, 26 February 2015 at 06:32:07 UTC, Gan wrote:

On Thursday, 26 February 2015 at 03:17:32 UTC, stewarth wrote:
On Thursday, 26 February 2015 at 03:01:42 UTC, Rikki 
Cattermole wrote:

On 26/02/2015 3:57 p.m., Gan wrote:
On Thursday, 26 February 2015 at 02:32:51 UTC, stewarth 
wrote:



I'd also try hacking in Window.d directly to see if even 
basic gl
commands work, e.g. immediately after window and context 
creation, try
rendering a triangle then tweak the context initialisation 
to see if

it affects anything.

It may help you track down exactly which part of the GL 
setup is

causing problems.

Cheers,
Stew


I know almost nothing about OpenGL but using your 
method(sorta):

void reportGLErrors() {
 GLenum errCode;
 const GLubyte *errString;
 if ((errCode = glGetError()) != GL_NO_ERROR)
 {
 writeln(OPEN GL ERROR: , errCode);
 }
}

I get error code 1282 repeatedly.

From a google search someone says:
First, glGetError() will return 1282 - invalid operation 
if the GL
context is not current (or not yet created). So, create 
your context
first, then call glGetError. And, verify that any parent 
class or member
class does not call GL functions in their constructors or 
prior to

context being created.

Can someone with more OpenGL knowledge clarify what this 
means?


1. Program starts
2. Window gets created
3. Context gets created
4. Context is activated
5. Profit???

Basically before the context is created and activated you 
cannot call any OpenGL functions. If you do, they will error 
out.


The bit about constructors ext. don't worry about it. Its 
just about e.g. where the calls to OpenGL can exist.


Yes, my bad sorry, but whatever works. The point is dive in 
and start printfing about in Window.d, checking error codes 
to try and figure out where things become stuffed up.



Cheers,
Stew


I did what you suggested. I added a bunch of writeln and 
reportGLErrors. These are the results:

glMatrixMode(GL_PROJECTION);
OPEN GL ERROR: 1282



glLoadIdentity();
OPEN GL ERROR: 1282



glShadeModel(GL_FLAT);
OPEN GL ERROR: 1282


glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST);
OPEN GL ERROR: 1280


glHint(GL_GENERATE_MIPMAP_HINT, GL_FASTEST);
OPEN GL ERROR: 1280


glOrtho(0, vMode.width, vMode.height, 0, 1, -1);
OPEN GL ERROR: 1282


Each error happens after each line is called. I'm not sure why 
this happens or what it means.


According to docs: 1280 is GL_INVALID_ENUM


Figured it out. DGame wants OpenGL 3.0+ context. However it uses 
some functions in OpenGL 2.1 that have been depreciated. The mac 
OpenGL doesn't allow depreciated functions.


DGame's OpenGL code is too outdated to run on a 3.0+ GL context 
on mac.


Required fix: Either lower the context to 2.1 or upgrade the code 
to not use depreciated functions.


Re: Dgame revived

2015-02-26 Thread Namespace via Digitalmars-d-announce
Figured it out. DGame wants OpenGL 3.0+ context. However it 
uses some functions in OpenGL 2.1 that have been depreciated. 
The mac OpenGL doesn't allow depreciated functions.


DGame's OpenGL code is too outdated to run on a 3.0+ GL context 
on mac.


Required fix: Either lower the context to 2.1 or upgrade the 
code to not use depreciated functions.


Ah, indeed. I use some outdated constants and opengl functions. 
But I believe I'm using also functions which need OpenGL 3.0. 
Could you try to reduce the OpenGL Version to 2.1 and test it 
again?


Re: Dgame revived

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

On Thursday, 26 February 2015 at 08:19:30 UTC, Namespace wrote:
Figured it out. DGame wants OpenGL 3.0+ context. However it 
uses some functions in OpenGL 2.1 that have been depreciated. 
The mac OpenGL doesn't allow depreciated functions.


DGame's OpenGL code is too outdated to run on a 3.0+ GL 
context on mac.


Required fix: Either lower the context to 2.1 or upgrade the 
code to not use depreciated functions.


Ah, indeed. I use some outdated constants and opengl functions. 
But I believe I'm using also functions which need OpenGL 3.0. 
Could you try to reduce the OpenGL Version to 2.1 and test it 
again?


Wouldaya look at that, it works. http://cl.ly/image/0Z000U0m1i3U

I wonder what features are broken.


Re: Dgame revived

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

On Thursday, 26 February 2015 at 08:35:12 UTC, Gan wrote:

On Thursday, 26 February 2015 at 08:19:30 UTC, Namespace wrote:
Figured it out. DGame wants OpenGL 3.0+ context. However it 
uses some functions in OpenGL 2.1 that have been depreciated. 
The mac OpenGL doesn't allow depreciated functions.


DGame's OpenGL code is too outdated to run on a 3.0+ GL 
context on mac.


Required fix: Either lower the context to 2.1 or upgrade the 
code to not use depreciated functions.


Ah, indeed. I use some outdated constants and opengl 
functions. But I believe I'm using also functions which need 
OpenGL 3.0. Could you try to reduce the OpenGL Version to 2.1 
and test it again?


Wouldaya look at that, it works. http://cl.ly/image/0Z000U0m1i3U

I wonder what features are broken.


It would be very kind of you, if you figure it out. Try 
everything you can, all tutorials. If nothing is broken, I will 
supply a fix for OSX where I put the OpenGL version to 2.1.


Re: Dgame revived

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

On Thursday, 26 February 2015 at 22:09:33 UTC, stewarth wrote:

On Thursday, 26 February 2015 at 20:43:20 UTC, Namespace wrote:

I've just pushed the current state of the 0.5.0 version:
https://github.com/Dgame/Dgame/tree/0.5.0

It's far from finished but it works. So if anyone has 
requests, wishes or suggestions: now is the time. :)


That's great :)


At the moment my small test apps don't build due to missing 
features such as Audio, System.Clock etc. I assume these will 
be added as work progresses?



No, only the tests in test/main.d are working currently.
But it's possible, that Dgame 0.5.0 will break some things.
E.g. The static make methods in Shape and Surface were converted 
into CTor calls and I guess that I will abandon Image and TileMap.


Next step is Font, Text and Spritesheet. Then I'll inspect Clock, 
Power and MessageBox and in the end I'll inspect Audio. I think 
the most breaking changes will happen here, because I'll use this 
time SDL_Audio instead of OpenAL.


I'll do some testing over the weekend with what's in place on 
the 0.5.0 branch and submit bug reports if I find anything.


Cheers,
Stew


Thanks, that would be great!


Re: Dgame revived

2015-02-26 Thread stewarth via Digitalmars-d-announce

On Thursday, 26 February 2015 at 20:43:20 UTC, Namespace wrote:

I've just pushed the current state of the 0.5.0 version:
https://github.com/Dgame/Dgame/tree/0.5.0

It's far from finished but it works. So if anyone has requests, 
wishes or suggestions: now is the time. :)


That's great :)


At the moment my small test apps don't build due to missing 
features such as Audio, System.Clock etc. I assume these will be 
added as work progresses?


I'll do some testing over the weekend with what's in place on the 
0.5.0 branch and submit bug reports if I find anything.


Cheers,
Stew






Re: Dgame revived

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

On Tuesday, 24 February 2015 at 22:03:29 UTC, stewarth wrote:

On Tuesday, 24 February 2015 at 21:10:53 UTC, Gan wrote:

On Tuesday, 24 February 2015 at 21:07:04 UTC, stewarth wrote:

On Tuesday, 24 February 2015 at 19:32:08 UTC, Gan wrote:
On Tuesday, 24 February 2015 at 16:28:59 UTC, Namespace 
wrote:
I had to force dub to upgrade in order for it to pull the 
latest code from the master branch.


But on the plus side it runs.

On the downside it still only displays a blank white 
screen for Mac users.


As growlercab pointed out 
(https://github.com/Dgame/Dgame/pull/29), I think also that 
you should set the Version to 3.2 rather than 3.0. Could 
you give it a try and say if that works for you?


No dice. Running the shapes tutorial again, just a blank 
screen. Console output looks good though:

init openAL
Derelict loaded GL version: GL33 (GL33), available GL 
version: 3.3 INTEL-10.0.22

Quit Event
Finalize Sound (0)
 Sound Finalized
Text: Finalize Font
Font finalized
Close open Windows.
Open Windows closed.
Finalize Texture (0)
 Texture Finalized
quit sdl


Did you try commenting out the line that sets the forward 
compatibility flag as well?

(sorry it isn't clear from the posts)

if (style  Style.OpenGL) {
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);
*/
}

This fixed a similar issue for me on Linux.

Cheers,
stew


Yeah I did that, doesn't show anything but a blank white 
screen.


OK, thanks for letting me know.


Is there anything more I can test to try to get it working on Mac?

Also anyone else have a Mac to test on? I wanna make sure it's 
not just me getting the blank white screen.


Re: Dgame revived

2015-02-25 Thread Namespace via Digitalmars-d-announce
Is there anything more I can test to try to get it working on 
Mac?


No, sorry, currently I have no clue what's wrong. :/

Also anyone else have a Mac to test on? I wanna make sure it's 
not just me getting the blank white screen.




Re: Dgame revived

2015-02-25 Thread stewarth via Digitalmars-d-announce
On Thursday, 26 February 2015 at 03:01:42 UTC, Rikki Cattermole 
wrote:

On 26/02/2015 3:57 p.m., Gan wrote:

On Thursday, 26 February 2015 at 02:32:51 UTC, stewarth wrote:



I'd also try hacking in Window.d directly to see if even 
basic gl
commands work, e.g. immediately after window and context 
creation, try
rendering a triangle then tweak the context initialisation to 
see if

it affects anything.

It may help you track down exactly which part of the GL setup 
is

causing problems.

Cheers,
Stew


I know almost nothing about OpenGL but using your 
method(sorta):

void reportGLErrors() {
GLenum errCode;
const GLubyte *errString;
if ((errCode = glGetError()) != GL_NO_ERROR)
{
writeln(OPEN GL ERROR: , errCode);
}
}

I get error code 1282 repeatedly.

From a google search someone says:
First, glGetError() will return 1282 - invalid operation if 
the GL
context is not current (or not yet created). So, create your 
context
first, then call glGetError. And, verify that any parent class 
or member
class does not call GL functions in their constructors or 
prior to

context being created.

Can someone with more OpenGL knowledge clarify what this means?


1. Program starts
2. Window gets created
3. Context gets created
4. Context is activated
5. Profit???

Basically before the context is created and activated you 
cannot call any OpenGL functions. If you do, they will error 
out.


The bit about constructors ext. don't worry about it. Its just 
about e.g. where the calls to OpenGL can exist.


Yes, my bad sorry, but whatever works. The point is dive in and 
start printfing about in Window.d, checking error codes to try 
and figure out where things become stuffed up.



Cheers,
Stew


Re: Dgame revived

2015-02-25 Thread stewarth via Digitalmars-d-announce

On Wednesday, 25 February 2015 at 15:36:21 UTC, Gan wrote:

On Tuesday, 24 February 2015 at 22:03:29 UTC, stewarth wrote:

On Tuesday, 24 February 2015 at 21:10:53 UTC, Gan wrote:

On Tuesday, 24 February 2015 at 21:07:04 UTC, stewarth wrote:

On Tuesday, 24 February 2015 at 19:32:08 UTC, Gan wrote:
On Tuesday, 24 February 2015 at 16:28:59 UTC, Namespace 
wrote:
I had to force dub to upgrade in order for it to pull the 
latest code from the master branch.


But on the plus side it runs.

On the downside it still only displays a blank white 
screen for Mac users.


As growlercab pointed out 
(https://github.com/Dgame/Dgame/pull/29), I think also 
that you should set the Version to 3.2 rather than 3.0. 
Could you give it a try and say if that works for you?


No dice. Running the shapes tutorial again, just a blank 
screen. Console output looks good though:

init openAL
Derelict loaded GL version: GL33 (GL33), available GL 
version: 3.3 INTEL-10.0.22

Quit Event
Finalize Sound (0)
 Sound Finalized
Text: Finalize Font
Font finalized
Close open Windows.
Open Windows closed.
Finalize Texture (0)
 Texture Finalized
quit sdl


Did you try commenting out the line that sets the forward 
compatibility flag as well?

(sorry it isn't clear from the posts)

if (style  Style.OpenGL) {
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);
*/
}

This fixed a similar issue for me on Linux.

Cheers,
stew


Yeah I did that, doesn't show anything but a blank white 
screen.


OK, thanks for letting me know.


Is there anything more I can test to try to get it working on 
Mac?


Also anyone else have a Mac to test on? I wanna make sure it's 
not just me getting the blank white screen.


Without a MAC I am just guessing, but my next steps would be 
along the lines of:


1. The venerable printf binary search bug hunt approach :)

Check glGetError, which you can turn the error into a string with 
GLU as follows:


---
void reportGLErrors() {
GLenum errCode;
const GLubyte *errString;
if ((errCode = glGetError()) != GL_NO_ERROR)
{
errString = gluErrorString(errCode);
writeln(errString.fromStringz)
}
// UNTESTED!!
}
---

I'd start the search in $Dgame/Window/Window.d before and after 
SDL_CreateWindow, SDL_GL_CreateContext and SDL_GL_MakeCurrent 
then go from there.


2. If printf didn't help I'd look at using a GL debug tool

From this page: https://www.opengl.org/wiki/Debugging_Tools

XCode tools
Under Mac OS X, Apple provides two very handy tools for 
debugging OpenGL applications as part of XCode: OpenGL Driver 
Monitor and OpenGL Profiler.


If these are anything like AMDs CodeXL (previously gDEBugger) 
they should tell you what GL errors are occurring each frame and 
on which call (including in shaders).



Depending on your style you may want to swap order of the above :)

Cheers,
Stew


Re: Dgame revived

2015-02-25 Thread stewarth via Digitalmars-d-announce



I'd also try hacking in Window.d directly to see if even basic gl 
commands work, e.g. immediately after window and context 
creation, try rendering a triangle then tweak the context 
initialisation to see if it affects anything.


It may help you track down exactly which part of the GL setup is 
causing problems.


Cheers,
Stew


Re: Dgame revived

2015-02-25 Thread Rikki Cattermole via Digitalmars-d-announce

On 26/02/2015 3:57 p.m., Gan wrote:

On Thursday, 26 February 2015 at 02:32:51 UTC, stewarth wrote:



I'd also try hacking in Window.d directly to see if even basic gl
commands work, e.g. immediately after window and context creation, try
rendering a triangle then tweak the context initialisation to see if
it affects anything.

It may help you track down exactly which part of the GL setup is
causing problems.

Cheers,
Stew


I know almost nothing about OpenGL but using your method(sorta):
void reportGLErrors() {
 GLenum errCode;
 const GLubyte *errString;
 if ((errCode = glGetError()) != GL_NO_ERROR)
 {
 writeln(OPEN GL ERROR: , errCode);
 }
}

I get error code 1282 repeatedly.

 From a google search someone says:
First, glGetError() will return 1282 - invalid operation if the GL
context is not current (or not yet created). So, create your context
first, then call glGetError. And, verify that any parent class or member
class does not call GL functions in their constructors or prior to
context being created.

Can someone with more OpenGL knowledge clarify what this means?


1. Program starts
2. Window gets created
3. Context gets created
4. Context is activated
5. Profit???

Basically before the context is created and activated you cannot call 
any OpenGL functions. If you do, they will error out.


The bit about constructors ext. don't worry about it. Its just about 
e.g. where the calls to OpenGL can exist.


Re: Dgame revived

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

On Thursday, 26 February 2015 at 02:32:51 UTC, stewarth wrote:



I'd also try hacking in Window.d directly to see if even basic 
gl commands work, e.g. immediately after window and context 
creation, try rendering a triangle then tweak the context 
initialisation to see if it affects anything.


It may help you track down exactly which part of the GL setup 
is causing problems.


Cheers,
Stew


I know almost nothing about OpenGL but using your method(sorta):
void reportGLErrors() {
GLenum errCode;
const GLubyte *errString;
if ((errCode = glGetError()) != GL_NO_ERROR)
{
writeln(OPEN GL ERROR: , errCode);
}
}

I get error code 1282 repeatedly.

From a google search someone says:
First, glGetError() will return 1282 - invalid operation if the 
GL context is not current (or not yet created). So, create your 
context first, then call glGetError. And, verify that any parent 
class or member class does not call GL functions in their 
constructors or prior to context being created.


Can someone with more OpenGL knowledge clarify what this means?


Re: Dgame revived

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

On Thursday, 26 February 2015 at 03:17:32 UTC, stewarth wrote:
On Thursday, 26 February 2015 at 03:01:42 UTC, Rikki Cattermole 
wrote:

On 26/02/2015 3:57 p.m., Gan wrote:

On Thursday, 26 February 2015 at 02:32:51 UTC, stewarth wrote:



I'd also try hacking in Window.d directly to see if even 
basic gl
commands work, e.g. immediately after window and context 
creation, try
rendering a triangle then tweak the context initialisation 
to see if

it affects anything.

It may help you track down exactly which part of the GL 
setup is

causing problems.

Cheers,
Stew


I know almost nothing about OpenGL but using your 
method(sorta):

void reportGLErrors() {
   GLenum errCode;
   const GLubyte *errString;
   if ((errCode = glGetError()) != GL_NO_ERROR)
   {
   writeln(OPEN GL ERROR: , errCode);
   }
}

I get error code 1282 repeatedly.

From a google search someone says:
First, glGetError() will return 1282 - invalid operation if 
the GL
context is not current (or not yet created). So, create your 
context
first, then call glGetError. And, verify that any parent 
class or member
class does not call GL functions in their constructors or 
prior to

context being created.

Can someone with more OpenGL knowledge clarify what this 
means?


1. Program starts
2. Window gets created
3. Context gets created
4. Context is activated
5. Profit???

Basically before the context is created and activated you 
cannot call any OpenGL functions. If you do, they will error 
out.


The bit about constructors ext. don't worry about it. Its just 
about e.g. where the calls to OpenGL can exist.


Yes, my bad sorry, but whatever works. The point is dive in and 
start printfing about in Window.d, checking error codes to try 
and figure out where things become stuffed up.



Cheers,
Stew


I did what you suggested. I added a bunch of writeln and 
reportGLErrors. These are the results:

glMatrixMode(GL_PROJECTION);
OPEN GL ERROR: 1282



glLoadIdentity();
OPEN GL ERROR: 1282



glShadeModel(GL_FLAT);
OPEN GL ERROR: 1282


glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST);
OPEN GL ERROR: 1280


glHint(GL_GENERATE_MIPMAP_HINT, GL_FASTEST);
OPEN GL ERROR: 1280


glOrtho(0, vMode.width, vMode.height, 0, 1, -1);
OPEN GL ERROR: 1282


Each error happens after each line is called. I'm not sure why 
this happens or what it means.


Re: Dgame revived

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

On Thursday, 26 February 2015 at 06:32:07 UTC, Gan wrote:

On Thursday, 26 February 2015 at 03:17:32 UTC, stewarth wrote:
On Thursday, 26 February 2015 at 03:01:42 UTC, Rikki 
Cattermole wrote:

On 26/02/2015 3:57 p.m., Gan wrote:
On Thursday, 26 February 2015 at 02:32:51 UTC, stewarth 
wrote:



I'd also try hacking in Window.d directly to see if even 
basic gl
commands work, e.g. immediately after window and context 
creation, try
rendering a triangle then tweak the context initialisation 
to see if

it affects anything.

It may help you track down exactly which part of the GL 
setup is

causing problems.

Cheers,
Stew


I know almost nothing about OpenGL but using your 
method(sorta):

void reportGLErrors() {
  GLenum errCode;
  const GLubyte *errString;
  if ((errCode = glGetError()) != GL_NO_ERROR)
  {
  writeln(OPEN GL ERROR: , errCode);
  }
}

I get error code 1282 repeatedly.

From a google search someone says:
First, glGetError() will return 1282 - invalid operation if 
the GL
context is not current (or not yet created). So, create your 
context
first, then call glGetError. And, verify that any parent 
class or member
class does not call GL functions in their constructors or 
prior to

context being created.

Can someone with more OpenGL knowledge clarify what this 
means?


1. Program starts
2. Window gets created
3. Context gets created
4. Context is activated
5. Profit???

Basically before the context is created and activated you 
cannot call any OpenGL functions. If you do, they will error 
out.


The bit about constructors ext. don't worry about it. Its 
just about e.g. where the calls to OpenGL can exist.


Yes, my bad sorry, but whatever works. The point is dive in 
and start printfing about in Window.d, checking error codes to 
try and figure out where things become stuffed up.



Cheers,
Stew


I did what you suggested. I added a bunch of writeln and 
reportGLErrors. These are the results:

glMatrixMode(GL_PROJECTION);
OPEN GL ERROR: 1282



glLoadIdentity();
OPEN GL ERROR: 1282



glShadeModel(GL_FLAT);
OPEN GL ERROR: 1282


glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST);
OPEN GL ERROR: 1280


glHint(GL_GENERATE_MIPMAP_HINT, GL_FASTEST);
OPEN GL ERROR: 1280


glOrtho(0, vMode.width, vMode.height, 0, 1, -1);
OPEN GL ERROR: 1282


Each error happens after each line is called. I'm not sure why 
this happens or what it means.


According to docs: 1280 is GL_INVALID_ENUM


Re: Dgame revived

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

On Tuesday, 24 February 2015 at 09:07:19 UTC, Namespace wrote:

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.


You sound a little rude. :D
I thought that must precede the GLContext. That made the most 
sense to me. I will change it. ;)


It semms there is a problem with ma DUB package:

Branch ~beta: Got JSON of type undefined, expected object.
Branch ~tune: Got JSON of type undefined, expected object.


I deleted these branches, drafted a new tag and tried to trigger 
a manual update, but nothing happens.


Re: Dgame revived

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

On Tuesday, 24 February 2015 at 09:56:56 UTC, Gan wrote:

On Tuesday, 24 February 2015 at 09:24:17 UTC, Namespace wrote:

On Tuesday, 24 February 2015 at 09:07:19 UTC, Namespace wrote:
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.


You sound a little rude. :D
I thought that must precede the GLContext. That made the most 
sense to me. I will change it. ;)


It semms there is a problem with ma DUB package:

Branch ~beta: Got JSON of type undefined, expected object.
Branch ~tune: Got JSON of type undefined, expected object.


I deleted these branches, drafted a new tag and tried to 
trigger a manual update, but nothing happens.


I had to force dub to upgrade in order for it to pull the 
latest code from the master branch.


But on the plus side it runs.

On the downside it still only displays a blank white screen for 
Mac users.


Yeah, that is really strange. For all tutorials?

I have already started on the weekend to begin Dgame 0.5 and 
revise the whole. So that's at least a glimmer of hope.


Re: Dgame revived

2015-02-24 Thread Namespace 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.


You sound a little rude. :D
I thought that must precede the GLContext. That made the most 
sense to me. I will change it. ;)


Re: Dgame revived

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

On Tuesday, 24 February 2015 at 09:24:17 UTC, Namespace wrote:

On Tuesday, 24 February 2015 at 09:07:19 UTC, Namespace wrote:
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.


You sound a little rude. :D
I thought that must precede the GLContext. That made the most 
sense to me. I will change it. ;)


It semms there is a problem with ma DUB package:

Branch ~beta: Got JSON of type undefined, expected object.
Branch ~tune: Got JSON of type undefined, expected object.


I deleted these branches, drafted a new tag and tried to 
trigger a manual update, but nothing happens.


I had to force dub to upgrade in order for it to pull the latest 
code from the master branch.


But on the plus side it runs.

On the downside it still only displays a blank white screen for 
Mac users.


Re: Dgame revived

2015-02-24 Thread stewarth via Digitalmars-d-announce

On Tuesday, 24 February 2015 at 10:01:11 UTC, Namespace wrote:

On Tuesday, 24 February 2015 at 09:56:56 UTC, Gan wrote:

On Tuesday, 24 February 2015 at 09:24:17 UTC, Namespace wrote:

On Tuesday, 24 February 2015 at 09:07:19 UTC, Namespace wrote:
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.


You sound a little rude. :D
I thought that must precede the GLContext. That made the 
most sense to me. I will change it. ;)


It semms there is a problem with ma DUB package:

Branch ~beta: Got JSON of type undefined, expected object.
Branch ~tune: Got JSON of type undefined, expected object.


I deleted these branches, drafted a new tag and tried to 
trigger a manual update, but nothing happens.


I had to force dub to upgrade in order for it to pull the 
latest code from the master branch.


But on the plus side it runs.

On the downside it still only displays a blank white screen 
for Mac users.


Yeah, that is really strange. For all tutorials?

I have already started on the weekend to begin Dgame 0.5 and 
revise the whole. So that's at least a glimmer of hope.


Try commenting out this line:

SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, 
SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG)


According to the opengl.org wiki this flag should not be used 
except in GL 3.0 and was made redundant in GL 3.1. The code 
snippet above is trying to set MAJOR.MINOR as GL 3.3.


I just had an issue on Linux with a blank screen. Commenting out 
this line resolved the issue.


Cheers,
stew


Re: Dgame revived

2015-02-24 Thread Namespace via Digitalmars-d-announce
I had to force dub to upgrade in order for it to pull the 
latest code from the master branch.


But on the plus side it runs.

On the downside it still only displays a blank white screen for 
Mac users.


As growlercab pointed out 
(https://github.com/Dgame/Dgame/pull/29), I think also that you 
should set the Version to 3.2 rather than 3.0. Could you give it 
a try and say if that works for you?


Re: Dgame revived

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

Try commenting out this line:

SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, 
SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG)


According to the opengl.org wiki this flag should not be used 
except in GL 3.0 and was made redundant in GL 3.1. The code 
snippet above is trying to set MAJOR.MINOR as GL 3.3.


I just had an issue on Linux with a blank screen. Commenting 
out this line resolved the issue.


Cheers,
stew


Many Thanks. I didn't even know that.


Re: Dgame revived

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

On Tuesday, 24 February 2015 at 16:28:59 UTC, Namespace wrote:
I had to force dub to upgrade in order for it to pull the 
latest code from the master branch.


But on the plus side it runs.

On the downside it still only displays a blank white screen 
for Mac users.


As growlercab pointed out 
(https://github.com/Dgame/Dgame/pull/29), I think also that you 
should set the Version to 3.2 rather than 3.0. Could you give 
it a try and say if that works for you?


No dice. Running the shapes tutorial again, just a blank screen. 
Console output looks good though:

init openAL
Derelict loaded GL version: GL33 (GL33), available GL version: 
3.3 INTEL-10.0.22

Quit Event
Finalize Sound (0)
  Sound Finalized
Text: Finalize Font
Font finalized
Close open Windows.
Open Windows closed.
Finalize Texture (0)
  Texture Finalized
quit sdl


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: 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 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 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.


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 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-22 Thread Namespace via Digitalmars-d-announce

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.


Re: Dgame revived

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

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.


Re: Dgame revived

2015-02-22 Thread Jack via Digitalmars-d-announce

On Sunday, 22 February 2015 at 05:43:19 UTC, Gan wrote:

On Sunday, 22 February 2015 at 01:56:59 UTC, amber wrote:

On Saturday, 21 February 2015 at 14:43:57 UTC, Namespace wrote:
Today I registered Dgame on DUB. Since I do not currently 
have much time (I'm currently in my exams period) I hope I 
did everything right. Let me know if not and what could be 
improved.


Since I left D a while ago, Dgame was also not maintained, 
but thanks to your demand I will maintain Dgame again. The 
current goal is to register Dgame successful on DUB. The next 
goal would be to adapt the webpage and the installation 
chapter and to re-register the domain dgame.dev.de
After that (and after my hopefully successful exams) I will 
rebuild Dgame from scratch with the goal of a more consistent 
and better structure and with the idea in mind to use @nogc 
wherever possible.


Cool, thanks for Dgame.


I can't seem to build a program with just the main method with 
DGame on DUB.

Error:
Building: game (Default)
Performing main compilation...
/usr/local/bin/dub build game --build=debug
Building package spacecraft in /Users/Matt/DGame Test/
Package dsfml can be installed with version ~master.
Package dgame can be upgraded from ~master to 0.4.0.
Use dub upgrade to perform those changes.
WARNING: A deprecated branch based version specification is 
used for the dependency dgame. Please use numbered versions 
instead. Also note that you can still use the 
dub.selections.json file to override a certain dependency to 
use a branch instead.
Building derelict-util 1.9.1 configuration library, build 
type debug.

Running dmd...
Error: unrecognized switch '-version=0.4.0'
FAIL 
../.dub/packages/derelict-util-1.9.1/.dub/build/library-debug-posix.osx-x86_64-dmd_2066-E0DFCC872C8A9F5E0383C82BBC088A37/ 
DerelictUtil staticLibrary

Error executing command build: dmd failed with exit code 1.

Exit code 2
Build complete -- 1 error, 0 warnings

-- Done --

Build: 1 error, 0 warnings



dub.json:
{
name: game,
description: game,
dependencies:
{
dgame: ~master
}
}


Having this problem too.

dub.json:
{
name: game,
description: game,
dependencies: {
dgame: ~0.4.0
}
}




Re: Dgame revived

2015-02-22 Thread amber via Digitalmars-d-announce

On Sunday, 22 February 2015 at 08:26:16 UTC, Jack wrote:

On Sunday, 22 February 2015 at 05:43:19 UTC, Gan wrote:

On Sunday, 22 February 2015 at 01:56:59 UTC, amber wrote:
On Saturday, 21 February 2015 at 14:43:57 UTC, Namespace 
wrote:
Today I registered Dgame on DUB. Since I do not currently 
have much time (I'm currently in my exams period) I hope I 
did everything right. Let me know if not and what could be 
improved.


Since I left D a while ago, Dgame was also not maintained, 
but thanks to your demand I will maintain Dgame again. The 
current goal is to register Dgame successful on DUB. The 
next goal would be to adapt the webpage and the installation 
chapter and to re-register the domain dgame.dev.de
After that (and after my hopefully successful exams) I will 
rebuild Dgame from scratch with the goal of a more 
consistent and better structure and with the idea in mind to 
use @nogc wherever possible.


Cool, thanks for Dgame.


I can't seem to build a program with just the main method with 
DGame on DUB.

Error:
Building: game (Default)
Performing main compilation...
/usr/local/bin/dub build game --build=debug
Building package spacecraft in /Users/Matt/DGame Test/
Package dsfml can be installed with version ~master.
Package dgame can be upgraded from ~master to 0.4.0.
Use dub upgrade to perform those changes.
WARNING: A deprecated branch based version specification is 
used for the dependency dgame. Please use numbered versions 
instead. Also note that you can still use the 
dub.selections.json file to override a certain dependency to 
use a branch instead.
Building derelict-util 1.9.1 configuration library, build 
type debug.

Running dmd...
Error: unrecognized switch '-version=0.4.0'
FAIL 
../.dub/packages/derelict-util-1.9.1/.dub/build/library-debug-posix.osx-x86_64-dmd_2066-E0DFCC872C8A9F5E0383C82BBC088A37/ 
DerelictUtil staticLibrary

Error executing command build: dmd failed with exit code 1.

Exit code 2
Build complete -- 1 error, 0 warnings

-- Done --

Build: 1 error, 0 warnings



dub.json:
{
   name: game,
   description: game,
   dependencies:
   {
   dgame: ~master
   }
}


Having this problem too.

dub.json:
{
name: game,
description: game,
dependencies: {
dgame: ~0.4.0
}
}


I tried to post this earlier but it didn't go through for some 
reason...


I had the same problem and went to github to report the issue but 
it's already there with a PR pending. It's a one-line fix. so I 
manually copied what the PR does and it is now working for me.


I had to edit the dub.json file in the Dgame package (under 
~/.dub/packages) and remove the versions:[0.4.0] line. Saved 
the file and rebuilt my own app. All good :)


/amber


Re: Dgame revived

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

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.


Re: Dgame revived

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

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.


Re: Dgame revived

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

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...


Re: Dgame revived

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

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...


That sounds strange. Have you already tried to update the 
libraries?

BTW: The domain is back in action: http://dgame-dev.de/
But I still need to update the installations chapter.


Re: Dgame revived

2015-02-22 Thread John Colvin via Digitalmars-d-announce

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.


Re: Dgame revived

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

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.


This sounds similar: 
http://stackoverflow.com/questions/5294295/how-to-do-opengl-3-programming-on-os-x-with-a-geforce-9400
I'm sorry, in my next upgrade I will use GLEW, that should solve 
the problem. Maybe I can start the upgrade before end of march.


Re: Dgame revived

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

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?


Re: Dgame revived

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

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.


Re: Dgame revived

2015-02-22 Thread amber via Digitalmars-d-announce

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



Re: Dgame revived

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


Re: Dgame revived

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


Re: Dgame revived

2015-02-22 Thread Rikki Cattermole via Digitalmars-d-announce

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.


Re: Dgame revived

2015-02-22 Thread Rikki Cattermole via Digitalmars-d-announce

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.


Re: Dgame revived

2015-02-22 Thread stewarth via Digitalmars-d-announce

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


Re: Dgame revived

2015-02-22 Thread stewarth via Digitalmars-d-announce

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


Re: Dgame revived

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


Re: Dgame revived

2015-02-21 Thread uri via Digitalmars-d-announce

On Saturday, 21 February 2015 at 14:43:57 UTC, Namespace wrote:
Today I registered Dgame on DUB. Since I do not currently have 
much time (I'm currently in my exams period) I hope I did 
everything right. Let me know if not and what could be improved.


Since I left D a while ago, Dgame was also not maintained, but 
thanks to your demand I will maintain Dgame again. The current 
goal is to register Dgame successful on DUB. The next goal 
would be to adapt the webpage and the installation chapter and 
to re-register the domain dgame.dev.de
After that (and after my hopefully successful exams) I will 
rebuild Dgame from scratch with the goal of a more consistent 
and better structure and with the idea in mind to use @nogc 
wherever possible.


Great news, thanks heaps :-)


Re: Dgame revived

2015-02-21 Thread amber via Digitalmars-d-announce

On Saturday, 21 February 2015 at 14:43:57 UTC, Namespace wrote:
Today I registered Dgame on DUB. Since I do not currently have 
much time (I'm currently in my exams period) I hope I did 
everything right. Let me know if not and what could be improved.


Since I left D a while ago, Dgame was also not maintained, but 
thanks to your demand I will maintain Dgame again. The current 
goal is to register Dgame successful on DUB. The next goal 
would be to adapt the webpage and the installation chapter and 
to re-register the domain dgame.dev.de
After that (and after my hopefully successful exams) I will 
rebuild Dgame from scratch with the goal of a more consistent 
and better structure and with the idea in mind to use @nogc 
wherever possible.


Cool, thanks for Dgame.


Re: Dgame revived

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

On Sunday, 22 February 2015 at 01:56:59 UTC, amber wrote:

On Saturday, 21 February 2015 at 14:43:57 UTC, Namespace wrote:
Today I registered Dgame on DUB. Since I do not currently have 
much time (I'm currently in my exams period) I hope I did 
everything right. Let me know if not and what could be 
improved.


Since I left D a while ago, Dgame was also not maintained, but 
thanks to your demand I will maintain Dgame again. The current 
goal is to register Dgame successful on DUB. The next goal 
would be to adapt the webpage and the installation chapter and 
to re-register the domain dgame.dev.de
After that (and after my hopefully successful exams) I will 
rebuild Dgame from scratch with the goal of a more consistent 
and better structure and with the idea in mind to use @nogc 
wherever possible.


Cool, thanks for Dgame.


I can't seem to build a program with just the main method with 
DGame on DUB.

Error:
Building: game (Default)
Performing main compilation...
/usr/local/bin/dub build game --build=debug
Building package spacecraft in /Users/Matt/DGame Test/
Package dsfml can be installed with version ~master.
Package dgame can be upgraded from ~master to 0.4.0.
Use dub upgrade to perform those changes.
WARNING: A deprecated branch based version specification is used 
for the dependency dgame. Please use numbered versions instead. 
Also note that you can still use the dub.selections.json file to 
override a certain dependency to use a branch instead.
Building derelict-util 1.9.1 configuration library, build type 
debug.

Running dmd...
Error: unrecognized switch '-version=0.4.0'
FAIL 
../.dub/packages/derelict-util-1.9.1/.dub/build/library-debug-posix.osx-x86_64-dmd_2066-E0DFCC872C8A9F5E0383C82BBC088A37/ 
DerelictUtil staticLibrary

Error executing command build: dmd failed with exit code 1.

Exit code 2
Build complete -- 1 error, 0 warnings

-- Done --

Build: 1 error, 0 warnings



dub.json:
{
name: game,
description: game,
dependencies:
{
dgame: ~master
}
}


Dgame revived

2015-02-21 Thread Namespace via Digitalmars-d-announce
Today I registered Dgame on DUB. Since I do not currently have 
much time (I'm currently in my exams period) I hope I did 
everything right. Let me know if not and what could be improved.


Since I left D a while ago, Dgame was also not maintained, but 
thanks to your demand I will maintain Dgame again. The current 
goal is to register Dgame successful on DUB. The next goal would 
be to adapt the webpage and the installation chapter and to 
re-register the domain dgame.dev.de
After that (and after my hopefully successful exams) I will 
rebuild Dgame from scratch with the goal of a more consistent and 
better structure and with the idea in mind to use @nogc wherever 
possible.


Re: Dgame revived

2015-02-21 Thread Kingsley via Digitalmars-d-announce

On Saturday, 21 February 2015 at 14:43:57 UTC, Namespace wrote:
Today I registered Dgame on DUB. Since I do not currently have 
much time (I'm currently in my exams period) I hope I did 
everything right. Let me know if not and what could be improved.


Since I left D a while ago, Dgame was also not maintained, but 
thanks to your demand I will maintain Dgame again. The current 
goal is to register Dgame successful on DUB. The next goal 
would be to adapt the webpage and the installation chapter and 
to re-register the domain dgame.dev.de
After that (and after my hopefully successful exams) I will 
rebuild Dgame from scratch with the goal of a more consistent 
and better structure and with the idea in mind to use @nogc 
wherever possible.


Awesome!! great news :)