code OPENFRAMEWORKS notes # repos https://github.com/openframeworks/openFrameworks # how to install ## windows (2023-11-16) - Setup VS for OF : https://openframeworks.cc/setup/vs/ - install C++ - Unzip SDK : https://openframeworks.cc/download/ https://github.com/openframeworks/openFrameworks/releases/download/0.12.0/of_v0.12.0_vs_release.zip ## linux For Rasberry pi the package is at the bottom of the page. - download linux package : https://openframeworks.cc/download/ - download code editor (VScode) : https://code.visualstudio.com/download - Linux : https://openframeworks.cc/setup/linux-install/ - Rasberry pi : https://openframeworks.cc/setup/raspberrypi/raspberry-pi-getting-started/ open a terminal to follow install steps - subo exec dependencies - # setup a project - Find the projectGenerator.exe within sdk (of_v0.12.0_vs_release/projectGenerator/) and use it to create a project source : https://www.youtube.com/watch?v=82X200SxDa8 That will create a VS project setup with the of lib. # FRAMEWORK main.cpp will open an ofBaseApp through the ofRunApp() method. You'll need the basic ofApp.cpp of create your own extended ofBaseApp to feed that method. Basic method given by ofBaseApp are : 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 mouseEntered(int x, int y); void mouseExited(int x, int y); void windowResized(int w, int h); void dragEvent(ofDragInfo dragInfo); void gotMessage(ofMessage msg); ofBaseApp::setup for "constructor" ofBaseApp::update for heartbeat ofBaseApp::draw to draw stuff on screen (access to drawing routines) # TROUBLESHOOT ## Created a class but can't include it When creating a new class in VS you'll need to "add it to the project" through right click, add, existing What you see in the Solution Explorer can differ from what is in the actual OS folder. ## Some issue with path to addons The project needs to be located in the /Apps folder within the sdk. Relative paths ? # UI http://openframeworks.cc/learning/01_basics/how_to_create_slider/