Re: DerelictGL program draw nothing

2012-09-04 Thread Zhenya
On Tuesday, 4 September 2012 at 16:17:30 UTC, Ivan Agafonov wrote: On Tuesday, 4 September 2012 at 07:32:47 UTC, Zhenya wrote: But why it doesn't convert uint to int correctly? I dont know, small positive uint and int must have the same binary representation, and no need to conversion. Strang

Re: DerelictGL program draw nothing

2012-09-04 Thread Ivan Agafonov
On Tuesday, 4 September 2012 at 07:32:47 UTC, Zhenya wrote: But why it doesn't convert uint to int correctly? I dont know, small positive uint and int must have the same binary representation, and no need to conversion. Strangely... O! May be problem is here: glOrtho(-width,width,-height,hei

Re: DerelictGL program draw nothing

2012-09-04 Thread Zhenya
But why it doesn't convert uint to int correctly?

Re: DerelictGL program draw nothing

2012-09-03 Thread Zhenya
On Monday, 3 September 2012 at 18:47:25 UTC, Ivan Agafonov wrote: On Monday, 3 September 2012 at 15:21:59 UTC, Zhenya wrote: Why this simple program don't show white square? import std.stdio; import derelict.opengl3.gl; import derelict.glfw3.glfw3; const uint width = 200; const uint height =

Re: DerelictGL program draw nothing

2012-09-03 Thread Ivan Agafonov
On Monday, 3 September 2012 at 15:21:59 UTC, Zhenya wrote: Why this simple program don't show white square? import std.stdio; import derelict.opengl3.gl; import derelict.glfw3.glfw3; const uint width = 200; const uint height = 200; void init() { glViewport(0,0,width,height); g

Re: DerelictGL program draw nothing

2012-09-03 Thread cal
On Monday, 3 September 2012 at 17:16:54 UTC, Zhenya wrote: I added it to this code,but nothing changed( Its a puzzler then, FWIW the following code works for me (I don't use GLFW, I have my own window routines, but the opengl-specific calls are the same). Window("window1", WindowState(0,0,2

Re: DerelictGL program draw nothing

2012-09-03 Thread Zhenya
On Monday, 3 September 2012 at 17:12:04 UTC, cal wrote: On Monday, 3 September 2012 at 17:08:55 UTC, cal wrote: On Monday, 3 September 2012 at 17:02:46 UTC, Zhenya wrote: that dosn't work How large is your window? glViewport(0,0,width,height); should really be setting to the window size - s

Re: DerelictGL program draw nothing

2012-09-03 Thread cal
On Monday, 3 September 2012 at 17:08:55 UTC, cal wrote: On Monday, 3 September 2012 at 17:02:46 UTC, Zhenya wrote: that dosn't work How large is your window? glViewport(0,0,width,height); should really be setting to the window size - so if you make your window 800,800, this should be glVi

Re: DerelictGL program draw nothing

2012-09-03 Thread cal
On Monday, 3 September 2012 at 17:02:46 UTC, Zhenya wrote: that dosn't work How large is your window? glViewport(0,0,width,height); should really be setting to the window size - so if you make your window 800,800, this should be glViewport(0,0,800,800);

Re: DerelictGL program draw nothing

2012-09-03 Thread Zhenya
On Monday, 3 September 2012 at 16:57:08 UTC, cal wrote: On Monday, 3 September 2012 at 15:21:59 UTC, Zhenya wrote: Why this simple program don't show white square? void display() { glClear(GL_COLOR_BUFFER_BIT); glBegin(GL_POLYGON); glVertex2d(0,0);

Re: DerelictGL program draw nothing

2012-09-03 Thread cal
On Monday, 3 September 2012 at 15:21:59 UTC, Zhenya wrote: Why this simple program don't show white square? void display() { glClear(GL_COLOR_BUFFER_BIT); glBegin(GL_POLYGON); glVertex2d(0,0); glVertex2d(0,height); glVertex2d(width,h

DerelictGL program draw nothing

2012-09-03 Thread Zhenya
Why this simple program don't show white square? import std.stdio; import derelict.opengl3.gl; import derelict.glfw3.glfw3; const uint width = 200; const uint height = 200; void init() { glViewport(0,0,width,height); glMatrixMode(GL_PROJECTION); glLoadIdentity();