Re: DlangUI

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

On Wednesday, 25 February 2015 at 08:08:35 UTC, Suliman wrote:
Maybe it would be better to support yaml config instead of 
json? At least they have support of comments.

http://forum.rejectedsoftware.com/groups/rejectedsoftware.dub/thread/2/
afaik DUB will switch to yaml too soon.


dub will switch to sdl, not yaml (actually not switch but support 
both json and sdl)


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

2015-02-25 Thread Meta via Digitalmars-d-announce
On Wednesday, 25 February 2015 at 06:11:29 UTC, Vadim Lopatin 
wrote:

Upgrade dependencies:

dub upgrade --force-remove


Ah yes, that does it. Thank you.


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


DCD v0.5.1: Objectively disoriented

2015-02-25 Thread Brian Schott via Digitalmars-d-announce

https://github.com/Hackerpilot/DCD
https://github.com/Hackerpilot/DCD/releases/tag/v0.5.1

v0.5.1 contains several bug fixes for autocompletion involving 
classes.

* #195: Display call tips for `super` and `this`
* #196: Autocompletion on `super` doesn't work
* #197: DCD shows invalid constructor call tips

As a reminder: the D.announce mailing list is not a bug tracker. 
If I've broken something, please file an issue here: 
https://github.com/Hackerpilot/DCD/issues


Re: DlangUI

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

On Wednesday, 25 February 2015 at 08:08:35 UTC, Suliman wrote:
Maybe it would be better to support yaml config instead of 
json? At least they have support of comments.

http://forum.rejectedsoftware.com/groups/rejectedsoftware.dub/thread/2/
afaik DUB will switch to yaml too soon.


Just tested your Tetris example. Very good. I really hope the IDE 
will be part of the D toolchain one day.


Re: DlangUI

2015-02-25 Thread Suliman via Digitalmars-d-announce
Maybe it would be better to support yaml config instead of json? 
At least they have support of comments.

http://forum.rejectedsoftware.com/groups/rejectedsoftware.dub/thread/2/
afaik DUB will switch to yaml too soon.