February 24, 2015
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
February 24, 2015
> 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.
February 24, 2015
> 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?
February 24, 2015
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
February 24, 2015
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
February 24, 2015
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.
February 24, 2015
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.


February 25, 2015
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.
February 25, 2015
> 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.

February 26, 2015
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