Sign in to follow this  
Zmurf

Best rendering mode for a top down RPG

Recommended Posts

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this