Jump to content
  • Advertisement
Sign in to follow this  
Zmurf

Best rendering mode for a top down RPG

This topic is 4612 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Should I use glOrtho for making a top down rpg? Or would it be better to use the normal gl rendering mode.

Share this post


Link to post
Share on other sites
Advertisement
If you are making a 2D game I would suggest you use the following functions to set 2D mode:

void glEnable2D()
{
int vPort[4];

glGetIntegerv(GL_VIEWPORT, vPort);

glMatrixMode(GL_PROJECTION);
glPushMatrix();
glLoadIdentity();

glOrtho(0, vPort[2], 0, vPort[3], -1, 1);
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glLoadIdentity();
}

void glDisable2D()
{
glMatrixMode(GL_PROJECTION);
glPopMatrix();
glMatrixMode(GL_MODELVIEW);
glPopMatrix();
}




I got these from someone on these boards, though I've forgotten who...

Share this post


Link to post
Share on other sites
Quote:
Original post by Tera_Dragon
I got these from someone on these boards, though I've forgotten who...

I believe this is what you are looking for. Never hurts to pay homage to a nice post!

@Zmurf, if you ask me for an opinion as the user, I think rpg's look good with a nice 3D perspective (but that's just my view of it, you should go with your instincts [smile]).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!