Hello =) iam trying to make a view of an object in 2d, the problem is that i cant get the view math to work… i want to put the x=o and the y=0 values on the top-left corner of the screen, my code is:
void ReSizeGLScene(int Width, int Height)
{
if (Height==0)
Height=1;
glViewport(0, 0, Width, Height);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
//gluPerspective(45.0f,(GLfloat)Width/(GLfloat)Height,0.1f,100.0f);
gluOrtho2D(0,(GLdouble)Width,0,(GLdouble)Height);
glMatrixMode(GL_MODELVIEW);
}
i think the values at gluOrtho2D are ok but i cant see the object, if i use the gluPerspective i can! Iam running under mandrake 9.0 linux but i think theres nothing to do with it.
Does any one know the problem?
Thanks =)
hellox from PT