• Advertisement
Sign in to follow this  

Mac os X Change resolution back - and window resizing problem

This topic is 3992 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hy there. I have a problem with changing resolution back to initial resolution on mac os x. I change my resolution like this: size_t lastResHeight = glutGet(GLUT_WINDOW_HEIGHT); size_t lastResWidth = glutGet(GLUT_WINDOW_WIDTH); size_t bitsPerPixel = 32 ; size_t width = 640 ; size_t height = 480 ; CFDictionaryRef bestMode ; boolean_t exactMatch ; bestMode = CGDisplayBestModeForParameters(kCGDirectMainDisplay,bitsPerPixel,width,height,&exactMatch) ; CGDisplaySwitchToMode(kCGDirectMainDisplay, bestMode) ; ........................................................ and when i want to change back the resolution i do this: ........................................................ glutPositionWindow(0,0); glutReshapeWindow(640,480); CFDictionaryRef lastMode ; boolean_t exact ; lastMode = CGDisplayBestModeForParameters(kCGDirectMainDisplay,32,lastResWidth,lastResHeight,&exact) ; CGDisplaySwitchToMode(kCGDirectMainDisplay,lastMode) ; the problem is that my window is all squash up. So my game doesnt show all the graphics. How can i resize my window to 640x480. And also how can i tell my window not to have a zoom window (that + neer the close button in left top corner). I know there is a SizeWindow function but i dont know which header to include to work. glutReshape... doenst work for me Thanks!

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement