Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Correct Aspect Ratio with GlutGameMode?

Correct Aspect Ratio with GlutGameMode?
Thread Tools
Dedicated MacNNer
Join Date: May 2002
Location: Brooklyn, NY
Status: Offline
Reply With Quote
Jan 17, 2004, 01:46 AM
 
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
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:51 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2