Skip to main content
gamedev.net
🔒 Locked

rotate fbo

Started by mike4 Feb 25, 2012 at 1:01 PM 0 replies 1.1k views
Original Post
mike4
mike4
Hi
now I do:
glMatrixMode(GL_PROJECTION);
glPushMatrix();
glLoadIdentity();
glFrustum(-0.7, 0.7, -0.7, 0.7, 1, 5000);
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glLoadIdentity();
glRotatef(GetDataf(psi), 0, 1, 0);//heading
glRotatef(GetDataf(theta), -1, 0, 0);//pitch
glRotatef(GetDataf(phi), 0, 0, 1);//roll
glTranslatef(-GetDatad(locX), -GetDatad(locY), -GetDatad(locZ));//
positions
drawMesh();
so far all is ok
now I want to rotate the mesh 90' to look from above on it. I've tried
without success:
// glRotatef(90, -1, 0, 0); // look down
// glTranslatef(0.0f, 0.0f, 128.0f);//128x128 mesh
// gluLookAt(0,0,GetDatad(locZ)+2000,0,0,-256,0,1,0);
How to rotate and maybe zoom out?
Many thanks
Michael

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.