Skip to content

ofnode/ofLiveApp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ofLiveApp

ofLiveApp is Linux-only for now. Tested under Ubuntu 14.04.

Write your code in ofApp.cpp file. Once the code is compiled you can just save the source file and see your changes in your application after ~5 seconds.

If you need an object which should not be resetted on each code update, add it to SERIALIZE macro. You can make as many serializable objects as you want.

You can also compile application without RCC++ by passing -DOF_ENABLE_LIVECODING=OFF to cmake command on project generation step.

Giant thanks to @kritzikratzi for making his code and notes about integrating RCC++ and openFrameworks available to anyone! Check it here:

https://github.com/kritzikratzi/runtimeCPPDraw

And, of course, big thanks to @dougbinks for making RCC++ happen and helping me out with serialization!

Known issues

Q: My application doesn't change when I save the source file!

A: Check the command line of your application, probably the code can't be compiled at runtime.

Q: My application crashes after a code change!

A: There can be many reasons why it happens, I've noticed only one so far: don't use raw pointers.

Q: ofEasyCam stops working after first code update!

A: Use ofxFirstPersonCamera instead, it was rewritten with ofLiveApp in mind.

Compiling

Make sure that of and ofApp share the same folder.

ScreenShot

Change directory to ofApp and perform these steps:

git submodule update --init --recursive
mkdir build
cd build
cmake .. -G Ninja -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release
ninja

See also

Converting ofApp to ofLiveApp

  1. Copy all of your files (except for main.cpp) from ofApp/src to ofLiveApp/src folder.
  2. Copy addons folders and ofxaddon() commands from ofApp/CMakeLists.txt to ofLiveApp/CMakeLists.txt.
  3. In ofLiveApp/src/ofApp.cpp add REGISTERCLASS(ofApp) line after #include "ofApp.h".
  4. In ofLiveApp/src/ofApp.h change:

From:

#include "ofMain.h"

To:

#include "ofLiveMain.h"

From:

class ofApp : public ofBaseApp

To:

class ofApp : public ofLiveApp

About

Live coding openFrameworks applications.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 70.6%
  • C 22.4%
  • CMake 7.0%