Sign in to follow this  
guvidu

Mac os X Change resolution back - and window resizing problem

Recommended Posts

guvidu    102
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this