Hey, I’m trying to draw an FBO in fullscreen but it is not working as expecting. I’m on Linux(ubuntu) and I’m using the last OF master.

This is the code of the main.cpp file

#include "ofMain.h"
#include "ofApp.h"

int main( ){
    ofGLFWWindowSettings settings;
    settings.setGLVersion(3, 2);
//  settings.setSize(1480, 920);
    settings.windowMode = OF_FULLSCREEN;
    ofRunApp(new ofApp());

And this is the ofApp.cpp

void ofApp::setup(){
    // finalFbo was declared in the header file as ofFbo
    cout << "FULLSCREEN" << endl;
    cout << ofGetWidth() << endl; // this print 1024
    finalFbo.allocate(ofGetWidth(), ofGetHeight(), GL_RGBA);
    ofClear(0, 0, 0, 0);

void ofApp::draw(){
    // fullfill the FBO
    ofClear(0, 0, 0, 255);
    // draw the FBO
    finalFbo.draw(0, 0);

The result is that the window goes fullscreen, but not the content.

While trying to fix this, I’ve substitute OF_FULLSCREEN with OF_GAME_MODE

settings.windowMode = OF_GAME_MODE;

When the setupt function is called, this line

 cout << ofGetWidth() << endl;

prints 1850

And the screen is still cutted

In both case, resolution looks good and the window appears without decorations.
Any idea? should I open an issue on github?

Since the value is wrong and I know I’m on full screen, I’ve been using ofGetScreenWidth() and ofGetScreenHeight().

@edapx, yes please can you open an issue?

Done https://github.com/openframeworks/openFrameworks/issues/5904

@hamoid, I have tried to use ofGetScreenWidth but it does not work. Same result as before, the only difference is that the background id black, and not gray. The first picture is with OF_FULLSCREEN, the second one with OF_GAME_MODE

Could this be related to Unity in Ubuntu? Is that what yo use?

I don’t have that issues with ofGetScreenWidth on ArchLinux, but I also have no Desktop and only a minimal tiling window manager (i3).

I do not know. But this commit fixes the problem https://github.com/openframeworks/openFrameworks/commit/7de1c4b0384b7a28823f3800f0cd3dfed3f67f69

The app now goes fullscreen using OF_FULLSCREEN

1 Like