OF_FULLSCREEN problem

Hi I’ve noticed some strange goings on when using OF_FULLSCREEN

Basically, the screen size reported by ofGetWidth() and ofGetHeight() seem to come out wrong, erratically… causing things to be drawn semi-randomly.

If I use the following startup code:

ofSetupOpenGL(&window, 1024,768, OF_FULLSCREEN );
printf("%ix%i on screen %ix%i\n",ofGetWidth(),ofGetHeight(),ofGetScreenWidth(),ofGetScreenHeight());

I get results like this:

1024x691 on screen 1024x768
1022x690 on screen 1024x768
1024x691 on screen 1024x768

and things are drawn slightly wrong, i.e. (0,0) seems to be ~80 pixels down the screen. Although sometimes it works.

I see this issue on Windows and Linux (using a Git version of OF from a couple of weeks ago)

I’ve been looking at this solution:
http://forum.openframeworks.cc/t/[snippet]-fullscreen-or-windowed-screen-dimensions/1744/0

Does anyone know why this is/ a way to fix it?

Thanks

Tim Redfern

do the values change in testApp::setup()?

No.

1022x690 on screen 1024x768
setup: 1022x690 on screen 1024x768

1024x691 on screen 1024x768
setup: 1024x691 on screen 1024x768

If I use ofGetScreenWidth() I get consistent results though.

Probably related to https://github.com/openframeworks/openFrameworks/issues/572 - have you tried waiting a frame? If not related, please report this at https://github.com/openframeworks/openFrameworks/issues