of_fullscreen woes

hey guys,

I am trying to build a particle system which works by getting the location coordinates from a live camera input and doing a contour finding and simply mapping this to the particles. Now my problem is the window size I should be working on.

Basically right now I am capturing 320x240 camera input and my app window is 1024X768 (and running in window). now when I try to use of_fullscreen instead of of_window I just realized that my particles have been created in the top part left of the screen since the current resolution of my monitor is 1920x1200. The boundaries of those particles are ofGetWidth() and ofGetHeight() which is 1024x768.

well my question is, how can I get the monitor’s resolution and pass this as a parameter to the application so that I can make sure they have been created in the whole screen. OR, is there a way to convert the resolution of the monitor while the app is running?

I built a similar project with carbon library before and it was changing the resolution to the application resolution on runtime. See the example below:


beware though, it only works on macs and I don’t have a quit button so you have to quit by apple+option+esc combination. I am sorry for this :slight_smile:

I would appreciate any helps regarding this.

Hey ilteris,

Try editing your main.cpp to look like this. That should force the monitor to go to the correct resolution, fullscreen. OF_GAME_MODE is the trick.

#include "ofMain.h"  
#include "testApp.h"  
int main( ){  
	// pass in width and height too:  
	ofSetupOpenGL(1024,768, OF_GAME_MODE); // <-------- setup the GL context  
	// this kicks off the running of my app  
	testApp app;  



For more information.

hey JGL, thanks!