viewing problem...

Hi,

I’ve currently created a map in openGL, but for some reason it always appears to be slightly slanted. Does anyone know why could this happen?

Here’s a sample of my initialising code.

 
void MainGLCanvas::doInit() {
	glEnable(GL_TEXTURE_2D);
	LoadGLTextures();
	glEnable(GL_DEPTH_TEST);
	glMatrixMode(GL_PROJECTION);		
	glLoadIdentity();									// Reset The Projection Matrix	
	glClearColor(1.0,1.0,1.0,0.0);
	glMatrixMode( GL_MODELVIEW );
	glLoadIdentity();
		
} 

After this part:
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
I guess you want to specify a view volume. Isn’t it?I can not see any functions to set the view volume in your code–gluPerspective, glOrtho,etc .
-Ehsan-

Hi,

I’ve tried using glOrtho(xmin, xmax, ymin, ymax), however my 2D map is still slanted. Any help would be very much appreciated. thanks