Skip to content

OpenFrameworks addon for creating and drawing to multiple separate windows

Notifications You must be signed in to change notification settings

nariakiiwatani/ofxSecondWindow

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ofxSecondWindow

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

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("Window title", 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();

See the example project's code for use of useful setSize and setPosition functions.

You can make as many instances of ofxSecondWindow as you want to support multiple windows.

To destroy a window, use :

secondWindow.close();

About

OpenFrameworks addon for creating and drawing to multiple separate windows

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 96.9%
  • Makefile 3.1%