OpenFrameworks
OpenFrameworks
OpenFrameworks is the C++ equivalent to Processing. Unlike Processing it does not provide its own simplified IDE, but requires an installation of either XCode on Mac OS, Visual Studio or Code::Blocks on Windows, or Code::Blocks on Linux. XCode and Visual Studio have a rather steep learning curve for beginners. Code::Blocks is just a little more light weight, but still far away from being an IDE especially designed for teaching purposes. Definitely, none of them is suitable to teach children. The XO-HS might be a target for OpenFrameworks though. Installing OpenFrameworks is more complex than installing Processing. It does not interact with all of the XO’s hardware features out of the box. Figure 10 shows OpenFrameworks and Code::Blocks on the XO-1.5: After the successful installation Code::Blocks can be found in the Applications > Programming menu (7-➊). The animations in the AdvancedGraphicsExample are running slowly(7-➋). OpenCVExample and MoviePlayerExample produce errors while trying to display a movie (7-➌). This seems to be related to the videos’ codec: Message: don’t know how to handle video x-h264. A solution to this problem has not been found yet, the MovieGrabberExample (7-➎) works though. Connecting to the XO’s camera obviously is not the problem. The AudioOutputExample worked (7-➍) but produced ugly clicks and pops. 7-➏ shows one of the event handling examples. Mouse, trackpad and keyboard events are recognized. So are the game keys. The keys to switch the screen’s direction, as well as the additional arrow keys next to it, are not.
Installation
XO-1
Installing OpenFrameworks on the XO-1 has not been successful.<ref group="nb">The complete story can be found here: www.flatlandfarm.de</ref>
XO-1.5
A couple of requirements need to be installed first: make, rpmfusion ffmpeg-devel
$ sudo yum install make $ cd /home/olpc/Download/ $ wget http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm $ wget http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm $ sudo yum localinstall --nogpgcheck rpmfusion-free-release-stable.noarch.rpm $ sudo yum localinstall --nogpgcheck rpmfusion-nonfree-release-stable.noarch.rpm $ sudo yum install ffmpeg-devel
Now OpenFrameworks can be installed. The following supposes that you are still in the /home/olpc/Download directory. Download OpenFrameworks, using wget, untar it, rename it with a more convenient name and move it to the location of your choice.
$ wget http://www.openframeworks.cc/versions/preRelease_v0.061/of_preRelease_v0061_linux_FAT.tar.gz $ tar -xzvf of_preRelease_v0061_linux_FAT.tar.gz $ cd ../ $ mv Download/of_preRelease_v0061_linux_FAT openFrameworks $ cd openFrameworks/scripts/linux/fedora
Change to the openFrameworks/scripts/linux/fedora directory. Run the installers for Code::Blocks and its dependencies.
$ sudo ./install_codeblocks_802.sh $ sudo ./install_dependencies.sh
Performance
The test that had been used to test Processing's performance has been ported to OpenFrameworks. It shows that its performance is worse than Processing's. Both Release and Debug mode have been tested. It has also been tried to start the sketches directly from the terminal to avoid interferences of the IDE. There has not been found any difference at all. See Processing#table1
Notes
<references group="nb" />
References
<references />