Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


#Actualglu

Posted 31 March 2013 - 10:07 AM

Hey, I have no clue why this is such a huge problem, it should be extremely easy to fix, but I've spent hours looking on how to simply change the window from 0, 0 being the center and 1, 1 being the max to whatever I want, or in this case, the window width, and height. I have tried using glOrtho, and gluOrtho2D, but when I do, I get a black screen, nothing works.


This code SHOULD draw a perfect line across the screen, but doesn't do anything


gluOrtho2D(0, 800, 600, 0); //This is the code messing up, when I remove it, I get an imperfect line, but a line none the less.

glBegin(GL_LINE_STRIP);
glVertex2i(0, 0);
glVertex2i(800, 600);
glEnd();

#2glu

Posted 31 March 2013 - 10:07 AM

Hey, I have no clue why this is such a huge problem, it should be extremely easy to fix, but I've spent hours looking on how to simply change the window from 0, 0 being the center and 1, 1 being the max to whatever I want, or in this case, the window width, and height. I have tried using glOrtho, and gluOrtho2D, but when I do, I get a black screen, nothing works.


This code SHOULD draw a perfect line across the screen, but doesn't do anything


gluOrtho2D(0, 800, 600, 0); //This is the code messing up, when I remove it, I get an imperfect line, but a line none the less.

glBegin(GL_LINE_STRIP);
glVertex2i(0, 0);
glVertex2i(800, 600);
glEnd();

#1glu

Posted 31 March 2013 - 10:06 AM

Hey, I have no clue why this is such a huge problem, it should be extremely easy to fix, but I've spent hours looking on how to simply change the window from 0, 0 being the center and 1, 1 being the max to whatever I want, or in this case, the window width, and height. I have tried using glOrtho, and gluOrtho2D, but when I do, I get a black screen, nothing works. This code SHOULD draw a perfect line across the screen, but doesn't do anything gluOrtho2D(0, 800, 600, 0); //This is the code messing up, when I remove it, I get an imperfect line, but a line none the less. glBegin(GL_LINE_STRIP); glVertex2i(0, 0); glVertex2i(800, 600); glEnd();

PARTNERS