cuinjune / Ofelia

A real-time cross-platform creative coding tool for multimedia development
GNU General Public License v3.0
365 stars 21 forks source link

Multimonitor fullscreen? #60

Open 60-hz opened 3 years ago

60-hz commented 3 years ago

I need to make a fullscreen window in an extended desktop configuration under OSX. Is there a way to use specific GL window settings class in current ofelia or do I need to re-compile something?

ofGLFWWindowSettings class is listed on classesAndGlobalFunctions.txt but returns: attempt to call a nil value (global 'ofGLFWWindowSettings')

Also is there a way to use multiMonitorFullScreen() or allowsMultiWindow() maybe also to remove the border (title) of the window?

Thanks

cuinjune commented 3 years ago

Hi @60-hz You can set a specific GL version by setting setGLVersion before creating a window:

[setGLVersion 3 3, create(
|
[ofWindow]

I don't think there's a way to use multiMonitorFullScreen without recompiling Ofelia. I think you can try adding the following line and try recompiling the external:

In src/ofxOfeliaPdBindings.h line 96:

    settings.title = title->s_name;
    settings.multiMonitorFullScreen = true; // add this line
    settings.windowMode = static_cast<ofWindowMode>(windowMode);
    if (positionSet) settings.setPosition(position);
    if (sizeSet) settings.setSize(width, height);
    ofCreateWindow(settings);
60-hz commented 3 years ago

Thanks @cuinjune I tried to re-compile but I am not very familiar with xcode... right now I have a /Users/xxxx/addons/ofxOfelia/src/ofxOfeliaPdBindings.h:6:10: 'ofMain.h' file not found I guess my OF path is wrong?

I found a quick workaround that worked for my case, since I simply need to play a different videos on each screen : using [pd~] so I can create another screen in a second instance, move it to the second screen, then put it fullscreen.

It would be nice to be able to use other windows settings (https://openframeworks.cc/documentation/application/) directly from ofelia, rather than the base settings window. So we could be able to remove the windows decoration, allow multiple screen and more I guess?