Window size issue

Hey everybody,

I’m building my first openFrameworks application, and I’m having a quite annoying issue. I’m setting my window size on main.cpp at 1920 x 1080, but when I run the project, it opens at 1284 x 942. I tried using ofSetWindowShape on setup, but it didn’t have any effect also. My main.cpp is like this:

int main( ){  
	ofSetupOpenGL(1920,1080,OF_WINDOW);			// <-------- setup the GL context  
	// this kicks off the running of my app  
	// pass in width and height too:  
	ofRunApp(new RecorderApp());  

I’m running it on windows 7, using Visual Studio 2012 Express.

Thanks in advance!

what’s the resolution of your monitor?

It makes some sense, my monitor is at 1280x960. But the app I’m developing will be used at a full hd display, so I needed to see it full scale, even if I had to move it around to see different bits of it. Does oF always cap the window size to display resolution?

actually windows caps the size of the window to fit the screen

1 Like

You can still use GLUT window system that doesn’t cap the window size that way

#include "ofMain.h"  
#include "testApp.h"  
#include "ofAppGlutWindow.h"  
int main( ){  
    ofAppGlutWindow window;  
    ofRunApp(new testApp());  

arturo: I see… should’ve thought that it was a windows issue, not oF’s…

eduardo: I tried using glut as you suggested, and it led me a strange result: I put a cout on my setup to log the window size, and it showed me the size it was supposed to be, but the window itself still got visually caped to monitor resolution. Any ideas?

I know this is a very old thread, but I rather write here than open a new one, since my problem is similar, but different!

Actually I have kind of the same problem: I try to open a window with ofSetupOpenGL(1920, 1080, OF_WINDOW); but the app then starts in the resolution 1680x955. The window covers the whole screen. BUT the screen has a higher resolution 2880x1800. So I have a “screenfilling-window” that doesn’t really use my actual resolution (because it is limited by this lower res). I am working on a Macbook Pro 2018, MacOS HighSierra, in of0.10.

Sideinformation: I also have an external 4k Monitor and if I run my Application there it runs flawlessly taking exactly a fullhd window of the whole screen.

For anyone finding this having a similiar issue (feel kinda stupid I didn’t find this information earlier…)

Working on a Macbook with Retina display needs some manual config to use the full resolution of the screen.
In your project open openFrameworks-Info.plist in Xcode and right click the table. Click “Add Row” and type in: High Resolution Capable . Set it to YES and save the file.

1 Like