├── example ├── .gitignore ├── Makefile ├── Project.xcconfig ├── config.make ├── example.xcodeproj │ └── project.pbxproj ├── openFrameworks-Info.plist └── src │ └── ofApp.cpp └── src └── ofxGlobalContext.h /example/.gitignore: -------------------------------------------------------------------------------- 1 | .svn 2 | .hg 3 | .cvs 4 | 5 | # osx 6 | .DS_Store 7 | .AppleDouble 8 | .LSOverride 9 | Icon 10 | *.app 11 | ._* 12 | 13 | # xcode3 14 | *.mode1v3 15 | *.pbxuser 16 | build/ 17 | 18 | # xcode4 19 | *.xcodeproj/* 20 | !*.xcodeproj/project.pbxproj 21 | !*.xcodeproj/default.* 22 | **/*.xcodeproj/* 23 | !**/*.xcodeproj/project.pbxproj 24 | !**/*.xcodeproj/default.* 25 | *.xcworkspace/* 26 | !*.xcworkspace/contents.xcworkspacedata 27 | 28 | # windows 29 | *.exe 30 | Thumbs.db 31 | ehthumbs.db 32 | 33 | # vs 34 | ipch/ 35 | [Bb]in/ 36 | [Oo]bj/ 37 | *.aps 38 | *.ncb 39 | *.opensdf 40 | *.sdf 41 | *.cachefile 42 | *.suo 43 | *.user 44 | *.sln.docstates 45 | 46 | # Object files 47 | *.o 48 | 49 | # Libraries 50 | *.lib 51 | *.a 52 | 53 | # Shared objects (inc. Windows DLLs) 54 | *.dll 55 | *.so 56 | *.so.* 57 | *.dylib 58 | 59 | -------------------------------------------------------------------------------- /example/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=../../.. 10 | endif 11 | 12 | # call the project makefile! 13 | include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk 14 | -------------------------------------------------------------------------------- /example/Project.xcconfig: -------------------------------------------------------------------------------- 1 | //THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT. 2 | //THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED 3 | OF_PATH = ../../.. 4 | 5 | //THIS HAS ALL THE HEADER AND LIBS FOR OF CORE 6 | #include "../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig" 7 | 8 | //ICONS - NEW IN 0072 9 | ICON_NAME_DEBUG = icon-debug.icns 10 | ICON_NAME_RELEASE = icon.icns 11 | ICON_FILE_PATH = $(OF_PATH)/libs/openFrameworksCompiled/project/osx/ 12 | 13 | //IF YOU WANT AN APP TO HAVE A CUSTOM ICON - PUT THEM IN YOUR DATA FOLDER AND CHANGE ICON_FILE_PATH to: 14 | //ICON_FILE_PATH = bin/data/ 15 | 16 | OTHER_LDFLAGS = $(OF_CORE_LIBS) 17 | HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS) 18 | -------------------------------------------------------------------------------- /example/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 | 75 | # Currently, shared libraries that are needed are copied to the 76 | # $(PROJECT_ROOT)/bin/libs directory. The following LDFLAGS tell the linker to 77 | # add a runtime path to search for those shared libraries, since they aren't 78 | # incorporated directly into the final executable application binary. 79 | # TODO: should this be a default setting? 80 | # PROJECT_LDFLAGS=-Wl,-rpath=./libs 81 | 82 | ################################################################################ 83 | # PROJECT DEFINES 84 | # Create a space-delimited list of DEFINES. The list will be converted into 85 | # CFLAGS with the "-D" flag later in the makefile. 86 | # 87 | # (default) PROJECT_DEFINES = (blank) 88 | # 89 | # Note: Leave a leading space when adding list items with the += operator 90 | ################################################################################ 91 | # PROJECT_DEFINES = 92 | 93 | ################################################################################ 94 | # PROJECT CFLAGS 95 | # This is a list of fully qualified CFLAGS required when compiling for this 96 | # project. These CFLAGS will be used IN ADDITION TO the PLATFORM_CFLAGS 97 | # defined in your platform specific core configuration files. These flags are 98 | # presented to the compiler BEFORE the PROJECT_OPTIMIZATION_CFLAGS below. 99 | # 100 | # (default) PROJECT_CFLAGS = (blank) 101 | # 102 | # Note: Before adding PROJECT_CFLAGS, note that the PLATFORM_CFLAGS defined in 103 | # your platform specific configuration file will be applied by default and 104 | # further flags here may not be needed. 105 | # 106 | # Note: Leave a leading space when adding list items with the += operator 107 | ################################################################################ 108 | # PROJECT_CFLAGS = 109 | 110 | ################################################################################ 111 | # PROJECT OPTIMIZATION CFLAGS 112 | # These are lists of CFLAGS that are target-specific. While any flags could 113 | # be conditionally added, they are usually limited to optimization flags. 114 | # These flags are added BEFORE the PROJECT_CFLAGS. 115 | # 116 | # PROJECT_OPTIMIZATION_CFLAGS_RELEASE flags are only applied to RELEASE targets. 117 | # 118 | # (default) PROJECT_OPTIMIZATION_CFLAGS_RELEASE = (blank) 119 | # 120 | # PROJECT_OPTIMIZATION_CFLAGS_DEBUG flags are only applied to DEBUG targets. 121 | # 122 | # (default) PROJECT_OPTIMIZATION_CFLAGS_DEBUG = (blank) 123 | # 124 | # Note: Before adding PROJECT_OPTIMIZATION_CFLAGS, please note that the 125 | # PLATFORM_OPTIMIZATION_CFLAGS defined in your platform specific configuration 126 | # file will be applied by default and further optimization flags here may not 127 | # be needed. 128 | # 129 | # Note: Leave a leading space when adding list items with the += operator 130 | ################################################################################ 131 | # PROJECT_OPTIMIZATION_CFLAGS_RELEASE = 132 | # PROJECT_OPTIMIZATION_CFLAGS_DEBUG = 133 | 134 | ################################################################################ 135 | # PROJECT COMPILERS 136 | # Custom compilers can be set for CC and CXX 137 | # (default) PROJECT_CXX = (blank) 138 | # (default) PROJECT_CC = (blank) 139 | # Note: Leave a leading space when adding list items with the += operator 140 | ################################################################################ 141 | # PROJECT_CXX = 142 | # PROJECT_CC = 143 | -------------------------------------------------------------------------------- /example/example.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | BBAB23CB13894F3D00AA2426 /* GLUT.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = BBAB23BE13894E4700AA2426 /* GLUT.framework */; }; 11 | E4328149138ABC9F0047C5CB /* openFrameworksDebug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4328148138ABC890047C5CB /* openFrameworksDebug.a */; }; 12 | E45BE97B0E8CC7DD009D7055 /* AGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9710E8CC7DD009D7055 /* AGL.framework */; }; 13 | E45BE97C0E8CC7DD009D7055 /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9720E8CC7DD009D7055 /* ApplicationServices.framework */; }; 14 | E45BE97D0E8CC7DD009D7055 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9730E8CC7DD009D7055 /* AudioToolbox.framework */; }; 15 | E45BE97E0E8CC7DD009D7055 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9740E8CC7DD009D7055 /* Carbon.framework */; }; 16 | E45BE97F0E8CC7DD009D7055 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9750E8CC7DD009D7055 /* CoreAudio.framework */; }; 17 | E45BE9800E8CC7DD009D7055 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9760E8CC7DD009D7055 /* CoreFoundation.framework */; }; 18 | E45BE9810E8CC7DD009D7055 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9770E8CC7DD009D7055 /* CoreServices.framework */; }; 19 | E45BE9830E8CC7DD009D7055 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9790E8CC7DD009D7055 /* OpenGL.framework */; }; 20 | E45BE9840E8CC7DD009D7055 /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE97A0E8CC7DD009D7055 /* QuickTime.framework */; }; 21 | E4B69E210A3A1BDC003C02F2 /* ofApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4B69E1E0A3A1BDC003C02F2 /* ofApp.cpp */; }; 22 | E4C2424710CC5A17004149E2 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2424410CC5A17004149E2 /* AppKit.framework */; }; 23 | E4C2424810CC5A17004149E2 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2424510CC5A17004149E2 /* Cocoa.framework */; }; 24 | E4C2424910CC5A17004149E2 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2424610CC5A17004149E2 /* IOKit.framework */; }; 25 | E4EB6799138ADC1D00A09F29 /* GLUT.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBAB23BE13894E4700AA2426 /* GLUT.framework */; }; 26 | E7E077E515D3B63C0020DFD4 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E7E077E415D3B63C0020DFD4 /* CoreVideo.framework */; }; 27 | E7E077E815D3B6510020DFD4 /* QTKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E7E077E715D3B6510020DFD4 /* QTKit.framework */; }; 28 | E7F985F815E0DEA3003869B5 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E7F985F515E0DE99003869B5 /* Accelerate.framework */; }; 29 | /* End PBXBuildFile section */ 30 | 31 | /* Begin PBXContainerItemProxy section */ 32 | E4328147138ABC890047C5CB /* PBXContainerItemProxy */ = { 33 | isa = PBXContainerItemProxy; 34 | containerPortal = E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */; 35 | proxyType = 2; 36 | remoteGlobalIDString = E4B27C1510CBEB8E00536013; 37 | remoteInfo = openFrameworks; 38 | }; 39 | E4EEB9AB138B136A00A80321 /* PBXContainerItemProxy */ = { 40 | isa = PBXContainerItemProxy; 41 | containerPortal = E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */; 42 | proxyType = 1; 43 | remoteGlobalIDString = E4B27C1410CBEB8E00536013; 44 | remoteInfo = openFrameworks; 45 | }; 46 | /* End PBXContainerItemProxy section */ 47 | 48 | /* Begin PBXCopyFilesBuildPhase section */ 49 | E4C2427710CC5ABF004149E2 /* CopyFiles */ = { 50 | isa = PBXCopyFilesBuildPhase; 51 | buildActionMask = 2147483647; 52 | dstPath = ""; 53 | dstSubfolderSpec = 10; 54 | files = ( 55 | BBAB23CB13894F3D00AA2426 /* GLUT.framework in CopyFiles */, 56 | ); 57 | runOnlyForDeploymentPostprocessing = 0; 58 | }; 59 | /* End PBXCopyFilesBuildPhase section */ 60 | 61 | /* Begin PBXFileReference section */ 62 | BBAB23BE13894E4700AA2426 /* GLUT.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLUT.framework; path = ../../../libs/glut/lib/osx/GLUT.framework; sourceTree = ""; }; 63 | E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = openFrameworksLib.xcodeproj; path = ../../../libs/openFrameworksCompiled/project/osx/openFrameworksLib.xcodeproj; sourceTree = SOURCE_ROOT; }; 64 | E45BE9710E8CC7DD009D7055 /* AGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AGL.framework; path = /System/Library/Frameworks/AGL.framework; sourceTree = ""; }; 65 | E45BE9720E8CC7DD009D7055 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = ""; }; 66 | E45BE9730E8CC7DD009D7055 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = /System/Library/Frameworks/AudioToolbox.framework; sourceTree = ""; }; 67 | E45BE9740E8CC7DD009D7055 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = ""; }; 68 | E45BE9750E8CC7DD009D7055 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = ""; }; 69 | E45BE9760E8CC7DD009D7055 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = ""; }; 70 | E45BE9770E8CC7DD009D7055 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = ""; }; 71 | E45BE9790E8CC7DD009D7055 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = ""; }; 72 | E45BE97A0E8CC7DD009D7055 /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = ""; }; 73 | E4B69B5B0A3A1756003C02F2 /* exampleDebug.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = exampleDebug.app; sourceTree = BUILT_PRODUCTS_DIR; }; 74 | E4B69E1E0A3A1BDC003C02F2 /* ofApp.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = ofApp.cpp; path = src/ofApp.cpp; sourceTree = SOURCE_ROOT; }; 75 | E4B6FCAD0C3E899E008CF71C /* openFrameworks-Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; path = "openFrameworks-Info.plist"; sourceTree = ""; }; 76 | E4C2424410CC5A17004149E2 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; 77 | E4C2424510CC5A17004149E2 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; 78 | E4C2424610CC5A17004149E2 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = ""; }; 79 | E4EB691F138AFCF100A09F29 /* CoreOF.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = CoreOF.xcconfig; path = ../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig; sourceTree = SOURCE_ROOT; }; 80 | E4EB6923138AFD0F00A09F29 /* Project.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Project.xcconfig; sourceTree = ""; }; 81 | E7A1D38B1852B8EF00895851 /* ofxGlobalContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxGlobalContext.h; sourceTree = ""; }; 82 | E7E077E415D3B63C0020DFD4 /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = /System/Library/Frameworks/CoreVideo.framework; sourceTree = ""; }; 83 | E7E077E715D3B6510020DFD4 /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = /System/Library/Frameworks/QTKit.framework; sourceTree = ""; }; 84 | E7F985F515E0DE99003869B5 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = /System/Library/Frameworks/Accelerate.framework; sourceTree = ""; }; 85 | /* End PBXFileReference section */ 86 | 87 | /* Begin PBXFrameworksBuildPhase section */ 88 | E4B69B590A3A1756003C02F2 /* Frameworks */ = { 89 | isa = PBXFrameworksBuildPhase; 90 | buildActionMask = 2147483647; 91 | files = ( 92 | E7F985F815E0DEA3003869B5 /* Accelerate.framework in Frameworks */, 93 | E7E077E815D3B6510020DFD4 /* QTKit.framework in Frameworks */, 94 | E4EB6799138ADC1D00A09F29 /* GLUT.framework in Frameworks */, 95 | E4328149138ABC9F0047C5CB /* openFrameworksDebug.a in Frameworks */, 96 | E45BE97B0E8CC7DD009D7055 /* AGL.framework in Frameworks */, 97 | E45BE97C0E8CC7DD009D7055 /* ApplicationServices.framework in Frameworks */, 98 | E45BE97D0E8CC7DD009D7055 /* AudioToolbox.framework in Frameworks */, 99 | E45BE97E0E8CC7DD009D7055 /* Carbon.framework in Frameworks */, 100 | E45BE97F0E8CC7DD009D7055 /* CoreAudio.framework in Frameworks */, 101 | E45BE9800E8CC7DD009D7055 /* CoreFoundation.framework in Frameworks */, 102 | E45BE9810E8CC7DD009D7055 /* CoreServices.framework in Frameworks */, 103 | E45BE9830E8CC7DD009D7055 /* OpenGL.framework in Frameworks */, 104 | E45BE9840E8CC7DD009D7055 /* QuickTime.framework in Frameworks */, 105 | E4C2424710CC5A17004149E2 /* AppKit.framework in Frameworks */, 106 | E4C2424810CC5A17004149E2 /* Cocoa.framework in Frameworks */, 107 | E4C2424910CC5A17004149E2 /* IOKit.framework in Frameworks */, 108 | E7E077E515D3B63C0020DFD4 /* CoreVideo.framework in Frameworks */, 109 | ); 110 | runOnlyForDeploymentPostprocessing = 0; 111 | }; 112 | /* End PBXFrameworksBuildPhase section */ 113 | 114 | /* Begin PBXGroup section */ 115 | BB4B014C10F69532006C3DED /* addons */ = { 116 | isa = PBXGroup; 117 | children = ( 118 | E7A1D3891852B8E800895851 /* ofxGlobalContext */, 119 | ); 120 | name = addons; 121 | sourceTree = ""; 122 | }; 123 | BBAB23C913894ECA00AA2426 /* system frameworks */ = { 124 | isa = PBXGroup; 125 | children = ( 126 | E7F985F515E0DE99003869B5 /* Accelerate.framework */, 127 | E4C2424410CC5A17004149E2 /* AppKit.framework */, 128 | E4C2424510CC5A17004149E2 /* Cocoa.framework */, 129 | E4C2424610CC5A17004149E2 /* IOKit.framework */, 130 | E45BE9710E8CC7DD009D7055 /* AGL.framework */, 131 | E45BE9720E8CC7DD009D7055 /* ApplicationServices.framework */, 132 | E45BE9730E8CC7DD009D7055 /* AudioToolbox.framework */, 133 | E45BE9740E8CC7DD009D7055 /* Carbon.framework */, 134 | E45BE9750E8CC7DD009D7055 /* CoreAudio.framework */, 135 | E45BE9760E8CC7DD009D7055 /* CoreFoundation.framework */, 136 | E45BE9770E8CC7DD009D7055 /* CoreServices.framework */, 137 | E45BE9790E8CC7DD009D7055 /* OpenGL.framework */, 138 | E45BE97A0E8CC7DD009D7055 /* QuickTime.framework */, 139 | E7E077E415D3B63C0020DFD4 /* CoreVideo.framework */, 140 | E7E077E715D3B6510020DFD4 /* QTKit.framework */, 141 | ); 142 | name = "system frameworks"; 143 | sourceTree = ""; 144 | }; 145 | BBAB23CA13894EDB00AA2426 /* 3rd party frameworks */ = { 146 | isa = PBXGroup; 147 | children = ( 148 | BBAB23BE13894E4700AA2426 /* GLUT.framework */, 149 | ); 150 | name = "3rd party frameworks"; 151 | sourceTree = ""; 152 | }; 153 | E4328144138ABC890047C5CB /* Products */ = { 154 | isa = PBXGroup; 155 | children = ( 156 | E4328148138ABC890047C5CB /* openFrameworksDebug.a */, 157 | ); 158 | name = Products; 159 | sourceTree = ""; 160 | }; 161 | E45BE5980E8CC70C009D7055 /* frameworks */ = { 162 | isa = PBXGroup; 163 | children = ( 164 | BBAB23CA13894EDB00AA2426 /* 3rd party frameworks */, 165 | BBAB23C913894ECA00AA2426 /* system frameworks */, 166 | ); 167 | name = frameworks; 168 | sourceTree = ""; 169 | }; 170 | E4B69B4A0A3A1720003C02F2 = { 171 | isa = PBXGroup; 172 | children = ( 173 | E4B6FCAD0C3E899E008CF71C /* openFrameworks-Info.plist */, 174 | E4EB6923138AFD0F00A09F29 /* Project.xcconfig */, 175 | E4B69E1C0A3A1BDC003C02F2 /* src */, 176 | E4EEC9E9138DF44700A80321 /* openFrameworks */, 177 | BB4B014C10F69532006C3DED /* addons */, 178 | E45BE5980E8CC70C009D7055 /* frameworks */, 179 | E4B69B5B0A3A1756003C02F2 /* exampleDebug.app */, 180 | ); 181 | sourceTree = ""; 182 | }; 183 | E4B69E1C0A3A1BDC003C02F2 /* src */ = { 184 | isa = PBXGroup; 185 | children = ( 186 | E4B69E1E0A3A1BDC003C02F2 /* ofApp.cpp */, 187 | ); 188 | path = src; 189 | sourceTree = SOURCE_ROOT; 190 | }; 191 | E4EEC9E9138DF44700A80321 /* openFrameworks */ = { 192 | isa = PBXGroup; 193 | children = ( 194 | E4EB691F138AFCF100A09F29 /* CoreOF.xcconfig */, 195 | E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */, 196 | ); 197 | name = openFrameworks; 198 | sourceTree = ""; 199 | }; 200 | E7A1D3891852B8E800895851 /* ofxGlobalContext */ = { 201 | isa = PBXGroup; 202 | children = ( 203 | E7A1D38A1852B8EF00895851 /* src */, 204 | ); 205 | name = ofxGlobalContext; 206 | sourceTree = ""; 207 | }; 208 | E7A1D38A1852B8EF00895851 /* src */ = { 209 | isa = PBXGroup; 210 | children = ( 211 | E7A1D38B1852B8EF00895851 /* ofxGlobalContext.h */, 212 | ); 213 | name = src; 214 | path = ../src; 215 | sourceTree = ""; 216 | }; 217 | /* End PBXGroup section */ 218 | 219 | /* Begin PBXNativeTarget section */ 220 | E4B69B5A0A3A1756003C02F2 /* example */ = { 221 | isa = PBXNativeTarget; 222 | buildConfigurationList = E4B69B5F0A3A1757003C02F2 /* Build configuration list for PBXNativeTarget "example" */; 223 | buildPhases = ( 224 | E4B69B580A3A1756003C02F2 /* Sources */, 225 | E4B69B590A3A1756003C02F2 /* Frameworks */, 226 | E4B6FFFD0C3F9AB9008CF71C /* ShellScript */, 227 | E4C2427710CC5ABF004149E2 /* CopyFiles */, 228 | ); 229 | buildRules = ( 230 | ); 231 | dependencies = ( 232 | E4EEB9AC138B136A00A80321 /* PBXTargetDependency */, 233 | ); 234 | name = example; 235 | productName = myOFApp; 236 | productReference = E4B69B5B0A3A1756003C02F2 /* exampleDebug.app */; 237 | productType = "com.apple.product-type.application"; 238 | }; 239 | /* End PBXNativeTarget section */ 240 | 241 | /* Begin PBXProject section */ 242 | E4B69B4C0A3A1720003C02F2 /* Project object */ = { 243 | isa = PBXProject; 244 | attributes = { 245 | LastUpgradeCheck = 0460; 246 | }; 247 | buildConfigurationList = E4B69B4D0A3A1720003C02F2 /* Build configuration list for PBXProject "example" */; 248 | compatibilityVersion = "Xcode 3.2"; 249 | developmentRegion = English; 250 | hasScannedForEncodings = 0; 251 | knownRegions = ( 252 | English, 253 | Japanese, 254 | French, 255 | German, 256 | ); 257 | mainGroup = E4B69B4A0A3A1720003C02F2; 258 | productRefGroup = E4B69B4A0A3A1720003C02F2; 259 | projectDirPath = ""; 260 | projectReferences = ( 261 | { 262 | ProductGroup = E4328144138ABC890047C5CB /* Products */; 263 | ProjectRef = E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */; 264 | }, 265 | ); 266 | projectRoot = ""; 267 | targets = ( 268 | E4B69B5A0A3A1756003C02F2 /* example */, 269 | ); 270 | }; 271 | /* End PBXProject section */ 272 | 273 | /* Begin PBXReferenceProxy section */ 274 | E4328148138ABC890047C5CB /* openFrameworksDebug.a */ = { 275 | isa = PBXReferenceProxy; 276 | fileType = archive.ar; 277 | path = openFrameworksDebug.a; 278 | remoteRef = E4328147138ABC890047C5CB /* PBXContainerItemProxy */; 279 | sourceTree = BUILT_PRODUCTS_DIR; 280 | }; 281 | /* End PBXReferenceProxy section */ 282 | 283 | /* Begin PBXShellScriptBuildPhase section */ 284 | E4B6FFFD0C3F9AB9008CF71C /* ShellScript */ = { 285 | isa = PBXShellScriptBuildPhase; 286 | buildActionMask = 2147483647; 287 | files = ( 288 | ); 289 | inputPaths = ( 290 | ); 291 | outputPaths = ( 292 | ); 293 | runOnlyForDeploymentPostprocessing = 0; 294 | shellPath = /bin/sh; 295 | shellScript = "cp -f ../../../libs/fmodex/lib/osx/libfmodex.dylib \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/libfmodex.dylib\"; install_name_tool -change ./libfmodex.dylib @executable_path/libfmodex.dylib \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/MacOS/$PRODUCT_NAME\";\nmkdir -p \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/Resources/\"\ncp -f \"$ICON_FILE\" \"$TARGET_BUILD_DIR/$PRODUCT_NAME.app/Contents/Resources/\"\n"; 296 | }; 297 | /* End PBXShellScriptBuildPhase section */ 298 | 299 | /* Begin PBXSourcesBuildPhase section */ 300 | E4B69B580A3A1756003C02F2 /* Sources */ = { 301 | isa = PBXSourcesBuildPhase; 302 | buildActionMask = 2147483647; 303 | files = ( 304 | E4B69E210A3A1BDC003C02F2 /* ofApp.cpp in Sources */, 305 | ); 306 | runOnlyForDeploymentPostprocessing = 0; 307 | }; 308 | /* End PBXSourcesBuildPhase section */ 309 | 310 | /* Begin PBXTargetDependency section */ 311 | E4EEB9AC138B136A00A80321 /* PBXTargetDependency */ = { 312 | isa = PBXTargetDependency; 313 | name = openFrameworks; 314 | targetProxy = E4EEB9AB138B136A00A80321 /* PBXContainerItemProxy */; 315 | }; 316 | /* End PBXTargetDependency section */ 317 | 318 | /* Begin XCBuildConfiguration section */ 319 | E4B69B4E0A3A1720003C02F2 /* Debug */ = { 320 | isa = XCBuildConfiguration; 321 | baseConfigurationReference = E4EB6923138AFD0F00A09F29 /* Project.xcconfig */; 322 | buildSettings = { 323 | ARCHS = "$(NATIVE_ARCH)"; 324 | CONFIGURATION_BUILD_DIR = "$(SRCROOT)/bin/"; 325 | COPY_PHASE_STRIP = NO; 326 | DEAD_CODE_STRIPPING = YES; 327 | GCC_AUTO_VECTORIZATION = YES; 328 | GCC_ENABLE_SSE3_EXTENSIONS = YES; 329 | GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS = YES; 330 | GCC_INLINES_ARE_PRIVATE_EXTERN = NO; 331 | GCC_OPTIMIZATION_LEVEL = 0; 332 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 333 | GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES; 334 | GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = NO; 335 | GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = NO; 336 | GCC_WARN_UNINITIALIZED_AUTOS = NO; 337 | GCC_WARN_UNUSED_VALUE = NO; 338 | GCC_WARN_UNUSED_VARIABLE = NO; 339 | MACOSX_DEPLOYMENT_TARGET = 10.6; 340 | OTHER_CPLUSPLUSFLAGS = ( 341 | "-D__MACOSX_CORE__", 342 | "-lpthread", 343 | "-mtune=native", 344 | ); 345 | SDKROOT = macosx; 346 | }; 347 | name = Debug; 348 | }; 349 | E4B69B4F0A3A1720003C02F2 /* Release */ = { 350 | isa = XCBuildConfiguration; 351 | baseConfigurationReference = E4EB6923138AFD0F00A09F29 /* Project.xcconfig */; 352 | buildSettings = { 353 | ARCHS = "$(NATIVE_ARCH)"; 354 | CONFIGURATION_BUILD_DIR = "$(SRCROOT)/bin/"; 355 | COPY_PHASE_STRIP = YES; 356 | DEAD_CODE_STRIPPING = YES; 357 | GCC_AUTO_VECTORIZATION = YES; 358 | GCC_ENABLE_SSE3_EXTENSIONS = YES; 359 | GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS = YES; 360 | GCC_INLINES_ARE_PRIVATE_EXTERN = NO; 361 | GCC_OPTIMIZATION_LEVEL = 3; 362 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 363 | GCC_UNROLL_LOOPS = YES; 364 | GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES; 365 | GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = NO; 366 | GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = NO; 367 | GCC_WARN_UNINITIALIZED_AUTOS = NO; 368 | GCC_WARN_UNUSED_VALUE = NO; 369 | GCC_WARN_UNUSED_VARIABLE = NO; 370 | MACOSX_DEPLOYMENT_TARGET = 10.6; 371 | OTHER_CPLUSPLUSFLAGS = ( 372 | "-D__MACOSX_CORE__", 373 | "-lpthread", 374 | "-mtune=native", 375 | ); 376 | SDKROOT = macosx; 377 | }; 378 | name = Release; 379 | }; 380 | E4B69B600A3A1757003C02F2 /* Debug */ = { 381 | isa = XCBuildConfiguration; 382 | buildSettings = { 383 | COMBINE_HIDPI_IMAGES = YES; 384 | COPY_PHASE_STRIP = NO; 385 | FRAMEWORK_SEARCH_PATHS = ( 386 | "$(inherited)", 387 | "$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", 388 | ); 389 | FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../../libs/glut/lib/osx\""; 390 | GCC_DYNAMIC_NO_PIC = NO; 391 | GCC_GENERATE_DEBUGGING_SYMBOLS = YES; 392 | GCC_MODEL_TUNING = NONE; 393 | ICON = "$(ICON_NAME_DEBUG)"; 394 | ICON_FILE = "$(ICON_FILE_PATH)$(ICON)"; 395 | INFOPLIST_FILE = "openFrameworks-Info.plist"; 396 | INSTALL_PATH = "$(HOME)/Applications"; 397 | LIBRARY_SEARCH_PATHS = ( 398 | "$(inherited)", 399 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", 400 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", 401 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3)", 402 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4)", 403 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_5)", 404 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_6)", 405 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_7)", 406 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_8)", 407 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_9)", 408 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_10)", 409 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_11)", 410 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_12)", 411 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_13)", 412 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_14)", 413 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_15)", 414 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", 415 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3)", 416 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_7)", 417 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_8)", 418 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_9)", 419 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_10)", 420 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_11)", 421 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_12)", 422 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_13)", 423 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_16)", 424 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_17)", 425 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_18)", 426 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_19)", 427 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_20)", 428 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_21)", 429 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_22)", 430 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_23)", 431 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_24)", 432 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_25)", 433 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_26)", 434 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_27)", 435 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_28)", 436 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_29)", 437 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_30)", 438 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_31)", 439 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_32)", 440 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_33)", 441 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_34)", 442 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_35)", 443 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_36)", 444 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_37)", 445 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_38)", 446 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_39)", 447 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_40)", 448 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_41)", 449 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_42)", 450 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_43)", 451 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_44)", 452 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_45)", 453 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_46)", 454 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_47)", 455 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_48)", 456 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_49)", 457 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_50)", 458 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_51)", 459 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_52)", 460 | ); 461 | PRODUCT_NAME = exampleDebug; 462 | WRAPPER_EXTENSION = app; 463 | }; 464 | name = Debug; 465 | }; 466 | E4B69B610A3A1757003C02F2 /* Release */ = { 467 | isa = XCBuildConfiguration; 468 | buildSettings = { 469 | COMBINE_HIDPI_IMAGES = YES; 470 | COPY_PHASE_STRIP = YES; 471 | FRAMEWORK_SEARCH_PATHS = ( 472 | "$(inherited)", 473 | "$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", 474 | ); 475 | FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../../libs/glut/lib/osx\""; 476 | GCC_GENERATE_DEBUGGING_SYMBOLS = YES; 477 | GCC_MODEL_TUNING = NONE; 478 | ICON = "$(ICON_NAME_RELEASE)"; 479 | ICON_FILE = "$(ICON_FILE_PATH)$(ICON)"; 480 | INFOPLIST_FILE = "openFrameworks-Info.plist"; 481 | INSTALL_PATH = "$(HOME)/Applications"; 482 | LIBRARY_SEARCH_PATHS = ( 483 | "$(inherited)", 484 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)", 485 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", 486 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3)", 487 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4)", 488 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_5)", 489 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_6)", 490 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_7)", 491 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_8)", 492 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_9)", 493 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_10)", 494 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_11)", 495 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_12)", 496 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_13)", 497 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_14)", 498 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_15)", 499 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)", 500 | "$(LIBRARY_SEARCH_PATHS_QUOTED_1)", 501 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3)", 502 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_7)", 503 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_8)", 504 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_9)", 505 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_10)", 506 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_11)", 507 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_12)", 508 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_13)", 509 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_16)", 510 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_17)", 511 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_18)", 512 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_19)", 513 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_20)", 514 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_21)", 515 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_22)", 516 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_23)", 517 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_24)", 518 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_25)", 519 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_26)", 520 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_27)", 521 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_28)", 522 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_29)", 523 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_30)", 524 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_31)", 525 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_32)", 526 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_33)", 527 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_34)", 528 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_35)", 529 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_36)", 530 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_37)", 531 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_38)", 532 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_39)", 533 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_40)", 534 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_41)", 535 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_42)", 536 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_43)", 537 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_44)", 538 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_45)", 539 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_46)", 540 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_47)", 541 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_48)", 542 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_49)", 543 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_50)", 544 | "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_51)", 545 | ); 546 | PRODUCT_NAME = example; 547 | WRAPPER_EXTENSION = app; 548 | }; 549 | name = Release; 550 | }; 551 | /* End XCBuildConfiguration section */ 552 | 553 | /* Begin XCConfigurationList section */ 554 | E4B69B4D0A3A1720003C02F2 /* Build configuration list for PBXProject "example" */ = { 555 | isa = XCConfigurationList; 556 | buildConfigurations = ( 557 | E4B69B4E0A3A1720003C02F2 /* Debug */, 558 | E4B69B4F0A3A1720003C02F2 /* Release */, 559 | ); 560 | defaultConfigurationIsVisible = 0; 561 | defaultConfigurationName = Release; 562 | }; 563 | E4B69B5F0A3A1757003C02F2 /* Build configuration list for PBXNativeTarget "example" */ = { 564 | isa = XCConfigurationList; 565 | buildConfigurations = ( 566 | E4B69B600A3A1757003C02F2 /* Debug */, 567 | E4B69B610A3A1757003C02F2 /* Release */, 568 | ); 569 | defaultConfigurationIsVisible = 0; 570 | defaultConfigurationName = Release; 571 | }; 572 | /* End XCConfigurationList section */ 573 | }; 574 | rootObject = E4B69B4C0A3A1720003C02F2 /* Project object */; 575 | } 576 | -------------------------------------------------------------------------------- /example/openFrameworks-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.yourcompany.openFrameworks 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | APPL 15 | CFBundleSignature 16 | ???? 17 | CFBundleVersion 18 | 1.0 19 | CFBundleIconFile 20 | ${ICON} 21 | 22 | 23 | -------------------------------------------------------------------------------- /example/src/ofApp.cpp: -------------------------------------------------------------------------------- 1 | #include "ofMain.h" 2 | 3 | #include "ofxGlobalContext.h" 4 | 5 | // super simple example 6 | 7 | class MyContext : public ofxGlobalContext::Context 8 | { 9 | public: 10 | 11 | MyContext() 12 | { 13 | cout << "setup MyContext" << endl; 14 | } 15 | 16 | void update() 17 | { 18 | cout << "update MyContext" << endl; 19 | } 20 | 21 | }; 22 | 23 | 24 | // source context 25 | 26 | class MyVideoContext : public ofxGlobalContext::Context 27 | { 28 | public: 29 | 30 | ofVideoGrabber video; 31 | 32 | MyVideoContext(int w, int h) 33 | { 34 | video.initGrabber(w, h); 35 | } 36 | 37 | void update() 38 | { 39 | video.update(); 40 | } 41 | }; 42 | 43 | 44 | // effect context 45 | 46 | template 47 | class MyInvertVideoContext : public ofxGlobalContext::Context 48 | { 49 | public: 50 | 51 | typedef T Video; 52 | 53 | ofImage image; 54 | int counter; 55 | 56 | void MyInvertVideoContext() 57 | { 58 | Video* o = $Context(Video); 59 | image.allocate(o->video.getWidth(), o->video.getHeight(), OF_IMAGE_COLOR); 60 | 61 | counter = 0; 62 | } 63 | 64 | void update() 65 | { 66 | // get global instance of Video 67 | ofPixels &video_pix = $Context(Video)->video.getPixelsRef(); 68 | 69 | for (int y = 0; y < image.getHeight(); y++) 70 | { 71 | for (int x = 0; x < image.getWidth(); x++) 72 | { 73 | ofColor c = video_pix.getColor(image.getWidth() - x - 1, y); 74 | 75 | // some operation 76 | if ((counter % 3) == 0) 77 | swap(c.r, c.b); 78 | 79 | if ((counter % 5) == 0) 80 | swap(c.b, c.g); 81 | 82 | if ((counter % 15) == 0) 83 | swap(c.g, c.r); 84 | 85 | image.setColor(x, y, c); 86 | } 87 | } 88 | 89 | // and update image 90 | image.update(); 91 | 92 | counter++; 93 | } 94 | }; 95 | 96 | class ofApp : public ofBaseApp 97 | { 98 | public: 99 | 100 | void setup() 101 | { 102 | ofSetFrameRate(60); 103 | ofSetVerticalSync(true); 104 | ofBackground(0); 105 | 106 | // register contexts 107 | ofxGlobalContext::Manager::defaultManager().createContext(); 108 | ofxGlobalContext::Manager::defaultManager().createContext(640, 480); // with constructor arguments 109 | ofxGlobalContext::Manager::defaultManager().createContext >(); // with template 110 | } 111 | 112 | void update() 113 | { 114 | // update all registered context 115 | ofxGlobalContext::Manager::defaultManager().update(); 116 | } 117 | 118 | void draw() 119 | { 120 | $Context(MyVideoContext)->video.draw(0, 0); 121 | $Context(MyInvertVideoContext)->image.draw(640, 0); 122 | } 123 | 124 | void keyPressed(int key) 125 | { 126 | } 127 | 128 | void keyReleased(int key) 129 | { 130 | } 131 | 132 | void mouseMoved(int x, int y) 133 | { 134 | } 135 | 136 | void mouseDragged(int x, int y, int button) 137 | { 138 | } 139 | 140 | void mousePressed(int x, int y, int button) 141 | { 142 | } 143 | 144 | void mouseReleased(int x, int y, int button) 145 | { 146 | } 147 | 148 | void windowResized(int w, int h) 149 | { 150 | } 151 | }; 152 | 153 | 154 | int main(int argc, const char** argv) 155 | { 156 | ofSetupOpenGL(1280, 480, OF_WINDOW); 157 | ofRunApp(new ofApp); 158 | return 0; 159 | } 160 | -------------------------------------------------------------------------------- /src/ofxGlobalContext.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "ofMain.h" 4 | 5 | #define OFX_GLOBAL_CONTEXT_BEGIN_NAMESPACE namespace ofx { namespace GlobalContext { 6 | #define OFX_GLOBAL_CONTEXT_END_NAMESPACE } } 7 | 8 | #define OFX_GLOBAL_CONTEXT_SHORTCUT(Class) (ofxGlobalContext::Manager::defaultManager().getContext()) 9 | 10 | #define $Context OFX_GLOBAL_CONTEXT_SHORTCUT 11 | 12 | OFX_GLOBAL_CONTEXT_BEGIN_NAMESPACE 13 | 14 | #pragma mark - Context 15 | 16 | struct Context 17 | { 18 | typedef ofPtr Ref; 19 | virtual void update() {} 20 | }; 21 | 22 | #pragma mark - Manager 23 | 24 | class Manager 25 | { 26 | public: 27 | 28 | static Manager& defaultManager() 29 | { 30 | static Manager o; 31 | return o; 32 | } 33 | 34 | public: 35 | 36 | template 37 | T* createContext() 38 | { 39 | return newContext(new T); 40 | } 41 | 42 | /* 43 | 44 | http://nedbatchelder.com/code/cog/ 45 | $ cog.py -r ofxGlobalContext.h 46 | 47 | [[[cog 48 | import cog 49 | 50 | tmpl = '''template 51 | T* createContext(%(B)s) 52 | { 53 | return newContext(new T(%(C)s)); 54 | } 55 | ''' 56 | 57 | cog.outl('') 58 | for i in xrange(1, 18): 59 | a = ', '.join(['typename A%i' % x for x in range(i)]) 60 | b = ', '.join(['const A%i& a%i' % (x, x) for x in range(i)]) 61 | c = ', '.join(['a%i' % x for x in range(i)]) 62 | cog.outl(tmpl % {'A':a, 'B':b, 'C':c}) 63 | 64 | ]]]*/ 65 | 66 | template 67 | T* createContext(const A0& a0) 68 | { 69 | return newContext(new T(a0)); 70 | } 71 | 72 | template 73 | T* createContext(const A0& a0, const A1& a1) 74 | { 75 | return newContext(new T(a0, a1)); 76 | } 77 | 78 | template 79 | T* createContext(const A0& a0, const A1& a1, const A2& a2) 80 | { 81 | return newContext(new T(a0, a1, a2)); 82 | } 83 | 84 | template 85 | T* createContext(const A0& a0, const A1& a1, const A2& a2, const A3& a3) 86 | { 87 | return newContext(new T(a0, a1, a2, a3)); 88 | } 89 | 90 | template 91 | T* createContext(const A0& a0, const A1& a1, const A2& a2, const A3& a3, const A4& a4) 92 | { 93 | return newContext(new T(a0, a1, a2, a3, a4)); 94 | } 95 | 96 | template 97 | T* createContext(const A0& a0, const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5) 98 | { 99 | return newContext(new T(a0, a1, a2, a3, a4, a5)); 100 | } 101 | 102 | template 103 | T* createContext(const A0& a0, const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6) 104 | { 105 | return newContext(new T(a0, a1, a2, a3, a4, a5, a6)); 106 | } 107 | 108 | template 109 | T* createContext(const A0& a0, const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A7& a7) 110 | { 111 | return newContext(new T(a0, a1, a2, a3, a4, a5, a6, a7)); 112 | } 113 | 114 | template 115 | T* createContext(const A0& a0, const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A7& a7, const A8& a8) 116 | { 117 | return newContext(new T(a0, a1, a2, a3, a4, a5, a6, a7, a8)); 118 | } 119 | 120 | template 121 | T* createContext(const A0& a0, const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A7& a7, const A8& a8, const A9& a9) 122 | { 123 | return newContext(new T(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9)); 124 | } 125 | 126 | template 127 | T* createContext(const A0& a0, const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A7& a7, const A8& a8, const A9& a9, const A10& a10) 128 | { 129 | return newContext(new T(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)); 130 | } 131 | 132 | template 133 | T* createContext(const A0& a0, const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A7& a7, const A8& a8, const A9& a9, const A10& a10, const A11& a11) 134 | { 135 | return newContext(new T(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11)); 136 | } 137 | 138 | template 139 | T* createContext(const A0& a0, const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A7& a7, const A8& a8, const A9& a9, const A10& a10, const A11& a11, const A12& a12) 140 | { 141 | return newContext(new T(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12)); 142 | } 143 | 144 | template 145 | T* createContext(const A0& a0, const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A7& a7, const A8& a8, const A9& a9, const A10& a10, const A11& a11, const A12& a12, const A13& a13) 146 | { 147 | return newContext(new T(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13)); 148 | } 149 | 150 | template 151 | T* createContext(const A0& a0, const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A7& a7, const A8& a8, const A9& a9, const A10& a10, const A11& a11, const A12& a12, const A13& a13, const A14& a14) 152 | { 153 | return newContext(new T(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14)); 154 | } 155 | 156 | template 157 | T* createContext(const A0& a0, const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A7& a7, const A8& a8, const A9& a9, const A10& a10, const A11& a11, const A12& a12, const A13& a13, const A14& a14, const A15& a15) 158 | { 159 | return newContext(new T(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15)); 160 | } 161 | 162 | template 163 | T* createContext(const A0& a0, const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A7& a7, const A8& a8, const A9& a9, const A10& a10, const A11& a11, const A12& a12, const A13& a13, const A14& a14, const A15& a15, const A16& a16) 164 | { 165 | return newContext(new T(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16)); 166 | } 167 | 168 | //[[[end]]] 169 | 170 | template 171 | T* getContext() 172 | { 173 | TYPE_ID class_id = RTTI::value(); 174 | if (contexts.find(class_id) == contexts.end()) 175 | { 176 | ofLogError("Manager") << "invalid context classname"; 177 | throw; 178 | return NULL; 179 | } 180 | return (T*) contexts[class_id].get(); 181 | } 182 | 183 | public: 184 | 185 | void update() 186 | { 187 | map::iterator it = contexts.begin(); 188 | while (it != contexts.end()) 189 | { 190 | it->second->update(); 191 | it++; 192 | } 193 | } 194 | 195 | protected: 196 | 197 | typedef void* TYPE_ID; 198 | 199 | template 200 | struct RTTI 201 | { 202 | static TYPE_ID value() 203 | { 204 | static size_t m = 0; 205 | return (TYPE_ID)&m; 206 | } 207 | }; 208 | 209 | map contexts; 210 | 211 | private: 212 | 213 | Manager() {} 214 | ~Manager() {} 215 | Manager(const Manager&) {} 216 | Manager& operator=(const Manager&) {} 217 | 218 | template 219 | T* newContext(T* p) 220 | { 221 | Context::Ref o = Context::Ref(p); 222 | TYPE_ID class_id = RTTI::value(); 223 | contexts[class_id] = o; 224 | return p; 225 | } 226 | 227 | }; 228 | 229 | OFX_GLOBAL_CONTEXT_END_NAMESPACE 230 | 231 | namespace ofxGlobalContext = ofx::GlobalContext; 232 | --------------------------------------------------------------------------------