Skip to content
Browse files

viewport fix

  • Loading branch information...
1 parent 92c61ed commit 6168d3fbf43152c877912eef5073509319a66424 @elliotwoods committed Feb 8, 2012
View
2 ofxGrabCam-example/src/testApp.cpp
@@ -59,6 +59,8 @@ void testApp::draw(){
ofDrawBitmapString("This example", 10, row++ * 15);
ofDrawBitmapString("Press 'c' to toggleCursorDraw", 10, row++ * 15);
ofDrawBitmapString("Press 'u' to toggleFixUpwards", 10, row++ * 15);
+ ofDrawBitmapString("Press 's' to save camera pose to savedPose", 10, row++ * 15);
+ ofDrawBitmapString("Press 'l' to load camera pose from savedPose", 10, row++ * 15);
//demonstrate resiliance to stray matrices
ofRotate(ofRandom(360), 0, 1, 0);
View
9 ofxGrabCam-viewportTest/Project.xcconfig
@@ -0,0 +1,9 @@
+//THE PATH TO THE ROOT OF OUR OF PATH RELATIVE TO THIS PROJECT.
+//THIS NEEDS TO BE DEFINED BEFORE CoreOF.xcconfig IS INCLUDED
+OF_PATH = ../../..
+
+//THIS HAS ALL THE HEADER AND LIBS FOR OF CORE
+#include "../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig"
+
+OTHER_LDFLAGS = $(OF_CORE_LIBS)
+HEADER_SEARCH_PATHS = $(OF_CORE_HEADERS)
View
596 ofxGrabCam-viewportTest/ofxGrabCam-viewportExample.xcodeproj/project.pbxproj
@@ -0,0 +1,596 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 42;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 8BB05C94146C0DA400E65B31 /* ofxGrabCam.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BB05C93146C0DA400E65B31 /* ofxGrabCam.cpp */; };
+ BBAB23CB13894F3D00AA2426 /* GLUT.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = BBAB23BE13894E4700AA2426 /* GLUT.framework */; };
+ E4328149138ABC9F0047C5CB /* openFrameworksDebug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4328148138ABC890047C5CB /* openFrameworksDebug.a */; };
+ E45BE97B0E8CC7DD009D7055 /* AGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9710E8CC7DD009D7055 /* AGL.framework */; };
+ E45BE97C0E8CC7DD009D7055 /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9720E8CC7DD009D7055 /* ApplicationServices.framework */; };
+ E45BE97D0E8CC7DD009D7055 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9730E8CC7DD009D7055 /* AudioToolbox.framework */; };
+ E45BE97E0E8CC7DD009D7055 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9740E8CC7DD009D7055 /* Carbon.framework */; };
+ E45BE97F0E8CC7DD009D7055 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9750E8CC7DD009D7055 /* CoreAudio.framework */; };
+ E45BE9800E8CC7DD009D7055 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9760E8CC7DD009D7055 /* CoreFoundation.framework */; };
+ E45BE9810E8CC7DD009D7055 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9770E8CC7DD009D7055 /* CoreServices.framework */; };
+ E45BE9830E8CC7DD009D7055 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9790E8CC7DD009D7055 /* OpenGL.framework */; };
+ E45BE9840E8CC7DD009D7055 /* QuickTime.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE97A0E8CC7DD009D7055 /* QuickTime.framework */; };
+ E4B69E200A3A1BDC003C02F2 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4B69E1D0A3A1BDC003C02F2 /* main.cpp */; };
+ E4B69E210A3A1BDC003C02F2 /* testApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4B69E1E0A3A1BDC003C02F2 /* testApp.cpp */; };
+ E4C2424710CC5A17004149E2 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2424410CC5A17004149E2 /* AppKit.framework */; };
+ E4C2424810CC5A17004149E2 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2424510CC5A17004149E2 /* Cocoa.framework */; };
+ E4C2424910CC5A17004149E2 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E4C2424610CC5A17004149E2 /* IOKit.framework */; };
+ E4EB6799138ADC1D00A09F29 /* GLUT.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBAB23BE13894E4700AA2426 /* GLUT.framework */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+ E4328147138ABC890047C5CB /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */;
+ proxyType = 2;
+ remoteGlobalIDString = E4B27C1510CBEB8E00536013;
+ remoteInfo = openFrameworks;
+ };
+ E4EEB9AB138B136A00A80321 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */;
+ proxyType = 1;
+ remoteGlobalIDString = E4B27C1410CBEB8E00536013;
+ remoteInfo = openFrameworks;
+ };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+ E4C2427710CC5ABF004149E2 /* CopyFiles */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = "";
+ dstSubfolderSpec = 10;
+ files = (
+ BBAB23CB13894F3D00AA2426 /* GLUT.framework in CopyFiles */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+ 8BB05C93146C0DA400E65B31 /* ofxGrabCam.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ofxGrabCam.cpp; path = ../../../../addons/ofxGrabCam/src/ofxGrabCam.cpp; sourceTree = "<group>"; };
+ 8BB05C95146C113600E65B31 /* ofxGrabCam.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ofxGrabCam.h; path = ../../../../addons/ofxGrabCam/src/ofxGrabCam.h; sourceTree = "<group>"; };
+ BBAB23BE13894E4700AA2426 /* GLUT.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLUT.framework; path = ../../../libs/glut/lib/osx/GLUT.framework; sourceTree = "<group>"; };
+ E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = openFrameworksLib.xcodeproj; path = ../../../libs/openFrameworksCompiled/project/osx/openFrameworksLib.xcodeproj; sourceTree = SOURCE_ROOT; };
+ E45BE9710E8CC7DD009D7055 /* AGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AGL.framework; path = /System/Library/Frameworks/AGL.framework; sourceTree = "<absolute>"; };
+ E45BE9720E8CC7DD009D7055 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = "<absolute>"; };
+ E45BE9730E8CC7DD009D7055 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = /System/Library/Frameworks/AudioToolbox.framework; sourceTree = "<absolute>"; };
+ E45BE9740E8CC7DD009D7055 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
+ E45BE9750E8CC7DD009D7055 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = "<absolute>"; };
+ E45BE9760E8CC7DD009D7055 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; };
+ E45BE9770E8CC7DD009D7055 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = "<absolute>"; };
+ E45BE9790E8CC7DD009D7055 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = "<absolute>"; };
+ E45BE97A0E8CC7DD009D7055 /* QuickTime.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickTime.framework; path = /System/Library/Frameworks/QuickTime.framework; sourceTree = "<absolute>"; };
+ E4B69B5B0A3A1756003C02F2 /* ofxGrabCam-viewportExampleDebug.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "ofxGrabCam-viewportExampleDebug.app"; sourceTree = BUILT_PRODUCTS_DIR; };
+ E4B69E1D0A3A1BDC003C02F2 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = src/main.cpp; sourceTree = SOURCE_ROOT; };
+ E4B69E1E0A3A1BDC003C02F2 /* testApp.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 30; name = testApp.cpp; path = src/testApp.cpp; sourceTree = SOURCE_ROOT; };
+ E4B69E1F0A3A1BDC003C02F2 /* testApp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = testApp.h; path = src/testApp.h; sourceTree = SOURCE_ROOT; };
+ E4B6FCAD0C3E899E008CF71C /* openFrameworks-Info.plist */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.plist.xml; path = "openFrameworks-Info.plist"; sourceTree = "<group>"; };
+ E4C2424410CC5A17004149E2 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
+ E4C2424510CC5A17004149E2 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
+ E4C2424610CC5A17004149E2 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; };
+ E4EB691F138AFCF100A09F29 /* CoreOF.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = CoreOF.xcconfig; path = ../../../libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig; sourceTree = SOURCE_ROOT; };
+ E4EB6923138AFD0F00A09F29 /* Project.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Project.xcconfig; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ E4B69B590A3A1756003C02F2 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ E4EB6799138ADC1D00A09F29 /* GLUT.framework in Frameworks */,
+ E4328149138ABC9F0047C5CB /* openFrameworksDebug.a in Frameworks */,
+ E45BE97B0E8CC7DD009D7055 /* AGL.framework in Frameworks */,
+ E45BE97C0E8CC7DD009D7055 /* ApplicationServices.framework in Frameworks */,
+ E45BE97D0E8CC7DD009D7055 /* AudioToolbox.framework in Frameworks */,
+ E45BE97E0E8CC7DD009D7055 /* Carbon.framework in Frameworks */,
+ E45BE97F0E8CC7DD009D7055 /* CoreAudio.framework in Frameworks */,
+ E45BE9800E8CC7DD009D7055 /* CoreFoundation.framework in Frameworks */,
+ E45BE9810E8CC7DD009D7055 /* CoreServices.framework in Frameworks */,
+ E45BE9830E8CC7DD009D7055 /* OpenGL.framework in Frameworks */,
+ E45BE9840E8CC7DD009D7055 /* QuickTime.framework in Frameworks */,
+ E4C2424710CC5A17004149E2 /* AppKit.framework in Frameworks */,
+ E4C2424810CC5A17004149E2 /* Cocoa.framework in Frameworks */,
+ E4C2424910CC5A17004149E2 /* IOKit.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 8BB05C92146C0D7F00E65B31 /* ofxGrabCam */ = {
+ isa = PBXGroup;
+ children = (
+ 8BB05C93146C0DA400E65B31 /* ofxGrabCam.cpp */,
+ 8BB05C95146C113600E65B31 /* ofxGrabCam.h */,
+ );
+ name = ofxGrabCam;
+ sourceTree = "<group>";
+ };
+ BB4B014C10F69532006C3DED /* addons */ = {
+ isa = PBXGroup;
+ children = (
+ );
+ name = addons;
+ sourceTree = "<group>";
+ };
+ BBAB23C913894ECA00AA2426 /* system frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ E4C2424410CC5A17004149E2 /* AppKit.framework */,
+ E4C2424510CC5A17004149E2 /* Cocoa.framework */,
+ E4C2424610CC5A17004149E2 /* IOKit.framework */,
+ E45BE9710E8CC7DD009D7055 /* AGL.framework */,
+ E45BE9720E8CC7DD009D7055 /* ApplicationServices.framework */,
+ E45BE9730E8CC7DD009D7055 /* AudioToolbox.framework */,
+ E45BE9740E8CC7DD009D7055 /* Carbon.framework */,
+ E45BE9750E8CC7DD009D7055 /* CoreAudio.framework */,
+ E45BE9760E8CC7DD009D7055 /* CoreFoundation.framework */,
+ E45BE9770E8CC7DD009D7055 /* CoreServices.framework */,
+ E45BE9790E8CC7DD009D7055 /* OpenGL.framework */,
+ E45BE97A0E8CC7DD009D7055 /* QuickTime.framework */,
+ );
+ name = "system frameworks";
+ sourceTree = "<group>";
+ };
+ BBAB23CA13894EDB00AA2426 /* 3rd party frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ BBAB23BE13894E4700AA2426 /* GLUT.framework */,
+ );
+ name = "3rd party frameworks";
+ sourceTree = "<group>";
+ };
+ E4328144138ABC890047C5CB /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ E4328148138ABC890047C5CB /* openFrameworksDebug.a */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ E45BE5980E8CC70C009D7055 /* frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ BBAB23CA13894EDB00AA2426 /* 3rd party frameworks */,
+ BBAB23C913894ECA00AA2426 /* system frameworks */,
+ );
+ name = frameworks;
+ sourceTree = "<group>";
+ };
+ E4B69B4A0A3A1720003C02F2 = {
+ isa = PBXGroup;
+ children = (
+ E4B69E1C0A3A1BDC003C02F2 /* src */,
+ BB4B014C10F69532006C3DED /* addons */,
+ E45BE5980E8CC70C009D7055 /* frameworks */,
+ E4B69B5B0A3A1756003C02F2 /* ofxGrabCam-viewportExampleDebug.app */,
+ );
+ sourceTree = "<group>";
+ };
+ E4B69E1C0A3A1BDC003C02F2 /* src */ = {
+ isa = PBXGroup;
+ children = (
+ E4EEC9E9138DF44700A80321 /* openFrameworks */,
+ 8BB05C92146C0D7F00E65B31 /* ofxGrabCam */,
+ E4B69E1D0A3A1BDC003C02F2 /* main.cpp */,
+ E4B69E1E0A3A1BDC003C02F2 /* testApp.cpp */,
+ E4B69E1F0A3A1BDC003C02F2 /* testApp.h */,
+ );
+ path = src;
+ sourceTree = SOURCE_ROOT;
+ };
+ E4EEC9E9138DF44700A80321 /* openFrameworks */ = {
+ isa = PBXGroup;
+ children = (
+ E4EB6923138AFD0F00A09F29 /* Project.xcconfig */,
+ E4EB691F138AFCF100A09F29 /* CoreOF.xcconfig */,
+ E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */,
+ E4B6FCAD0C3E899E008CF71C /* openFrameworks-Info.plist */,
+ );
+ name = openFrameworks;
+ path = ..;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ E4B69B5A0A3A1756003C02F2 /* ofxGrabCam-viewportExample */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = E4B69B5F0A3A1757003C02F2 /* Build configuration list for PBXNativeTarget "ofxGrabCam-viewportExample" */;
+ buildPhases = (
+ E4B69B580A3A1756003C02F2 /* Sources */,
+ E4B69B590A3A1756003C02F2 /* Frameworks */,
+ E4B6FFFD0C3F9AB9008CF71C /* ShellScript */,
+ E4C2427710CC5ABF004149E2 /* CopyFiles */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ E4EEB9AC138B136A00A80321 /* PBXTargetDependency */,
+ );
+ name = "ofxGrabCam-viewportExample";
+ productName = myOFApp;
+ productReference = E4B69B5B0A3A1756003C02F2 /* ofxGrabCam-viewportExampleDebug.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ E4B69B4C0A3A1720003C02F2 /* Project object */ = {
+ isa = PBXProject;
+ buildConfigurationList = E4B69B4D0A3A1720003C02F2 /* Build configuration list for PBXProject "ofxGrabCam-viewportExample" */;
+ compatibilityVersion = "Xcode 2.4";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ English,
+ Japanese,
+ French,
+ German,
+ );
+ mainGroup = E4B69B4A0A3A1720003C02F2;
+ productRefGroup = E4B69B4A0A3A1720003C02F2;
+ projectDirPath = "";
+ projectReferences = (
+ {
+ ProductGroup = E4328144138ABC890047C5CB /* Products */;
+ ProjectRef = E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */;
+ },
+ );
+ projectRoot = "";
+ targets = (
+ E4B69B5A0A3A1756003C02F2 /* ofxGrabCam-viewportExample */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXReferenceProxy section */
+ E4328148138ABC890047C5CB /* openFrameworksDebug.a */ = {
+ isa = PBXReferenceProxy;
+ fileType = archive.ar;
+ path = openFrameworksDebug.a;
+ remoteRef = E4328147138ABC890047C5CB /* PBXContainerItemProxy */;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+/* End PBXReferenceProxy section */
+
+/* Begin PBXShellScriptBuildPhase section */
+ E4B6FFFD0C3F9AB9008CF71C /* ShellScript */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ 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\";";
+ };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ E4B69B580A3A1756003C02F2 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ E4B69E200A3A1BDC003C02F2 /* main.cpp in Sources */,
+ E4B69E210A3A1BDC003C02F2 /* testApp.cpp in Sources */,
+ 8BB05C94146C0DA400E65B31 /* ofxGrabCam.cpp in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+ E4EEB9AC138B136A00A80321 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ name = openFrameworks;
+ targetProxy = E4EEB9AB138B136A00A80321 /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
+/* Begin XCBuildConfiguration section */
+ E4B69B4E0A3A1720003C02F2 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = E4EB6923138AFD0F00A09F29 /* Project.xcconfig */;
+ buildSettings = {
+ ARCHS = "$(NATIVE_ARCH)";
+ CONFIGURATION_BUILD_DIR = "$(SRCROOT)/bin/";
+ COPY_PHASE_STRIP = NO;
+ DEAD_CODE_STRIPPING = YES;
+ GCC_AUTO_VECTORIZATION = YES;
+ GCC_ENABLE_SSE3_EXTENSIONS = YES;
+ GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS = YES;
+ GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
+ GCC_MODEL_TUNING = G5;
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO;
+ GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = NO;
+ GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = NO;
+ GCC_WARN_UNINITIALIZED_AUTOS = NO;
+ GCC_WARN_UNUSED_VALUE = NO;
+ GCC_WARN_UNUSED_VARIABLE = NO;
+ OTHER_CPLUSPLUSFLAGS = (
+ "-D__MACOSX_CORE__",
+ "-lpthread",
+ );
+ SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk";
+ };
+ name = Debug;
+ };
+ E4B69B4F0A3A1720003C02F2 /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = E4EB6923138AFD0F00A09F29 /* Project.xcconfig */;
+ buildSettings = {
+ ARCHS = "$(NATIVE_ARCH)";
+ CONFIGURATION_BUILD_DIR = "$(SRCROOT)/bin/";
+ COPY_PHASE_STRIP = YES;
+ DEAD_CODE_STRIPPING = YES;
+ GCC_AUTO_VECTORIZATION = YES;
+ GCC_ENABLE_SSE3_EXTENSIONS = YES;
+ GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS = YES;
+ GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
+ GCC_MODEL_TUNING = G5;
+ GCC_OPTIMIZATION_LEVEL = 3;
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_UNROLL_LOOPS = YES;
+ GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO;
+ GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = NO;
+ GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = NO;
+ GCC_WARN_UNINITIALIZED_AUTOS = NO;
+ GCC_WARN_UNUSED_VALUE = NO;
+ GCC_WARN_UNUSED_VARIABLE = NO;
+ OTHER_CPLUSPLUSFLAGS = (
+ "-D__MACOSX_CORE__",
+ "-lpthread",
+ );
+ SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk";
+ };
+ name = Release;
+ };
+ E4B69B600A3A1757003C02F2 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(inherited)",
+ "$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
+ );
+ FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../../libs/glut/lib/osx\"";
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_MODEL_TUNING = G4;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h";
+ HEADER_SEARCH_PATHS = "$(OF_CORE_HEADERS)";
+ INFOPLIST_FILE = "openFrameworks-Info.plist";
+ INSTALL_PATH = "$(HOME)/Applications";
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_5)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_6)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_7)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_8)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_9)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_10)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_11)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_12)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_13)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_14)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_15)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_7)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_8)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_9)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_10)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_11)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_12)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_13)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_16)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_17)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_18)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_19)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_20)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_21)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_22)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_23)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_24)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_25)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_26)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_27)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_28)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_29)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_30)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_31)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_32)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_33)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_34)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_35)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_36)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_37)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_38)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_39)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_40)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_41)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_42)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_43)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_44)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_45)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_46)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_47)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_48)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_49)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_50)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_51)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_52)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_5)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_6)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_7)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_8)",
+ );
+ LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../../addons/ofxOpenCv/libs/opencv/lib/android/armeabi\"";
+ LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = "\"$(SRCROOT)/../../../addons/ofxOpenCv/libs/opencv/lib/android/armeabi-v7a\"";
+ LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3 = "\"$(SRCROOT)/../../../addons/ofxOpenCv/libs/opencv/lib/iphone\"";
+ LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4 = "\"$(SRCROOT)/../../../addons/ofxOpenCv/libs/opencv/lib/linux\"";
+ LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_5 = "\"$(SRCROOT)/../../../addons/ofxOpenCv/libs/opencv/lib/linux64\"";
+ LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_6 = "\"$(SRCROOT)/../../../addons/ofxOpenCv/libs/opencv/lib/osx\"";
+ LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_7 = "\"$(SRCROOT)/../../../addons/ofxOpenCv/libs/opencv/lib/vs2010\"";
+ LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_8 = "\"$(SRCROOT)/../../../addons/ofxOpenCv/libs/opencv/lib/win_cb\"";
+ PREBINDING = NO;
+ PRODUCT_NAME = "ofxGrabCam-viewportExampleDebug";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Debug;
+ };
+ E4B69B610A3A1757003C02F2 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(inherited)",
+ "$(FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
+ );
+ FRAMEWORK_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../../libs/glut/lib/osx\"";
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+ GCC_MODEL_TUNING = G4;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Headers/Carbon.h";
+ HEADER_SEARCH_PATHS = "$(OF_CORE_HEADERS)";
+ INFOPLIST_FILE = "openFrameworks-Info.plist";
+ INSTALL_PATH = "$(HOME)/Applications";
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_5)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_6)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_7)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_8)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_9)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_10)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_11)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_12)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_13)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_14)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_15)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_1)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_7)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_8)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_9)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_10)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_11)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_12)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_13)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_16)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_17)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_18)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_19)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_20)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_21)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_22)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_23)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_24)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_25)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_26)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_27)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_28)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_29)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_30)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_31)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_32)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_33)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_34)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_35)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_36)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_37)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_38)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_39)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_40)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_41)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_42)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_43)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_44)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_45)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_46)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_47)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_48)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_49)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_50)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_51)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_5)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_6)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_7)",
+ "$(LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_8)",
+ );
+ LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_1 = "\"$(SRCROOT)/../../../addons/ofxOpenCv/libs/opencv/lib/android/armeabi\"";
+ LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_2 = "\"$(SRCROOT)/../../../addons/ofxOpenCv/libs/opencv/lib/android/armeabi-v7a\"";
+ LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_3 = "\"$(SRCROOT)/../../../addons/ofxOpenCv/libs/opencv/lib/iphone\"";
+ LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_4 = "\"$(SRCROOT)/../../../addons/ofxOpenCv/libs/opencv/lib/linux\"";
+ LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_5 = "\"$(SRCROOT)/../../../addons/ofxOpenCv/libs/opencv/lib/linux64\"";
+ LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_6 = "\"$(SRCROOT)/../../../addons/ofxOpenCv/libs/opencv/lib/osx\"";
+ LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_7 = "\"$(SRCROOT)/../../../addons/ofxOpenCv/libs/opencv/lib/vs2010\"";
+ LIBRARY_SEARCH_PATHS_QUOTED_FOR_TARGET_8 = "\"$(SRCROOT)/../../../addons/ofxOpenCv/libs/opencv/lib/win_cb\"";
+ PREBINDING = NO;
+ PRODUCT_NAME = "ofxGrabCam-viewportExample";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ E4B69B4D0A3A1720003C02F2 /* Build configuration list for PBXProject "ofxGrabCam-viewportExample" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ E4B69B4E0A3A1720003C02F2 /* Debug */,
+ E4B69B4F0A3A1720003C02F2 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ E4B69B5F0A3A1757003C02F2 /* Build configuration list for PBXNativeTarget "ofxGrabCam-viewportExample" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ E4B69B600A3A1757003C02F2 /* Debug */,
+ E4B69B610A3A1757003C02F2 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = E4B69B4C0A3A1720003C02F2 /* Project object */;
+}
View
7 ...ortTest/ofxGrabCam-viewportExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "self:ofxGrabCam-viewportExample.xcodeproj">
+ </FileRef>
+</Workspace>
View
20 ofxGrabCam-viewportTest/openFrameworks-Info.plist
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.yourcompany.openFrameworks</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+</dict>
+</plist>
View
16 ofxGrabCam-viewportTest/src/main.cpp
@@ -0,0 +1,16 @@
+#include "ofMain.h"
+#include "testApp.h"
+#include "ofAppGlutWindow.h"
+
+//========================================================================
+int main( ){
+
+ ofAppGlutWindow window;
+ ofSetupOpenGL(&window, 1280, 720, OF_WINDOW); // <-------- setup the GL context
+
+ // this kicks off the running of my app
+ // can be OF_WINDOW or OF_FULLSCREEN
+ // pass in width and height too:
+ ofRunApp( new testApp());
+
+}
View
115 ofxGrabCam-viewportTest/src/testApp.cpp
@@ -0,0 +1,115 @@
+#include "testApp.h"
+
+//--------------------------------------------------------------
+void testApp::setup(){
+ for (int i=0; i<100; i++)
+ {
+ positions.push_back(ofVec3f(ofRandom(-10, 10),
+ ofRandom(-10, 10),
+ ofRandom(-10, 10)));
+
+ colours.push_back(ofColor(ofRandom(100) + 100,
+ ofRandom(100) + 100,
+ ofRandom(100) + 100));
+ }
+
+ ofBackground(100, 100, 100);
+ ofEnableSmoothing();
+
+ // You might need to do this in the future if openFrameworks changes currently it's done automatically in the constructor, but this may be too early for openFrameworks (if the current situation changes)
+ // camera.init();
+
+ randomiseViewport();
+ useViewport = false;
+}
+
+//--------------------------------------------------------------
+void testApp::update(){
+
+}
+
+//--------------------------------------------------------------
+void testApp::draw(){
+
+ vector<ofVec3f>::iterator p = positions.begin();
+ vector<ofColor>::iterator c = colours.begin();
+
+ ////
+ //draw scene
+ if (useViewport)
+ camera.begin(viewport);
+ else
+ camera.begin();
+ ofSetColor(255,100,100);
+ ofDrawGrid(10.0f, 5.0f, true);
+ for (; p != positions.end(); p++, c++)
+ {
+ ofSetColor(*c);
+ ofSphere(p->x, p->y, p->z, 1);
+ }
+ //demonstrate resiliance to stray matrices
+ ofRotate(ofRandom(360), 0, 1, 0);
+ camera.end();
+ //
+ ////
+
+ if (useViewport) {
+ ofPushStyle();
+ ofSetColor(255,255,255);
+ ofNoFill();
+ ofRect(viewport);
+ ofPopStyle();
+ }
+
+ ofSetColor(0,0,0);
+
+ int row = 1;
+ ofDrawBitmapString("ofxGrabCam", 10, row++ * 15);
+ ofDrawBitmapString("Drag with left mouse to orbit", 10, row++ * 15);
+ ofDrawBitmapString("Drag with right mouse to zoom", 10, row++ * 15);
+ ofDrawBitmapString("Hold 'h' and drag with left mouse to pan", 10, row++ * 15);
+ ofDrawBitmapString("Press 'r' to reset", 10, row++ * 15);
+
+ row++;
+
+ ofDrawBitmapString("This example", 10, row++ * 15);
+ ofDrawBitmapString("Press 'c' to toggleCursorDraw", 10, row++ * 15);
+ ofDrawBitmapString("Press 'u' to toggleFixUpwards", 10, row++ * 15);
+ ofDrawBitmapString("Press [SPACE] to randomise viewport", 10, row++ * 15);
+ ofDrawBitmapString("Press [v] to toggle viewport " + (useViewport ? string("[x]") : string("[ ]")), 10, row++ * 15);
+
+ //demonstrate resiliance to stray matrices
+ ofRotate(ofRandom(360), 0, 1, 0);
+ ofScale(ofRandom(30), ofRandom(30));
+}
+
+//--------------------------------------------------------------
+void testApp::keyPressed(int key){
+
+ if (key==' ')
+ randomiseViewport();
+
+ if (key=='v')
+ useViewport ^= true;
+
+ if (key=='c')
+ camera.toggleCursorDraw();
+
+ if (key=='u')
+ camera.toggleFixUpwards();
+
+ if (key=='s')
+ savedPose = camera.getGlobalTransformMatrix();
+
+ if (key=='l')
+ camera.setTransformMatrix(savedPose);
+
+}
+//--------------------------------------------------------------
+void testApp::randomiseViewport() {
+ viewport.x = ofRandom(0,ofGetWidth()/2);
+ viewport.y = ofRandom(0,ofGetHeight()/2);
+ viewport.width = ofRandom(256, ofGetWidth() - viewport.x);
+ viewport.height = ofRandom(256, ofGetHeight() - viewport.y);
+}
+
View
29 ofxGrabCam-viewportTest/src/testApp.h
@@ -0,0 +1,29 @@
+#pragma once
+
+#include "ofMain.h"
+
+#include "ofxGrabCam.h"
+
+class testApp : public ofBaseApp{
+
+public:
+ void setup();
+ void update();
+ void draw();
+
+ void keyPressed (int key);
+ void randomiseViewport();
+
+ ofxGrabCam camera;
+
+ ////
+ //scene
+ vector<ofVec3f> positions;
+ vector<ofColor> colours;
+ //
+ ////
+
+ bool useViewport;
+ ofRectangle viewport;
+ ofMatrix4x4 savedPose;
+};
View
21 src/ofxGrabCam.cpp
@@ -27,6 +27,7 @@ void ofxGrabCam::begin(ofRectangle viewport) {
glEnable(GL_DEPTH_TEST);
viewportRect = viewport;
ofCamera::begin(viewport);
+ ofPushMatrix();
glGetDoublev(GL_PROJECTION_MATRIX, this->matP);
glGetDoublev(GL_MODELVIEW_MATRIX, this->matM);
@@ -35,6 +36,10 @@ void ofxGrabCam::begin(ofRectangle viewport) {
//--------------------------
void ofxGrabCam::end() {
+
+ //optimistically, we presume there's no stray push/pops
+ ofPopMatrix();
+
if (pickCursorFlag || !mouseDown) {
findCursor();
pickCursorFlag = false;
@@ -52,7 +57,7 @@ void ofxGrabCam::end() {
ofCamera::end();
glDisable(GL_DEPTH_TEST);
- if (drawCursor) {
+ if (drawCursor && viewportRect.inside(mouseP)) {
ofPushStyle();
ofFill();
ofSetColor(50, 10, 10);
@@ -138,6 +143,9 @@ void ofxGrabCam::mouseMoved(ofMouseEventArgs &args) {
//--------------------------
void ofxGrabCam::mousePressed(ofMouseEventArgs &args) {
+ if (!viewportRect.inside(args.x, args.y))
+ return;
+
mouseP.x = args.x;
mouseP.y = args.y;
@@ -157,6 +165,9 @@ void ofxGrabCam::mouseReleased(ofMouseEventArgs &args) {
//--------------------------
void ofxGrabCam::mouseDragged(ofMouseEventArgs &args) {
+ if (!this->mouseDown)
+ return;
+
float dx = (args.x - mouseP.x) / ofGetViewportWidth();
float dy = (args.y - mouseP.y) / ofGetViewportHeight();
@@ -224,7 +235,7 @@ void ofxGrabCam::keyReleased(ofKeyEventArgs &args) {
//--------------------------
void ofxGrabCam::findCursor() {
//read z value from depth buffer at mouse coords
- glReadPixels(mouseP.x, ofGetViewportHeight()-1-mouseP.y, 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT, &mouseP.z);
+ glReadPixels(mouseP.x, ofGetHeight()-1-mouseP.y, 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT, &mouseP.z);
//if we get nothing, scatter until we get something
//we search in a spiral until we hit something
@@ -250,13 +261,9 @@ void ofxGrabCam::findCursor() {
if (mouseP.z == 1.0f)
return;
- glGetDoublev(GL_PROJECTION_MATRIX, matP);
- glGetDoublev(GL_MODELVIEW_MATRIX, matM);
- glGetIntegerv(GL_VIEWPORT, viewport);
-
GLdouble c[3];
- gluUnProject(mouseP.x, ofGetViewportHeight()-1-mouseP.y, mouseP.z, matM, matP, viewport, c, c+1, c+2);
+ gluUnProject(mouseP.x, ofGetHeight()-1-mouseP.y, mouseP.z, matM, matP, viewport, c, c+1, c+2);
mouseW.x = c[0];
mouseW.y = c[1];

0 comments on commit 6168d3f

Please sign in to comment.
Something went wrong with that request. Please try again.