← Back

ofxSecondWindow

github.com/genekogan/ofxSecondWindow · @genekogan
OF 0.9 Utilities

[Deprecated] OpenFrameworks addon for creating and drawing to multiple separate windows

34 9 Last commit 11y ago Created 12y ago

Forks

Forks pushed to more recently than genekogan/ofxSecondWindow itself, plus any admin-confirmed fork with commits of its own — worth checking if you're hitting issues with the original.

local-projects/ofxSecondWindow by @local-projects · ★ 0 · pushed 11y ago

README

ofxSecondWindow



[Deprecated] openFrameworks now supports multiple windows as of release 0.9. Thus this addon is unnecessary, and will no longer be maintained. See examples/events/multiWindowExample to see how to create multiple windows in OF.



About



This is a simple openFrameworks addon which allows for creating multiple windows. It is based on the discussion here and Daniel Almeida's code.

Obsolete?



As of openFrameworks release 0.9 (upcoming) and currently in the master branch, multiple windows is now supported in the core, making this addon probably unnecessary, though it continues to work, so consider it deprecated.

Usage



A new window is initialized:

secondWindow.setup(name, x, y, width, height, undecorated); where name is the name of the window, x and y are the initial position, and width and height are the size of the second window.

undecorated is a bool -- if true, the second window has its title bar hidden (undecorated). you can use this to create a presentation window, e.g. in a second monitor or projector, i.e.

secondWindow.setup("presentation window", ofGetScreenWidth(), 0, width, height, true); where width and height refer to the resolution of the second monitor / projector.

To draw to it, encapsulate all drawing commands between a begin() and end() block, e.g.

secondWindow.begin(); // draw to second window here secondWindow.end(); You can make as many instances of ofxSecondWindow as you want to support multiple windows.

Note, you can also toggle their visibility.

secondWindow.show(); secondWindow.hide(); secondWindow.toggleHidden();

Get this addon

HTTPS
SSH