Archived

This topic is now archived and is closed to further replies.

Codejoy

gluOrtho2d question.

Recommended Posts

So I want to make this game, its mostly a 3d game on a strictly 2d plane. Would I use gluOrtho2d to set up my viewport? Is this how NeHe did his joust 3d game? (actually that is exactly the same t ype of look I want for my game is how he did the joust 3d stuff) any ideas if NeHe will release that joust 3d source code? Any help is appreciated. Thanks. Shane p.s. I know its sorta a general question, sorry, its just i know where i want to go with it but i need to know how to start it, and it seems that most the tuts (aside from GridLines) are not close to what I need. Thanks

Share this post


Link to post
Share on other sites
well, you''ll first want to set to viewport with glViewport(). then you can use gluOrtho2D or glOrtho. will do the same thing, only in gluOrtho2D the minz and maxz are by default set to -1 and 1. beyond that you just use it like this:
gluOrtho2D(0,width,0,height);

glOrtho is like this:
glOrtho(0,width,height,0,zmin,zmax);


Never underestimante the power of stupid people in large groups.

Share this post


Link to post
Share on other sites