Research Journal(11.26)

As a new hand, I never keep in touch the programming field. Today, I want to show my research that what I have studied.First of all, Let me give you a brief introduction about Openframeworks.



OpenframeworksopenFrameworks is an open source toolkit designed for "creative coding" founded by Zachary LiebermanTheo Watsonand Arturo Castro. OpenFrameworks is written in C++ and built on top of OpenGL. OF is used in some computer systemsFor example: macOSLinuxiOSAndroid Emscripten and microsoft windows.


OpenFrameworks integrates Emscripten as a plugin. Our openFrameworks program can be easily converted to javascript format, which makes it easy to convert a local project into a WEB project that can be published directly to the web.Support multiple development environments.In addition to supporting command line compilation, openFrameworks also supports several commonly used integrated development environments:

Visual Studio
XCode
Eclipse
Code::Blocks

In fact, the most commendable thing about openFrameworks is that its code structure is extremely simple.As shown below:
 


Therefore, as a newbie, it is also very easy to operate. Now, let me briefly introduce the functions of these functions in the following Openframeworks:“setup” is performed once when the program starts;
“Draw” is executed 60 times per second after the program is started (this frequency can be set),this function is used to draw graphics;
“Update” is the same as “draw” function, executed 60 times per second, put the code that needs to be updated here;
“keyPressed” handles key events;

There are also a series of functions that handle mouse events.
Why use this code structure? Because openFrameworks was originally designed to let non-computer professionals create various computer vision/image/video/sound art programs, just like Processing's design goals, so it will make this easy to use but it also has a powerful form.[1]
In a project in a total of three documents: ofApp.main, ofApp.cpp, ofApp.h. Normally, the code we will be written in "ofApp.cpp".
Now we can also write our own projects. After the installation is complete, there is an empty project template emptyExample in the directory /examples/empty/, we can write our own oF program based on this empty project template.When you finish your design, you can click the play button on the top left corner to see your design effects.

Continuous update...

Reference:

1. Introduction of Openframeworks. Available from https://www.cnblogs.com/freeblues/p/5754158.html[Accessed 26 November 2018]

评论