├── .gitignore ├── .readme └── image.png ├── .vscode ├── c_cpp_properties.json ├── launch.json ├── settings.json ├── tasks.json └── testDirs.sh ├── Makefile ├── README.md ├── addons.make ├── config.make └── src ├── main.cpp ├── ofApp.cpp └── ofApp.h /.gitignore: -------------------------------------------------------------------------------- 1 | # ignore all 2 | # check another .ignore file in addons folder 3 | 4 | !/bin 5 | /bin/* 6 | /bin/data/vids/sunless* 7 | !/bin/data/ 8 | !/bin/data/* 9 | /obj 10 | /.vscode/browse.db 11 | /.vscode/browse.db* 12 | /.vscode/ipch/* 13 | 14 | # Xcode Project 15 | xcuserdata/ 16 | *.entitlements 17 | build/ 18 | *.pbxuser 19 | !default.pbxuser 20 | *.mode1v3 21 | !default.mode1v3 22 | *.mode2v3 23 | !default.mode2v3 24 | *.perspectivev3 25 | !default.perspectivev3 26 | xcuserdata 27 | *.xccheckout 28 | *.moved-aside 29 | .xcscmblueprint 30 | DerivedData 31 | *.hmap 32 | *.ipa 33 | *.xcuserstate 34 | 35 | #OSX 36 | .DS_Store 37 | *.swp 38 | *~.nib 39 | # Thumbnails 40 | ._* 41 | 42 | *~ 43 | .svn/ 44 | *.app/ 45 | 46 | # Compiled Object files 47 | *.slo 48 | *.lo 49 | *.o 50 | 51 | # Compiled Dynamic libraries 52 | *.so 53 | *.dylib 54 | 55 | # Compiled Static libraries 56 | *.lai 57 | *.la 58 | *.a 59 | 60 | # xml 61 | *.*.bak 62 | 63 | *.xcscmblueprint 64 | 65 | **/obj/** 66 | 67 | # vs code brower database 68 | *.db 69 | *.db-shm 70 | *.db-wal 71 | *.directory 72 | -------------------------------------------------------------------------------- /.readme/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hsab/ofVSCode/6ef1fe02beffb2e34ff8bb3f19c534b3a54911da/.readme/image.png -------------------------------------------------------------------------------- /.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [{ 3 | "name": "Mac", 4 | "includePath": [ 5 | "/usr/include", 6 | "/usr/local/include", 7 | "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/", 8 | "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1", 9 | "${workspaceRoot}/../../../libs/openFrameworks", 10 | "${workspaceRoot}/../../../libs/openFrameworks/3d", 11 | "${workspaceRoot}/../../../libs/openFrameworks/app", 12 | "${workspaceRoot}/../../../libs/openFrameworks/communication", 13 | "${workspaceRoot}/../../../libs/openFrameworks/events", 14 | "${workspaceRoot}/../../../libs/openFrameworks/gl", 15 | "${workspaceRoot}/../../../libs/openFrameworks/graphics", 16 | "${workspaceRoot}/../../../libs/openFrameworks/math", 17 | "${workspaceRoot}/../../../libs/openFrameworks/sound", 18 | "${workspaceRoot}/../../../libs/openFrameworks/types", 19 | "${workspaceRoot}/../../../libs/openFrameworks/utils", 20 | "${workspaceRoot}/../../../libs/openFrameworks/video", 21 | "${workspaceRoot}/../../../libs/boost/include", 22 | "${workspaceRoot}/../../../libs/cairo/include", 23 | "${workspaceRoot}/../../../libs/curl/include", 24 | "${workspaceRoot}/../../../libs/fmodex/include", 25 | "${workspaceRoot}/../../../libs/FreeImage/include", 26 | "${workspaceRoot}/../../../libs/freetype/include", 27 | "${workspaceRoot}/../../../libs/glew/include", 28 | "${workspaceRoot}/../../../libs/glfw/include", 29 | "${workspaceRoot}/../../../libs/glm/include", 30 | "${workspaceRoot}/../../../libs/json/include", 31 | "${workspaceRoot}/../../../libs/pugixml/include", 32 | "${workspaceRoot}/../../../libs/rtAudio/include", 33 | "${workspaceRoot}/../../../libs/tess2/include", 34 | "${workspaceRoot}/../../../libs/uriparser/include", 35 | "${workspaceRoot}/../../../libs/utf8/include", 36 | "${workspaceRoot}/../../../addons/ofxOsc/src", 37 | "${workspaceRoot}/../../../addons/ofxOsc/libs/oscpack/src/osc", 38 | "${workspaceRoot}/../../../addons/ofxOsc/libs/oscpack/src/ip" 39 | ], 40 | "browse": { 41 | "limitSymbolsToIncludedHeaders": true, 42 | "databaseFilename": "${workspaceRoot}/.vscode/browse.db", 43 | "path": [ 44 | "/usr/include", 45 | "/usr/local/include", 46 | "/System/Library/Frameworks", 47 | "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/", 48 | "${workspaceRoot}/../../../libs", 49 | "${workspaceRoot}/../../../addons", 50 | "${workspaceRoot}/../../../libs/openFrameworks" 51 | ] 52 | }, 53 | "intelliSenseMode": "clang-x64", 54 | "macFrameworkPath": [ 55 | "/System/Library/Frameworks", 56 | "/Library/Frameworks" 57 | ] 58 | }, 59 | { 60 | "name": "Linux", 61 | "includePath": [ 62 | "/usr/include", 63 | "/usr/local/include", 64 | "/usr/include/c++/5", 65 | "/usr/include/c++/5/backward", 66 | "/usr/lib/gcc/x86_64-linux-gnu/5/include", 67 | "/usr/lib/x86_64-linux-gnu/glib-2.0/include", 68 | "/usr/lib/glib-2.0/include", 69 | "/usr/lib/x86_64-linux-gnu/gstreamer-1.0/include", 70 | "/usr/lib/gcc/x86_64-linux-gnu/5/include-fixed", 71 | "/usr/include/x86_64-linux-gnu", 72 | "/usr/include/x86_64-linux-gnu/c++/5", 73 | "/usr/include/pulse", 74 | "/usr/include/cairo", 75 | "/usr/include/gstreamer-1.0", 76 | "/usr/include/glib-2.0", 77 | "${workspaceRoot}/", 78 | "${workspaceRoot}/**", 79 | "${workspaceRoot}/../../../libs/", 80 | "${workspaceRoot}/../../../libs/**", 81 | "${workspaceRoot}/../../../addons/", 82 | "${workspaceRoot}/../../../addons/**", 83 | "${workspaceRoot}/../../../libs/openFrameworks/", 84 | "${workspaceRoot}/../../../libs/openFrameworks/**", 85 | "${workspaceRoot}/../../../libs/openFrameworks/3d", 86 | "${workspaceRoot}/../../../libs/openFrameworks/app", 87 | "${workspaceRoot}/../../../libs/openFrameworks/communication", 88 | "${workspaceRoot}/../../../libs/openFrameworks/events", 89 | "${workspaceRoot}/../../../libs/openFrameworks/gl", 90 | "${workspaceRoot}/../../../libs/openFrameworks/graphics", 91 | "${workspaceRoot}/../../../libs/openFrameworks/math", 92 | "${workspaceRoot}/../../../libs/openFrameworks/sound", 93 | "${workspaceRoot}/../../../libs/openFrameworks/types", 94 | "${workspaceRoot}/../../../libs/openFrameworks/utils", 95 | "${workspaceRoot}/../../../libs/openFrameworks/video", 96 | "${workspaceRoot}/../../../libs/boost/include", 97 | "${workspaceRoot}/../../../libs/cairo/include", 98 | "${workspaceRoot}/../../../libs/curl/include", 99 | "${workspaceRoot}/../../../libs/fmodex/include", 100 | "${workspaceRoot}/../../../libs/FreeImage/include", 101 | "${workspaceRoot}/../../../libs/freetype/include", 102 | "${workspaceRoot}/../../../libs/glew/include", 103 | "${workspaceRoot}/../../../libs/glfw/include", 104 | "${workspaceRoot}/../../../libs/glm/include", 105 | "${workspaceRoot}/../../../libs/json/include", 106 | "${workspaceRoot}/../../../libs/pugixml/include", 107 | "${workspaceRoot}/../../../libs/rtAudio/include", 108 | "${workspaceRoot}/../../../libs/tess2/include", 109 | "${workspaceRoot}/../../../libs/uriparser/include", 110 | "${workspaceRoot}/../../../libs/utf8/include", 111 | "${workspaceRoot}/../../../libs/poco/include", 112 | "${workspaceRoot}/../../../libs/kiss/include" 113 | ], 114 | "browse": { 115 | "limitSymbolsToIncludedHeaders": true, 116 | "databaseFilename": "${workspaceRoot}/.vscode/browse.db", 117 | "path": [ 118 | "/usr/include", 119 | "/usr/local/include", 120 | "${workspaceRoot}/", 121 | "${workspaceRoot}/**", 122 | "${workspaceRoot}/../../../libs/", 123 | "${workspaceRoot}/../../../libs/**", 124 | "${workspaceRoot}/../../../addons/", 125 | "${workspaceRoot}/../../../addons/**", 126 | "${workspaceRoot}/../../../libs/openFrameworks/", 127 | "${workspaceRoot}/../../../libs/openFrameworks/**" 128 | ] 129 | }, 130 | "intelliSenseMode": "clang-x64", 131 | "compilerPath": "/bin/clang", 132 | "cStandard": "c11", 133 | "cppStandard": "c++17" 134 | }, 135 | { 136 | "name": "Win32", 137 | "includePath": [ 138 | "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include/*" 139 | ], 140 | "browse": { 141 | "limitSymbolsToIncludedHeaders": true, 142 | "databaseFilename": "", 143 | "path": [ 144 | "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include/*" 145 | ] 146 | }, 147 | "intelliSenseMode": "msvc-x64" 148 | } 149 | ], 150 | "version": 4 151 | } 152 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "name": "C++ Launch", 6 | "type": "cppdbg", 7 | "request": "launch", 8 | "program": "${workspaceRoot}/bin/${workspaceFolderBasename}", 9 | "args": [], 10 | "stopAtEntry": false, 11 | "cwd": "${workspaceRoot}", 12 | "environment": [], 13 | "externalConsole": false, 14 | "linux": { 15 | "MIMode": "gdb", 16 | "setupCommands": [ 17 | { 18 | "description": "Enable pretty-printing for gdb", 19 | "text": "-enable-pretty-printing", 20 | "ignoreFailures": true 21 | } 22 | ], 23 | "program": "${workspaceRoot}/bin/${workspaceFolderBasename}_debug" 24 | }, 25 | "osx": { 26 | "MIMode": "lldb" 27 | }, 28 | "windows": { 29 | "MIMode": "gdb", 30 | "setupCommands": [ 31 | { 32 | "description": "Enable pretty-printing for gdb", 33 | "text": "-enable-pretty-printing", 34 | "ignoreFailures": true 35 | } 36 | ] 37 | } 38 | }, 39 | { 40 | "name": "C++ Attach", 41 | "type": "cppdbg", 42 | "request": "attach", 43 | "program": "enter program name, for example ${workspaceRoot}/a.out", 44 | "processId": "${command:pickProcess}", 45 | "linux": { 46 | "MIMode": "gdb", 47 | "setupCommands": [ 48 | { 49 | "description": "Enable pretty-printing for gdb", 50 | "text": "-enable-pretty-printing", 51 | "ignoreFailures": true 52 | } 53 | ] 54 | }, 55 | "osx": { 56 | "MIMode": "lldb" 57 | }, 58 | "windows": { 59 | "MIMode": "gdb", 60 | "setupCommands": [ 61 | { 62 | "description": "Enable pretty-printing for gdb", 63 | "text": "-enable-pretty-printing", 64 | "ignoreFailures": true 65 | } 66 | ] 67 | } 68 | } 69 | ] 70 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "C_Cpp.intelliSenseEngineFallback": "Disabled", 3 | "files.exclude":{ 4 | "**/.readme": true, 5 | "**/.directory": true, 6 | "**/.appveyor.yml": true, 7 | "**/.gitignore": true, 8 | "**/.travis.yml": true 9 | }, 10 | "spellright.language": "English (American)", 11 | "spellright.documentTypes": [ 12 | "markdown", 13 | "latex", 14 | "plaintext" 15 | ], 16 | "files.associations": { 17 | "iostream": "cpp", 18 | "bitset": "cpp", 19 | "typeinfo": "cpp", 20 | "condition_variable": "cpp", 21 | "mutex": "cpp", 22 | "array": "cpp", 23 | "atomic": "cpp", 24 | "strstream": "cpp", 25 | "*.tcc": "cpp", 26 | "cctype": "cpp", 27 | "chrono": "cpp", 28 | "clocale": "cpp", 29 | "cmath": "cpp", 30 | "codecvt": "cpp", 31 | "complex": "cpp", 32 | "cstdarg": "cpp", 33 | "cstddef": "cpp", 34 | "cstdint": "cpp", 35 | "cstdio": "cpp", 36 | "cstdlib": "cpp", 37 | "cstring": "cpp", 38 | "ctime": "cpp", 39 | "cwchar": "cpp", 40 | "cwctype": "cpp", 41 | "deque": "cpp", 42 | "forward_list": "cpp", 43 | "list": "cpp", 44 | "unordered_map": "cpp", 45 | "vector": "cpp", 46 | "exception": "cpp", 47 | "filesystem": "cpp", 48 | "string_view": "cpp", 49 | "fstream": "cpp", 50 | "functional": "cpp", 51 | "initializer_list": "cpp", 52 | "iomanip": "cpp", 53 | "iosfwd": "cpp", 54 | "istream": "cpp", 55 | "limits": "cpp", 56 | "memory": "cpp", 57 | "new": "cpp", 58 | "ostream": "cpp", 59 | "numeric": "cpp", 60 | "ratio": "cpp", 61 | "sstream": "cpp", 62 | "stdexcept": "cpp", 63 | "streambuf": "cpp", 64 | "system_error": "cpp", 65 | "thread": "cpp", 66 | "cinttypes": "cpp", 67 | "type_traits": "cpp", 68 | "tuple": "cpp", 69 | "utility": "cpp" 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "shell": { 4 | "task": true 5 | }, 6 | "tasks": [{ 7 | "type": "shell", 8 | "label": "Build Debug", 9 | "presentation": { 10 | "reveal": "always", 11 | "panel": "shared" 12 | }, 13 | "command": "bash", 14 | "args": [ 15 | "-c", 16 | "time ( rm -f ./bin/$(basename '$PWD')_debug && make Debug CC=clang CXX=clang++ -j$(nproc) )" 17 | ], 18 | "group": { 19 | "kind": "build", 20 | "isDefault": true 21 | }, 22 | "problemMatcher": [ 23 | "$gcc" 24 | ] 25 | }, 26 | { 27 | "type": "shell", 28 | "label": "Build Release", 29 | "presentation": { 30 | "reveal": "always", 31 | "panel": "shared" 32 | }, 33 | "command": "bash", 34 | "args": [ 35 | "-c", 36 | "time ( rm -f ./bin/$(basename '$PWD') && make Release CC=clang CXX=clang++ -j$(nproc) )" 37 | ], 38 | }, 39 | { 40 | "type": "shell", 41 | "label": "Clean Debug", 42 | "presentation": { 43 | "reveal": "always", 44 | "panel": "shared" 45 | }, 46 | "command": "make", 47 | "args": [ 48 | "CleanDebug" 49 | ] 50 | }, 51 | { 52 | "type": "shell", 53 | "label": "Clean Release", 54 | "presentation": { 55 | "reveal": "always", 56 | "panel": "shared" 57 | }, 58 | "command": "make", 59 | "args": [ 60 | "CleanRelease" 61 | ] 62 | }, 63 | { 64 | "type": "shell", 65 | "label": "Run Debug", 66 | "presentation": { 67 | "reveal": "never", 68 | "panel": "shared" 69 | }, 70 | "command": "make", 71 | "args": [ 72 | "RunDebug" 73 | ] 74 | }, 75 | { 76 | "type": "shell", 77 | "label": "Run Release", 78 | "presentation": { 79 | "reveal": "never", 80 | "panel": "shared" 81 | }, 82 | "command": "make", 83 | "args": [ 84 | "RunRelease" 85 | ] 86 | }, 87 | { 88 | "type": "shell", 89 | "label": "Clean All", 90 | "presentation": { 91 | "reveal": "always", 92 | "panel": "shared" 93 | }, 94 | "command": "make", 95 | "args": [ 96 | "clean" 97 | ], 98 | "problemMatcher": [ 99 | "$gcc" 100 | ] 101 | }, 102 | { 103 | "type": "shell", 104 | "label": "Check Paths", 105 | "presentation": { 106 | "reveal": "always", 107 | "panel": "shared" 108 | }, 109 | "command": "sh ${workspaceRoot}/.vscode/testDirs.sh ${workspaceRoot} ${workspaceFolder}" 110 | } 111 | ] 112 | } 113 | -------------------------------------------------------------------------------- /.vscode/testDirs.sh: -------------------------------------------------------------------------------- 1 | printf "Checking paths relative to workspace:\n\n" 2 | 3 | format="%-17s | %-7s | %-30s\n" 4 | flag="SUCCESS" 5 | 6 | if [ -d $1 ] 7 | then 8 | flag="SUCCESS" 9 | else 10 | flag="ERROR" 11 | fi 12 | 13 | printf "$format" "--workspaceRoot" "$flag" "$1" 14 | 15 | if [ -d $2 ] 16 | then 17 | flag="SUCCESS" 18 | else 19 | flag="ERROR" 20 | fi 21 | 22 | printf "$format" "--workspaceFolder" "$flag" "$2" 23 | 24 | addonsFolder="$1/../../../addons" 25 | 26 | if [ -d $addonsFolder ] 27 | then 28 | flag="SUCCESS" 29 | else 30 | flag="ERROR" 31 | fi 32 | 33 | printf "$format" "--addons" "$flag" "$addonsFolder" 34 | 35 | ofFolder="$1/../../../libs/openFrameworks" 36 | 37 | if [ -d $ofFolder ] 38 | then 39 | flag="SUCCESS" 40 | else 41 | flag="ERROR" 42 | fi 43 | 44 | printf "$format" "--openframeworks" "$flag" "$ofFolder" 45 | 46 | printf "\nTo prevent errors, clone the repository in [path-to-openframeworks]/apps/ 47 | " -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # Attempt to load a config.make file. 2 | # If none is found, project defaults in config.project.make will be used. 3 | ifneq ($(wildcard config.make),) 4 | include config.make 5 | endif 6 | 7 | # make sure the the OF_ROOT location is defined 8 | ifndef OF_ROOT 9 | OF_ROOT=$(realpath ../../..) 10 | endif 11 | 12 | # call the project makefile! 13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | ![Screenshot](.readme/image.png) 3 | 4 | # ofVSCode 5 | 6 | Quick [openFrameworks](https://openframeworks.cc/) workspace initializer for [Visual Studio Code](https://code.visualstudio.com/). 7 | 8 | Fork of [vscode_oF](https://github.com/hiroMTB/vscode_oF) by [@hiroMTB](https://github.com/hiroMTB) modified for Arch systems. 9 | 10 | This is not an addon, although the name suggests it is. 11 | 12 | This project is intended to quickly initiate a vscode workspace in an existing or empty project or an addon example. 13 | Using the provided alias it is also possible to initiate a fresh openframeworks project. 14 | 15 | It relies on the use of of **aliases** and command chaining in terminal to circumvent `git clone .`'s restrictions in a non empty directory. 16 | 17 | 18 | # Example Usage: 19 | 20 | After adding the alias to your shell config (in my case zsh) you can run `ofxvsc` in your current existing project. 21 | 22 | This is particularly useful for quickly initiating addon examples for testing, without the need to go through the projectGenerator. 23 | 24 | ``` 25 | alias ofcode="git clone https://github.com/hsab/ofVSCode.git && mv ./ofVSCode/.vscode/ ./ && mv ./ofVSCode/.gitignore ./ && mv -n ./ofVSCode/addons.make ./ && mv -n ./ofVSCode/config.make ./ && mv -n ./ofVSCode/Makefile ./ && mv -n ./ofVSCode/src/ ./ && rm -rf ./ofVSCode" 26 | ``` 27 | 28 | If you'd like to immediately open the project in VSCode after initiation use the following alias instead: 29 | ``` 30 | alias ofcode="git clone https://github.com/hsab/ofVSCode.git && mv ./ofVSCode/.vscode/ ./ && mv ./ofVSCode/.gitignore ./ && mv -n ./ofVSCode/addons.make ./ && mv -n ./ofVSCode/config.make ./ && mv -n ./ofVSCode/Makefile ./ && mv -n ./ofVSCode/src/ ./ && rm -rf ./ofVSCode && code ./ &" 31 | ``` 32 | 33 | 34 | Running the above alias will: 35 | 1. Create a `.vscode` workspace folder and `.gitignore` in your current directory. 36 | 2. Create fresh `Makefile`, `addons.make`, and `config.make ` **if they don't already exist** in your current directory. 37 | 3. Create a `src` folder with an empty project including `main.cpp`, `ofApp.cpp`, and `ofApp.h` **if they don't already exist** in your current directory. 38 | 4. Remove `ofxVSCode` folder entirely. 39 | 40 | 41 | **Note:** By default the include and libraries are linked such that the project is in the `myApps` directory: 42 | - Correct: `openframeworks/apps/myApps/yourProject/` 43 | 44 | This structure is my personal preference, because addon examples can easily be compile and initiated using the same technique. You can fork the repository and appropriately change every instance of `${workspaceRoot}/../../../` in the `c_cpp_properties.json` file if you need a different directory configuration. 45 | 46 | 47 | 48 | # Addons How-to: 49 | 1. Edit addons.make file if you want to add addons. 50 | 2. You might need to edit the `c_cpp_properties.json` file. 51 | 52 | 53 | 54 | # Features 55 | - Automatic path checking to ensure correct folder structure by running the `Check Paths` task. 56 | - Auto code completion (Requires [Microsoft C++ extension](https://code.visualstudio.com/docs/languages/cpp)). 57 | - Step by step debugging (requires [gdb](https://www.gnu.org/software/gdb/) or similar debugger). 58 | - Browse source code under `/libs/openFrameworks` and `/addons/*` folders. 59 | - Currently tested on macOS, Ubuntu(by @anselanza), and Arch (Manjaro). 60 | 61 | 62 | ## Folder Structure 63 | 64 | ``` 65 | /of 66 | /apps 67 | /myApps 68 | /exampleProject <-- 69 | ``` 70 | 71 | ## oF version 72 | 0.10.0 73 | 74 | 75 | ## Known issue (copied from the original repo) 76 | 77 | + Rebuilding does not work properly. As a fix prior to running the task, **only** the binary file(s) is removed: 78 | - Build Debug:
rm -f ./bin/$(basename '$PWD')_debug && make Debug -j$(nproc)
79 | - Build Release:
rm -f ./bin/$(basename '$PWD') && make Release -j$(nproc)
80 | + macOS.sdk path is hard coded 81 | + `#include error detected` for header files which is not actualy included. For example `GL/gl.h` is for Linux wihch is not included on macOS. This shold be fixed with `limitSymbolsToIncludedHeaders` property in `c_cpp_properties.json`. 82 | 83 | -------------------------------------------------------------------------------- /addons.make: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hsab/ofVSCode/6ef1fe02beffb2e34ff8bb3f19c534b3a54911da/addons.make -------------------------------------------------------------------------------- /config.make: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # CONFIGURE PROJECT MAKEFILE (optional) 3 | # This file is where we make project specific configurations. 4 | ################################################################################ 5 | 6 | ################################################################################ 7 | # OF ROOT 8 | # The location of your root openFrameworks installation 9 | # (default) OF_ROOT = ../../.. 10 | ################################################################################ 11 | # OF_ROOT = ../../.. 12 | 13 | ################################################################################ 14 | # PROJECT ROOT 15 | # The location of the project - a starting place for searching for files 16 | # (default) PROJECT_ROOT = . (this directory) 17 | # 18 | ################################################################################ 19 | # PROJECT_ROOT = . 20 | 21 | ################################################################################ 22 | # PROJECT SPECIFIC CHECKS 23 | # This is a project defined section to create internal makefile flags to 24 | # conditionally enable or disable the addition of various features within 25 | # this makefile. For instance, if you want to make changes based on whether 26 | # GTK is installed, one might test that here and create a variable to check. 27 | ################################################################################ 28 | # None 29 | 30 | ################################################################################ 31 | # PROJECT EXTERNAL SOURCE PATHS 32 | # These are fully qualified paths that are not within the PROJECT_ROOT folder. 33 | # Like source folders in the PROJECT_ROOT, these paths are subject to 34 | # exlclusion via the PROJECT_EXLCUSIONS list. 35 | # 36 | # (default) PROJECT_EXTERNAL_SOURCE_PATHS = (blank) 37 | # 38 | # Note: Leave a leading space when adding list items with the += operator 39 | ################################################################################ 40 | # PROJECT_EXTERNAL_SOURCE_PATHS = 41 | 42 | ################################################################################ 43 | # PROJECT EXCLUSIONS 44 | # These makefiles assume that all folders in your current project directory 45 | # and any listed in the PROJECT_EXTERNAL_SOURCH_PATHS are are valid locations 46 | # to look for source code. The any folders or files that match any of the 47 | # items in the PROJECT_EXCLUSIONS list below will be ignored. 48 | # 49 | # Each item in the PROJECT_EXCLUSIONS list will be treated as a complete 50 | # string unless teh user adds a wildcard (%) operator to match subdirectories. 51 | # GNU make only allows one wildcard for matching. The second wildcard (%) is 52 | # treated literally. 53 | # 54 | # (default) PROJECT_EXCLUSIONS = (blank) 55 | # 56 | # Will automatically exclude the following: 57 | # 58 | # $(PROJECT_ROOT)/bin% 59 | # $(PROJECT_ROOT)/obj% 60 | # $(PROJECT_ROOT)/%.xcodeproj 61 | # 62 | # Note: Leave a leading space when adding list items with the += operator 63 | ################################################################################ 64 | # PROJECT_EXCLUSIONS = 65 | 66 | ################################################################################ 67 | # PROJECT LINKER FLAGS 68 | # These flags will be sent to the linker when compiling the executable. 69 | # 70 | # (default) PROJECT_LDFLAGS = -Wl,-rpath=./libs 71 | # 72 | # Note: Leave a leading space when adding list items with the += operator 73 | # 74 | # Currently, shared libraries that are needed are copied to the 75 | # $(PROJECT_ROOT)/bin/libs directory. The following LDFLAGS tell the linker to 76 | # add a runtime path to search for those shared libraries, since they aren't 77 | # incorporated directly into the final executable application binary. 78 | ################################################################################ 79 | # PROJECT_LDFLAGS=-Wl,-rpath=./libs 80 | 81 | ################################################################################ 82 | # PROJECT DEFINES 83 | # Create a space-delimited list of DEFINES. The list will be converted into 84 | # CFLAGS with the "-D" flag later in the makefile. 85 | # 86 | # (default) PROJECT_DEFINES = (blank) 87 | # 88 | # Note: Leave a leading space when adding list items with the += operator 89 | ################################################################################ 90 | # PROJECT_DEFINES = 91 | 92 | ################################################################################ 93 | # PROJECT CFLAGS 94 | # This is a list of fully qualified CFLAGS required when compiling for this 95 | # project. These CFLAGS will be used IN ADDITION TO the PLATFORM_CFLAGS 96 | # defined in your platform specific core configuration files. These flags are 97 | # presented to the compiler BEFORE the PROJECT_OPTIMIZATION_CFLAGS below. 98 | # 99 | # (default) PROJECT_CFLAGS = (blank) 100 | # 101 | # Note: Before adding PROJECT_CFLAGS, note that the PLATFORM_CFLAGS defined in 102 | # your platform specific configuration file will be applied by default and 103 | # further flags here may not be needed. 104 | # 105 | # Note: Leave a leading space when adding list items with the += operator 106 | ################################################################################ 107 | # PROJECT_CFLAGS = 108 | 109 | ################################################################################ 110 | # PROJECT OPTIMIZATION CFLAGS 111 | # These are lists of CFLAGS that are target-specific. While any flags could 112 | # be conditionally added, they are usually limited to optimization flags. 113 | # These flags are added BEFORE the PROJECT_CFLAGS. 114 | # 115 | # PROJECT_OPTIMIZATION_CFLAGS_RELEASE flags are only applied to RELEASE targets. 116 | # 117 | # (default) PROJECT_OPTIMIZATION_CFLAGS_RELEASE = (blank) 118 | # 119 | # PROJECT_OPTIMIZATION_CFLAGS_DEBUG flags are only applied to DEBUG targets. 120 | # 121 | # (default) PROJECT_OPTIMIZATION_CFLAGS_DEBUG = (blank) 122 | # 123 | # Note: Before adding PROJECT_OPTIMIZATION_CFLAGS, please note that the 124 | # PLATFORM_OPTIMIZATION_CFLAGS defined in your platform specific configuration 125 | # file will be applied by default and further optimization flags here may not 126 | # be needed. 127 | # 128 | # Note: Leave a leading space when adding list items with the += operator 129 | ################################################################################ 130 | # PROJECT_OPTIMIZATION_CFLAGS_RELEASE = 131 | # PROJECT_OPTIMIZATION_CFLAGS_DEBUG = 132 | 133 | ################################################################################ 134 | # PROJECT COMPILERS 135 | # Custom compilers can be set for CC and CXX 136 | # (default) PROJECT_CXX = (blank) 137 | # (default) PROJECT_CC = (blank) 138 | # Note: Leave a leading space when adding list items with the += operator 139 | ################################################################################ 140 | # PROJECT_CXX = 141 | # PROJECT_CC = 142 | -------------------------------------------------------------------------------- /src/main.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | #include "ofApp.h" 3 | 4 | //======================================================================== 5 | int main( ){ 6 | 7 | ofSetupOpenGL(1024,768, OF_WINDOW); // <-------- setup the GL context 8 | 9 | // this kicks off the running of my app 10 | // can be OF_WINDOW or OF_FULLSCREEN 11 | // pass in width and height too: 12 | ofRunApp( new ofApp()); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/ofApp.cpp: -------------------------------------------------------------------------------- 1 | #include "ofApp.h" 2 | 3 | //-------------------------------------------------------------- 4 | void ofApp::setup(){ 5 | 6 | } 7 | 8 | //-------------------------------------------------------------- 9 | void ofApp::update(){ 10 | 11 | } 12 | 13 | //-------------------------------------------------------------- 14 | void ofApp::draw(){ 15 | 16 | } 17 | 18 | //-------------------------------------------------------------- 19 | void ofApp::keyPressed(int key){ 20 | 21 | } 22 | 23 | //-------------------------------------------------------------- 24 | void ofApp::keyReleased(int key){ 25 | 26 | } 27 | 28 | //-------------------------------------------------------------- 29 | void ofApp::mouseMoved(int x, int y){ 30 | 31 | } 32 | 33 | //-------------------------------------------------------------- 34 | void ofApp::mouseDragged(int x, int y, int button){ 35 | 36 | } 37 | 38 | //-------------------------------------------------------------- 39 | void ofApp::mousePressed(int x, int y, int button){ 40 | 41 | } 42 | 43 | //-------------------------------------------------------------- 44 | void ofApp::mouseReleased(int x, int y, int button){ 45 | 46 | } 47 | 48 | //-------------------------------------------------------------- 49 | void ofApp::mouseEntered(int x, int y){ 50 | 51 | } 52 | 53 | //-------------------------------------------------------------- 54 | void ofApp::mouseExited(int x, int y){ 55 | 56 | } 57 | 58 | //-------------------------------------------------------------- 59 | void ofApp::windowResized(int w, int h){ 60 | 61 | } 62 | 63 | //-------------------------------------------------------------- 64 | void ofApp::gotMessage(ofMessage msg){ 65 | 66 | } 67 | 68 | //-------------------------------------------------------------- 69 | void ofApp::dragEvent(ofDragInfo dragInfo){ 70 | 71 | } -------------------------------------------------------------------------------- /src/ofApp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | 5 | class ofApp : public ofBaseApp{ 6 | public: 7 | void setup(); 8 | void update(); 9 | void draw(); 10 | 11 | void keyPressed(int key); 12 | void keyReleased(int key); 13 | void mouseMoved(int x, int y); 14 | void mouseDragged(int x, int y, int button); 15 | void mousePressed(int x, int y, int button); 16 | void mouseReleased(int x, int y, int button); 17 | void mouseEntered(int x, int y); 18 | void mouseExited(int x, int y); 19 | void windowResized(int w, int h); 20 | void dragEvent(ofDragInfo dragInfo); 21 | void gotMessage(ofMessage msg); 22 | }; 23 | --------------------------------------------------------------------------------