Getting Started with Open Frameworks

Posted by | Posted in C++, Frameworks, Open Frameworks | Posted on 28-11-2009

I have been playing around with C++ and OF lately, getting familiar with the what I'm dealing with, which is pretty heavy. What can I say, C++ is hard. Here is an OF "hello world" program. It just prints "Hello OF" in red letters, but it will also give you an idea of how you can use OF. This is just a basic example derived from the examples in OF itself, but stripped down for clarity. The class is called testApp and this is the .h file for it:

#ifndef _TEST_APP
#define _TEST_APP
 
#include "ofMain.h"
 
class testApp : public ofBaseApp
{
   public:
        testApp();
	void setup();
	void update();
	void draw();
 
	void keyPressed  (int key);
	void keyReleased(int key);
	void mouseMoved(int x, int y );
	void mouseDragged(int x, int y, int button);
	void mousePressed(int x, int y, int button);
	void mouseReleased(int x, int y, int button);
	void windowResized(int w, int h);
 
}
 
#endif

and here is the implementation file: Read the rest of this entry »

Open Frameworks

Posted by | Posted in C++, Frameworks | Posted on 14-11-2009

If you haven't seen this yet, I highly recommend checking it out.  As an Actionscript developer I have often come across performance limitations (if you code AS, you are yawning and saying something along the lines of duh jackass) BUT! I have a point.  I have also come to greatly appreciate the simplicity and elegance of Actionscript, which is where OF comes in.  OF stands for Open Frameworks and it's pretty much as good as it gets in terms of programming as far as I'm concerned.  It is C++ so the learning curve is pretty much as steep as it gets minus assembly, but if you are comfortable with AS3, this should be ok for you, because of the programming model that OF offers, which is the beauty of this whole thing.  AS3 ease with C++ performance.  Check it out.

made with openFrameworks from openFrameworks on Vimeo.