Setting up the screen
The very first thing to code is to set up the global attributes: the project's window title, screen size, rendering frame rate, and background color. To achieve this, add the following lines to the ofApp::setup()
function's body in the ofApp.cpp
file:
ofSetWindowTitle( "Video synth" ); ofSetWindowShape( 1280, 720 ); ofSetFrameRate( 60 ); ofBackground( ofColor::white );
Tip
Downloading the example code
You can download the example code files from your account at http://www.packtpub.com for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.
This code consists of calling four openFrameworks functions, which set the window title to Video synth, the project's drawing area size with width of 1280
pixels and height of 720
pixels, the frame rate to 60
Hz, and the white background, respectively.
Note
All openFrameworks...