Re: Dgame revived
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=Window&module=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
Oh also the green circle anti alias isn't happening. Just a plain un-anti-alis circle.
Re: Dgame revived
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
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
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
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
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
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
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
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
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.
Re: Dgame revived
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
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
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
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
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
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
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
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
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
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.
Re: Dgame revived
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
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" } }
Re: DlangUI
On Saturday, 14 June 2014 at 19:40:58 UTC, Jim Hewes wrote: Very nice, thanks. I'm looking forward to trying it out when I can find the time. I'm not a big fan of bindings/wrappers. Jim This is looks fantastic. I tried the demo but I get an error: SDL_GL_CreateContext failed: Failed creating OpenGL context Running Mac OS 10.10.2 on 2011 Macbook Pro