Your ﬁrst App !Download OF for your platform from :http://www.openframeworks.cc/download/Copy the OF download to somewhere more permanent.Everything you do for openFrameworks needs to be withinthis directory.You may need to do some initial setup, check http://www.openframeworks.cc/setup/ for details
/examples/EmptyExample is your starting place for any newOF app.You will not use your IDE’s “new” wizard, theemptyExample app has everything you need.This will serve as your template to start from a clean slate.
Main.cppSets up the window size and openGL contextRuns application class until quit
The Application Cake.Ingredients - .h ﬁlesInstructions - .cpp ﬁles
testApp.hdeclaration of class, functions, and variables
testApp.himplementation of class, functions, and variables
update( ) apply force to particles calculations increment video frames
draw ( ) draw shapes/images/videos use GLSL Shaders Apply Blend Modes Save Pixels from screen
Look at the folder 00_basics for class outline
There is no var keyword.#include is your new importﬂoat = AS3 numberlots of similar of types string, int, uint
Functions look a little different, with the return type atthe start of the declaration.Multiple functions can share the same name, as long asthey have different input parameters or return types.
C++ Compiler - Step 1Step 1Preprocessor runs through and combines all your code in onegiant ﬁle. Target the preprocessor with the “#” symbolStep 2Compiler parses code and make sure there are no errors. Yourcode is broken down into a lower level language: Assembly.Step 3The Assembly code is turned into readable code by thecomputer inside object ﬁles.Step 4The object ﬁles are linked together into an executable ﬁle.
Translation with Transformation MatricesInstead of moving an object on the screen,the entire screen is moved.Think of it as a global registration point.
Simple Translateto build off of the current space or to end a local spaceuse:ofPushMatrix( )andofPopMatrix( )
01 CirclesStep 1 Draw a circle with a random color
01 CirclesStep 2 Create struct ColorPoint, structs are like classes except they cannot have methods. A Struct is useful for storing grouped data. Store each color point in a vector<> which operates similar to a dynamically sized array
01 CirclesStep 3 Draw screen into Frame Buffer Objects ( FBOs ) FBOs are called with begin() and end() Anything between those functions will be stored and be available for use later. Mirror vertical / horizontal for kaleidoscope
01 CirclesStep 4 - BONUS Pull colors from a color palette.
02 AnimatorStep 1 Create a looping sequence of FBOs Draw a circle into wherever the mouse is
02 AnimatorStep 2 Scale the circle radius based on mouse speed And draw a random color
02 AnimatorStep 3 Including an addon We will use ofxUI to add some sliders to make our animator a little more fun. Adding addon ﬁles to a project Adding a RGB slider color ranges
03 ParticlesStep 1 Load an Image Create still particles from the raw pixels of the image
03 ParticlesStep 2 Add the repulse / attract modes to the system Add particle alpha trails
03 ParticlesStep 3 Update particles colors from a movie Loading a movie
Joining the Community !Introduce yourself at :http://forum.openframeworks.cc/index.php/board,11.0.htmlThe OF community is very welcoming.
How to be a good community member ?Read your IDE’s in depth forum walkthrough it willsave you a lot of hassle.Search the forums for answers before making a post.Ask questions and post your code.DO NOT beg for code.
GithubGithub is awesome.Go there. like now and sign up.github.com
GithubGithub is a social coding platform that allows you tohost a git repository for free as long as it’s public andopen source.Github has great resources for getting started with githttp://help.github.com/
GithubGithub is a great way to move your own ﬁles betweenmachines.It has built in issue tracker and and wiki capabilities.Great way to collaborate and share code.
Git Quick Tip.gitignore is a ﬁle speciﬁc to a repository that allowsyou to specify what is not tracked by git.with c++ normally this is excessive IDE generatedﬁles, and build ﬁles.Binary ﬁles don’t track super well on git because thereare no changes to track except ﬁles size. butsometimes you need to include them anyway.
Additional ResourcesThere are now ofﬁcial OF tutorials !http://openframeworks.cc/tutorialsRoxlu has a wonderful collection of slides to explainsome of the awesome features of OF 007http://roxlu.com/blog/entry/145/openframeworks-007-presentationsThe new version of Programming Interactivity byJoshua Noble is the goto book for OFhttp://programminginteractivity.com/wordpress/
Additional ResourcesUnofﬁcial c++ reading listhttp://forum.openframeworks.cc/index.php/topic,9034.msg42670.htmlProcessing ‘s ofﬁcial site still has the best explanation ofcore concept I have seenhttp://processing.org/learning/The OF forums are a treasure trove of discovery andworks in progress. Subscribing to the RSS feed willkeep you very up to date.http://forum.openframeworks.cc/
Additional ResourcesCreative Applications does an amazing job showcasingand collecting installations and other creative apps.http://www.creativeapplications.net/
Ben McChesneyLead Interaction DesignerHelios Interactive@bendesigning on twitterbenmcchesney.com/bloggithub.com/benMcChesney