|
 |
|
Dedicated MacNNer
Join Date: May 2002
Location: Brooklyn, NY
Status:
Offline
|
|
Hi,
I was wondering how to get a correct aspect ratio when using GLUTGameMode. I'm on a 15" TiBook running at 1280x854, and neither of the following (one commented) commands give me a full screen program with the correct aspect ratio:
Code:
glutGameModeString("1280x854:32@60");
//glutGameModeString("1024x768:32@70");
glutEnterGameMode();
For my reshape() method I have this:
Code:
void reshape(int w, int h){
glViewport( 0, 0, (GLsizei) w, (GLsizei) h);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
// glFrustum(-5.0,5.0,-5.0,5.0,-1.0,maxSeeingDistance);
glFrustum(-1.0,1.0,-1.0,1.0,1.5,maxSeeingDistance);
glMatrixMode(GL_MODELVIEW);
}
Is my reshape not right? Any advice would be appreciated. :)
thanks
gabe
|
|
|
| |
|
|
|
 |