ofToggleFullScreen()

ofToggleFullscreen() does not set the correct height and width for the window

i do not know if this is a bug or i am doing something wrong…

i am using openFrameworks 0.062

  
  
  
// app set to window mode  
  
ofLog(OF_LOG_VERBOSE, "%d,%d",ofGetWidth(),ofGetHeight()); //Gives correct values  
ofToggleFullscreen();  
ofLog(OF_LOG_VERBOSE, "%d,%d",ofGetWidth(),ofGetHeight()); //Gives incorrect values.... values of window before full screen  
ofToggleFullscreen();  
ofLog(OF_LOG_VERBOSE, "%d,%d",ofGetWidth(),ofGetHeight()); //Gives incorrect values.... values for fullscreen  
  
  

in which platform?

mac os x 10.6

one thing i’ve noticed is you may have to wait for the next frame before width/height will be updated after a call to full screen.

So is there a way to get the data some other way which does not involve drawing the next frame?

If you want to get the fullscreen width/height, you could try using ofGetScreenWidth/ofGetScreenHeight after you toggle to fullscreen. Those would return the screen resolution which may match the fullscreen resolution.