Multiple OpenGL windows?

Hey. Is it at all possible to have multiple OpenGL render windows (and render contexts) within the same application? My assumption is no, as ofSetupOpenGL() doesn’t work when it’s called outside of main().

Jeremy

thats funny - I was looking at that today.
currently OF only supports one window - but in theory it is possible to do more as it is using GLUT for windowing and GLUT supports multiple windows.

At the moment we are concentrating on getting all the current features solid and creating a good base - but maybe a ofWindow object could be quiet a nice feature for feature releases.

cool. i completely understand.
it’ll definitely be a useful feature for prototyping all those multiscreen oF projects!

jeremy

yes, def

the common thing we do for multiscreen (and this is a big hack, that doesn’t translate) is use nvidia’s horizontal span. w/ nvidia and xp you can make a display across two monitors that is effectively 2048x768. impossible to do with ATI (although we’ve written some hacked out code that may fix this problem), and in vista (since it doesn’t, for some reason, support horizontal span).

the other trick is parahelia’s dual head to go… which fakes the graphics card’s output into thinking you have plugged in a 2048x768 screen and breaks it into two 1024x768 streams.

and on the fancy cards, you can do horizontal span + 2 dual head to gos to power 4 projectors – effectively 2046x1536, lots of pixels !!!

hope that helps!!
zach

you can also do this in OS X regardless of the graphics card. Just open the preferences from the openFrameworks menu when the app is running and set use extended desktop. This then allows you to span the app across multiple windows in fullscreen.

yet another reason to get a mac :slight_smile: thanks for the tip !

the windows horizontal span stuff is bit hacked out and has caused me alot of headaches…

ok, in theory, one big MacPro with 3 video cards (each dual dvi) connected to 6 projectors (each 1024x768) can make a 6144x768 screen for one fullscreen window ?
What did you think of this kind of setup in terms of performance for an application that did not provide interactivity but parametric animations (like some of these : http://www.zugakousaku.com/index.php?ref=study-quartz-jp) ?

oh, and a big thanks to all for your fantastic work !

L.

There is always one of these, they are about £250:

http://www.matrox.com/graphics/en/cadgis/products/th2go/th2go.php

I’ve used one in the past to run 3 projectors (1024x768) plus one touch screen (1280x1024) off one card (the 3 projectors connected to one of the TripleHead2Go boxes).
It makes the screens appear as one wide screen to the computer. Things ran really well, but it was just a bunch of 3d text, so not super complex and no effects to speak of.

This was on a Pentium 4 class machine with a GeForce workstation card (not my idea) of some kind, can’t remember.

yep, thanks for the info !
Another (maybe stupid) question : is there is a (software) limit to the GL context setup in an of application ?

I think that an OpenGL context/window can’t be bigger than 4096 or 8192 or something like that, but I might be wrong. Something to keep in mind if you go over and see odd results though.