From a37827bcb0147342a4302ae40f59c04684a7daaa Mon Sep 17 00:00:00 2001 From: 2bit Date: Sun, 23 Jan 2022 22:26:32 +0900 Subject: [PATCH 01/32] update window and utility --- libs/openFrameworks/app/ofAppGLFWWindow.cpp | 4 ++-- libs/openFrameworks/utils/ofSystemUtils.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libs/openFrameworks/app/ofAppGLFWWindow.cpp b/libs/openFrameworks/app/ofAppGLFWWindow.cpp index 294c2e1d58b..ecefb66382a 100644 --- a/libs/openFrameworks/app/ofAppGLFWWindow.cpp +++ b/libs/openFrameworks/app/ofAppGLFWWindow.cpp @@ -1732,11 +1732,11 @@ EGLSurface ofAppGLFWWindow::getEGLSurface(){ #if defined(TARGET_OSX) void * ofAppGLFWWindow::getNSGLContext(){ - return glfwGetNSGLContext(windowP); + return (__bridge void *)glfwGetNSGLContext(windowP); } void * ofAppGLFWWindow::getCocoaWindow(){ - return glfwGetCocoaWindow(windowP); + return (__bridge void *)glfwGetCocoaWindow(windowP); } #endif diff --git a/libs/openFrameworks/utils/ofSystemUtils.cpp b/libs/openFrameworks/utils/ofSystemUtils.cpp index 4657c787dce..7fa920e8d8c 100644 --- a/libs/openFrameworks/utils/ofSystemUtils.cpp +++ b/libs/openFrameworks/utils/ofSystemUtils.cpp @@ -68,7 +68,7 @@ std::wstring convertNarrowToWide( const std::string& as ){ #if defined( TARGET_OSX ) static void restoreAppWindowFocus(){ - NSWindow * appWindow = (NSWindow *)ofGetCocoaWindow(); + NSWindow * appWindow = (__bridge NSWindow *)ofGetCocoaWindow(); if(appWindow) { [appWindow makeKeyAndOrderFront:nil]; } @@ -292,7 +292,7 @@ void ofSystemAlertDialog(string errorMessage){ #ifdef TARGET_OSX @autoreleasepool { - NSAlert* alertDialog = [[[NSAlert alloc] init] autorelease]; + NSAlert* alertDialog = [[NSAlert alloc] init]; alertDialog.messageText = [NSString stringWithUTF8String:errorMessage.c_str()]; [alertDialog runModal]; restoreAppWindowFocus(); @@ -627,13 +627,13 @@ string ofSystemTextBoxDialog(string question, string text){ #ifdef TARGET_OSX @autoreleasepool { // create alert dialog - NSAlert *alert = [[[NSAlert alloc] init] autorelease]; + NSAlert *alert = [[NSAlert alloc] init]; [alert addButtonWithTitle:@"OK"]; [alert addButtonWithTitle:@"Cancel"]; [alert setMessageText:[NSString stringWithCString:question.c_str() encoding:NSUTF8StringEncoding]]; // create text field - NSTextField* label = [[[NSTextField alloc] initWithFrame:NSRectFromCGRect(CGRectMake(0,0,300,40))] autorelease]; + NSTextField* label = [[NSTextField alloc] initWithFrame:NSRectFromCGRect(CGRectMake(0,0,300,40))]; [label setStringValue:[NSString stringWithCString:text.c_str() encoding:NSUTF8StringEncoding]]; // add text field to alert dialog From 058cec0f9b092ea0dc078f4697e0c029d330fd21 Mon Sep 17 00:00:00 2001 From: 2bit Date: Sun, 23 Jan 2022 22:26:41 +0900 Subject: [PATCH 02/32] update video player --- .../video/ofAVFoundationVideoPlayer.h | 26 +++------ .../video/ofAVFoundationVideoPlayer.m | 55 +++++-------------- 2 files changed, 21 insertions(+), 60 deletions(-) diff --git a/libs/openFrameworks/video/ofAVFoundationVideoPlayer.h b/libs/openFrameworks/video/ofAVFoundationVideoPlayer.h index 0862980fd0a..98c27e279b6 100644 --- a/libs/openFrameworks/video/ofAVFoundationVideoPlayer.h +++ b/libs/openFrameworks/video/ofAVFoundationVideoPlayer.h @@ -32,22 +32,10 @@ typedef enum _playerLoopType{ //---------------------------------------------------------- video player. @interface ofAVFoundationVideoPlayer : NSObject { - - AVPlayer * _player; - AVAsset * _asset; - AVPlayerItem * _playerItem; - - - AVAssetReader * _assetReader; - AVAssetReaderTrackOutput * _assetReaderVideoTrackOutput; - AVAssetReaderTrackOutput * _assetReaderAudioTrackOutput; - #if defined(USE_VIDEO_OUTPUT) CMVideoFormatDescriptionRef _videoInfo; - AVPlayerItemVideoOutput * _videoOutput; #endif - id timeObserver; CMSampleBufferRef videoSampleBuffer; @@ -89,17 +77,17 @@ typedef enum _playerLoopType{ NSCondition* deallocCond; } -@property (nonatomic, retain) AVPlayer * player; -@property (nonatomic, retain) AVAsset * asset; -@property (nonatomic, retain) AVPlayerItem * playerItem; +@property (nonatomic, strong) AVPlayer * player; +@property (nonatomic, strong) AVAsset * asset; +@property (nonatomic, strong) AVPlayerItem * playerItem; -@property (nonatomic, retain) AVAssetReader * assetReader; -@property (nonatomic, retain) AVAssetReaderTrackOutput * assetReaderVideoTrackOutput; -@property (nonatomic, retain) AVAssetReaderTrackOutput * assetReaderAudioTrackOutput; +@property (nonatomic, strong) AVAssetReader * assetReader; +@property (nonatomic, strong) AVAssetReaderTrackOutput * assetReaderVideoTrackOutput; +@property (nonatomic, strong) AVAssetReaderTrackOutput * assetReaderAudioTrackOutput; #if defined(USE_VIDEO_OUTPUT) -@property (nonatomic, retain) AVPlayerItemVideoOutput *videoOutput; +@property (nonatomic, strong) AVPlayerItemVideoOutput *videoOutput; #endif diff --git a/libs/openFrameworks/video/ofAVFoundationVideoPlayer.m b/libs/openFrameworks/video/ofAVFoundationVideoPlayer.m index ced9fb37748..ba78bd09302 100644 --- a/libs/openFrameworks/video/ofAVFoundationVideoPlayer.m +++ b/libs/openFrameworks/video/ofAVFoundationVideoPlayer.m @@ -6,6 +6,10 @@ #import "ofAVFoundationVideoPlayer.h" +#if !__has_feature(objc_arc) +# error need ARC +#endif + #define IS_OS_6_OR_LATER ([[[UIDevice currentDevice] systemVersion] floatValue] >= 6.0) @@ -17,18 +21,6 @@ //---------------------------------------------------------- video player. @implementation ofAVFoundationVideoPlayer -@synthesize player = _player; -@synthesize asset = _asset; -@synthesize playerItem = _playerItem; - -@synthesize assetReader = _assetReader; -@synthesize assetReaderVideoTrackOutput = _assetReaderVideoTrackOutput; -@synthesize assetReaderAudioTrackOutput = _assetReaderAudioTrackOutput; -#if defined(USE_VIDEO_OUTPUT) -@synthesize videoOutput = _videoOutput; -#endif - - static const void *ItemStatusContext = &ItemStatusContext; static const void *PlayerRateContext = &ItemStatusContext; @@ -101,7 +93,7 @@ - (void)createVideoOutput NSDictionary *pixBuffAttributes = @{(id)kCVPixelBufferPixelFormatTypeKey: @(kCVPixelFormatType_32ARGB)}; #endif - self.videoOutput = [[[AVPlayerItemVideoOutput alloc] initWithPixelBufferAttributes:pixBuffAttributes] autorelease]; + self.videoOutput = [[AVPlayerItemVideoOutput alloc] initWithPixelBufferAttributes:pixBuffAttributes]; if (!self.videoOutput) { NSLog(@"error creating video output"); return; @@ -124,15 +116,9 @@ - (void)dealloc [asyncLock unlock]; // release locks - [asyncLock autorelease]; - if (deallocCond != nil) { - [deallocCond release]; - deallocCond = nil; + deallocCond = nil; } - - - [super dealloc]; } @@ -348,15 +334,14 @@ - (BOOL)loadWithURL:(NSURL*)url async:(BOOL)bAsync { //------------------------------------------------------------ recreate player. // destroy player if any - should never be the case!! - if(_player != nil) { + if(self.player != nil) { [self removeTimeObserverFromPlayer]; [self.player removeObserver:self forKeyPath:kRateKey context:&PlayerRateContext]; self.player = nil; - [_player release]; } // create new player - _player = [[AVPlayer playerWithPlayerItem:self.playerItem] retain]; + self.player = [AVPlayer playerWithPlayerItem:self.playerItem]; [self.player addObserver:self forKeyPath:kRateKey options:NSKeyValueObservingOptionNew @@ -381,10 +366,8 @@ - (BOOL)loadWithURL:(NSURL*)url async:(BOOL)bAsync { // Wait for the dispatch semaphore signal if(bAsync == NO){ dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER); - dispatch_release(sema); return bLoaded; } else { - dispatch_release(sema); return YES; } } @@ -468,16 +451,13 @@ - (void)unloadVideoAsync { // relase assetreader if (currentReader != nil) { [currentReader cancelReading]; - [currentReader autorelease]; currentReader = nil; if (currentVideoTrack != nil) { - [currentVideoTrack autorelease]; currentVideoTrack = nil; } if (currentAudioTrack != nil) { - [currentAudioTrack autorelease]; currentAudioTrack = nil; } } @@ -485,7 +465,6 @@ - (void)unloadVideoAsync { // release asset if (currentAsset != nil) { [currentAsset cancelLoading]; - [currentAsset autorelease]; currentAsset = nil; } @@ -514,7 +493,6 @@ - (void)unloadVideoAsync { // release videouOutput if (currentVideoOutput != nil) { - [currentVideoOutput autorelease]; currentVideoOutput = nil; } @@ -525,7 +503,6 @@ - (void)unloadVideoAsync { } #endif - [currentItem autorelease]; currentItem = nil; } @@ -536,11 +513,9 @@ - (void)unloadVideoAsync { if (currentTimeObserver != nil) { [currentPlayer removeTimeObserver:currentTimeObserver]; - [currentTimeObserver autorelease]; currentTimeObserver = nil; } - [currentPlayer autorelease]; currentPlayer = nil; } @@ -580,7 +555,6 @@ - (void)unloadVideo [deallocCond wait]; [deallocCond unlock]; - [deallocCond release]; deallocCond = nil; } @@ -620,7 +594,7 @@ - (BOOL)createAssetReaderWithTimeRange:(CMTimeRange)timeRange { //------------------------------------------------------------ add video output. if (bSampleVideo) { - NSMutableDictionary * videoOutputSettings = [[[NSMutableDictionary alloc] init] autorelease]; + NSMutableDictionary * videoOutputSettings = [[NSMutableDictionary alloc] init]; #ifdef TARGET_IOS [videoOutputSettings setObject:[NSNumber numberWithInt:kCVPixelFormatType_32BGRA] forKey:(NSString*)kCVPixelBufferPixelFormatTypeKey]; @@ -1108,17 +1082,16 @@ - (void)addTimeObserverToPlayer { double interval = 1.0 / (double)frameRate; __block ofAVFoundationVideoPlayer* refToSelf = self; - timeObserver = [[_player addPeriodicTimeObserverForInterval:CMTimeMakeWithSeconds(interval, NSEC_PER_SEC) - queue:dispatch_get_main_queue() usingBlock: - ^(CMTime time) { - [refToSelf update]; - }] retain]; + timeObserver = [_player addPeriodicTimeObserverForInterval:CMTimeMakeWithSeconds(interval, NSEC_PER_SEC) + queue:dispatch_get_main_queue() + usingBlock:^(CMTime time) { + [refToSelf update]; + }]; } - (void)removeTimeObserverFromPlayer { if(timeObserver != nil) { [_player removeTimeObserver:timeObserver]; - [timeObserver release]; timeObserver = nil; } } From f21e0e3bf5d9ed753ec7b70d26dad081587d9ac8 Mon Sep 17 00:00:00 2001 From: 2bit Date: Sun, 23 Jan 2022 22:28:30 +0900 Subject: [PATCH 03/32] update video grabber and player --- libs/openFrameworks/video/ofAVFoundationGrabber.mm | 10 +++++----- libs/openFrameworks/video/ofAVFoundationPlayer.mm | 5 ++++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/libs/openFrameworks/video/ofAVFoundationGrabber.mm b/libs/openFrameworks/video/ofAVFoundationGrabber.mm index 503a388f008..b8da0785a56 100644 --- a/libs/openFrameworks/video/ofAVFoundationGrabber.mm +++ b/libs/openFrameworks/video/ofAVFoundationGrabber.mm @@ -9,6 +9,10 @@ #ifdef OF_VIDEO_CAPTURE_AVF +#if !__has_feature(objc_arc) +# error need ARC +#endif + #import @interface OSXVideoGrabber () @@ -153,7 +157,6 @@ - (BOOL)initCapture:(int)framerate capWidth:(int)w capHeight:(int)h{ dispatch_queue_t queue; queue = dispatch_queue_create("cameraQueue", NULL); [captureOutput setSampleBufferDelegate:self queue:queue]; - dispatch_release(queue); NSDictionary* videoSettings =[NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithDouble:width], (id)kCVPixelBufferWidthKey, @@ -166,7 +169,7 @@ - (BOOL)initCapture:(int)framerate capWidth:(int)w capHeight:(int)h{ if(self.captureSession) { self.captureSession = nil; } - self.captureSession = [[[AVCaptureSession alloc] init] autorelease]; + self.captureSession = [[AVCaptureSession alloc] init]; [self.captureSession beginConfiguration]; @@ -342,7 +345,6 @@ - (void)dealloc { if(captureOutput.sampleBufferDelegate != nil) { [captureOutput setSampleBufferDelegate:nil queue:NULL]; } - [captureOutput release]; captureOutput = nil; } @@ -358,7 +360,6 @@ - (void)dealloc { CGImageRelease(currentFrame); currentFrame = nil; } - [super dealloc]; } - (void)eraseGrabberPtr { @@ -398,7 +399,6 @@ - (void)eraseGrabberPtr { // Stop and release the the OSXVideoGrabber [grabber stopCapture]; [grabber eraseGrabberPtr]; - [grabber release]; grabber = nil; } clear(); diff --git a/libs/openFrameworks/video/ofAVFoundationPlayer.mm b/libs/openFrameworks/video/ofAVFoundationPlayer.mm index 5f624964ced..29dd26b7567 100644 --- a/libs/openFrameworks/video/ofAVFoundationPlayer.mm +++ b/libs/openFrameworks/video/ofAVFoundationPlayer.mm @@ -14,6 +14,10 @@ #include "ofTexture.h" #endif +#if !__has_feature(objc_arc) +# error need ARC +#endif + //-------------------------------------------------------------- ofAVFoundationPlayer::ofAVFoundationPlayer() { videoPlayer = nullptr; @@ -160,7 +164,6 @@ dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0), ^{ @autoreleasepool { [currentPlayer unloadVideo]; // synchronious call to unload video - [currentPlayer autorelease]; // release } }); From 351f9085d280ae668d6f91f070fb6873981e8b60 Mon Sep 17 00:00:00 2001 From: 2bit Date: Sun, 23 Jan 2022 22:29:06 +0900 Subject: [PATCH 04/32] add ARC flag on xcconfig --- libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig b/libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig index d0b75b892bf..07d46ffeef5 100644 --- a/libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig +++ b/libs/openFrameworksCompiled/project/osx/CoreOF.xcconfig @@ -2,6 +2,8 @@ CLANG_CXX_LIBRARY = libc++ CLANG_CXX_LANGUAGE_STANDARD = c++11 +CLANG_ENABLE_OBJC_ARC = YES + MACOSX_DEPLOYMENT_TARGET = 10.9 From fbd6e4658069e72fe3875f4de940ab7ae27ba8b7 Mon Sep 17 00:00:00 2001 From: 2bit Date: Sun, 23 Jan 2022 22:49:28 +0900 Subject: [PATCH 05/32] add flag on make setting --- libs/openFrameworksCompiled/project/osx/config.osx.default.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libs/openFrameworksCompiled/project/osx/config.osx.default.mk b/libs/openFrameworksCompiled/project/osx/config.osx.default.mk index 100106bbc85..d57bf5fe220 100644 --- a/libs/openFrameworksCompiled/project/osx/config.osx.default.mk +++ b/libs/openFrameworksCompiled/project/osx/config.osx.default.mk @@ -141,6 +141,10 @@ PLATFORM_CFLAGS += -mmacosx-version-min=$(MAC_OS_MIN_VERSION) PLATFORM_CXXFLAGS += -x objective-c++ PLATFORM_CXXFLAGS += -std=c++11 +# Enable ARC +PLATFORM_CFLAGS += -fobjc-arc + + ifeq ($(USE_GST),1) PLATFORM_CFLAGS += -I/Library/Frameworks/Gstreamer.framework/Headers endif From 5dea97d89575f7c9bab948596b0c286fdb1651e6 Mon Sep 17 00:00:00 2001 From: 2bit Date: Sun, 23 Jan 2022 23:09:32 +0900 Subject: [PATCH 06/32] add flag enabling ARC on iOS env --- libs/openFrameworksCompiled/project/ios/CoreOF.xcconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/openFrameworksCompiled/project/ios/CoreOF.xcconfig b/libs/openFrameworksCompiled/project/ios/CoreOF.xcconfig index fe21aa15e9a..737a6d60b9a 100644 --- a/libs/openFrameworksCompiled/project/ios/CoreOF.xcconfig +++ b/libs/openFrameworksCompiled/project/ios/CoreOF.xcconfig @@ -41,3 +41,4 @@ OF_CORE_FRAMEWORKS = -framework AudioToolbox -framework Accelerate -framework AV // once all libraries are compiled for libc++ / all architectures CLANG_CXX_LIBRARY = libc++ CLANG_CXX_LANGUAGE_STANDARD = c++11 +CLANG_ENABLE_OBJC_ARC = YES From d9709fb1ce6d5b190b8b4df97fedeb9ec6d0bb9e Mon Sep 17 00:00:00 2001 From: 2bit Date: Sun, 23 Jan 2022 23:09:57 +0900 Subject: [PATCH 07/32] update to ARC code --- addons/ofxiOS/src/core/ofxiOSViewController.h | 2 +- addons/ofxiOS/src/core/ofxiOSViewController.mm | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/addons/ofxiOS/src/core/ofxiOSViewController.h b/addons/ofxiOS/src/core/ofxiOSViewController.h index 6e87d0a505e..15a67429218 100644 --- a/addons/ofxiOS/src/core/ofxiOSViewController.h +++ b/addons/ofxiOS/src/core/ofxiOSViewController.h @@ -15,7 +15,7 @@ class ofxiOSApp; @interface ofxiOSViewController : UIViewController -@property (nonatomic, retain) ofxiOSEAGLView * glView; +@property (nonatomic, strong) ofxiOSEAGLView * glView; - (id)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app; - (id)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app sharegroup:(EAGLSharegroup *)sharegroup; diff --git a/addons/ofxiOS/src/core/ofxiOSViewController.mm b/addons/ofxiOS/src/core/ofxiOSViewController.mm index fcf4d99d34b..5aa9a7b7663 100644 --- a/addons/ofxiOS/src/core/ofxiOSViewController.mm +++ b/addons/ofxiOS/src/core/ofxiOSViewController.mm @@ -6,6 +6,10 @@ #include #if TARGET_OS_IOS || (TARGET_OS_IPHONE && !TARGET_OS_TV) +#if !__has_feature(objc_arc) +# error need ARC +#endif + #import #include "ofxiOSViewController.h" @@ -25,11 +29,8 @@ @interface ofxiOSViewController() { @implementation ofxiOSViewController -@synthesize glView; - - (id)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app { - [self initWithFrame:frame app:app sharegroup:nil]; - return self; + return [self initWithFrame:frame app:app sharegroup:nil]; } - (id)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app sharegroup:(EAGLSharegroup *)sharegroup{ @@ -43,7 +44,7 @@ - (id)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app sharegroup:(EAGLSharegrou } bFirstUpdate = NO; bAnimated = NO; - self.glView = [[[ofxiOSEAGLView alloc] initWithFrame:frame andApp:app sharegroup:sharegroup] autorelease]; + self.glView = [[ofxiOSEAGLView alloc] initWithFrame:frame andApp:app sharegroup:sharegroup]; [self.glView setMultipleTouchEnabled:ofxiOSGetOFWindow()->isMultiTouch()]; self.glView.delegate = self; @@ -57,8 +58,6 @@ - (void) dealloc { [self.glView removeFromSuperview]; self.glView.delegate = nil; self.glView = nil; - - [super dealloc]; } - (void)viewDidLoad { From c081a7fb997cbfd72fa5ee1e2354449b8058d41c Mon Sep 17 00:00:00 2001 From: 2bit Date: Mon, 24 Jan 2022 00:42:40 +0900 Subject: [PATCH 08/32] comment out unneeded substitute --- addons/ofxiOS/src/app/ofAppiOSWindow.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/ofxiOS/src/app/ofAppiOSWindow.h b/addons/ofxiOS/src/app/ofAppiOSWindow.h index cefe65763c6..8c4fb0b6139 100644 --- a/addons/ofxiOS/src/app/ofAppiOSWindow.h +++ b/addons/ofxiOS/src/app/ofAppiOSWindow.h @@ -103,7 +103,7 @@ class ofiOSWindowSettings: public ofGLESWindowSettings{ enableHardwareOrientationAnimation = false; enableSetupScreen = true; setupOrientation = OF_ORIENTATION_DEFAULT; - windowControllerType = windowControllerType; +// windowControllerType = windowControllerType; colorType = ofxiOSRendererColorFormat::RGBA8888; depthType = ofxiOSRendererDepthFormat::DEPTH_NONE; stencilType = ofxiOSRendererStencilFormat::STENCIL_NONE; From 88de14850023b3272094d821ae90e7d3c2458fc0 Mon Sep 17 00:00:00 2001 From: 2bit Date: Mon, 24 Jan 2022 00:43:46 +0900 Subject: [PATCH 09/32] update to ARC, strict check selector --- addons/ofxiOS/src/core/ofxiOSAppDelegate.h | 8 +-- addons/ofxiOS/src/core/ofxiOSAppDelegate.mm | 62 +++++++++++++-------- 2 files changed, 42 insertions(+), 28 deletions(-) diff --git a/addons/ofxiOS/src/core/ofxiOSAppDelegate.h b/addons/ofxiOS/src/core/ofxiOSAppDelegate.h index 14e525e2285..0e8c1e530df 100644 --- a/addons/ofxiOS/src/core/ofxiOSAppDelegate.h +++ b/addons/ofxiOS/src/core/ofxiOSAppDelegate.h @@ -44,10 +44,10 @@ NSInteger currentScreenIndex; } -@property (nonatomic, retain) UIWindow * window; -@property (nonatomic, retain) UIWindow * externalWindow; -@property (nonatomic, retain) UIViewController * uiViewController; -@property (readonly, assign) NSInteger currentScreenIndex; +@property (nonatomic, strong) UIWindow * window; +@property (nonatomic, strong) UIWindow * externalWindow; +@property (nonatomic, strong) UIViewController * uiViewController; +@property (readonly) NSInteger currentScreenIndex; - (BOOL)application:(UIApplication*)application handleOpenURL:(NSURL*)url; diff --git a/addons/ofxiOS/src/core/ofxiOSAppDelegate.mm b/addons/ofxiOS/src/core/ofxiOSAppDelegate.mm index d4fca9b81a0..5ad3976aa9b 100644 --- a/addons/ofxiOS/src/core/ofxiOSAppDelegate.mm +++ b/addons/ofxiOS/src/core/ofxiOSAppDelegate.mm @@ -29,12 +29,17 @@ * * ***********************************************************************/ -#include "ofxiOSAppDelegate.h" +#import "ofxiOSAppDelegate.h" #if TARGET_OS_IOS || (TARGET_OS_IPHONE && !TARGET_OS_TV) -#include "ofxiOSViewController.h" -#include "ofxiOSExternalDisplay.h" +#if !__has_feature(objc_arc) +# error need ARC +#endif + +#import "ofxiOSViewController.h" +#import "ofxiOSGLKViewController.h" +#import "ofxiOSExternalDisplay.h" #include "ofxiOSExtras.h" #include "ofxiOSAlerts.h" #include "ofxiOSEAGLView.h" @@ -45,22 +50,17 @@ @implementation ofxiOSAppDelegate -@synthesize window; -@synthesize externalWindow; @synthesize currentScreenIndex; -@synthesize uiViewController; - - (void)dealloc { self.window = nil; self.externalWindow = nil; self.uiViewController = nil; - [super dealloc]; } - (void)applicationDidFinishLaunching:(UIApplication *)application { - self.window = [[[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]] autorelease]; + self.window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]]; [self.window makeKeyAndVisible]; currentScreenIndex = 0; @@ -145,11 +145,11 @@ - (void)applicationDidFinishLaunching:(UIApplication *)application { case METAL_KIT: NSLog(@"No MetalKit yet supported for openFrameworks: Falling back to GLKit"); case GL_KIT: - self.uiViewController = (UIViewController*)[[[ofxiOSGLKViewController alloc] initWithFrame:frame app:(ofxiOSApp *)ofGetAppPtr() sharegroup:nil] autorelease]; + self.uiViewController = (UIViewController *)[[ofxiOSGLKViewController alloc] initWithFrame:frame app:(ofxiOSApp *)ofGetAppPtr() sharegroup:nil]; break; case CORE_ANIMATION: default: - self.uiViewController = [[[ofxiOSViewController alloc] initWithFrame:frame app:(ofxiOSApp *)ofGetAppPtr() sharegroup:nil] autorelease]; + self.uiViewController = [[ofxiOSViewController alloc] initWithFrame:frame app:(ofxiOSApp *)ofGetAppPtr() sharegroup:nil]; break; } @@ -172,14 +172,22 @@ - (void)applicationDidFinishLaunching:(UIApplication *)application { } if(!bDoesHWOrientation) { - if([self.uiViewController respondsToSelector:@selector(rotateToInterfaceOrientation:animated:)]) { - [self.uiViewController rotateToInterfaceOrientation:UIInterfaceOrientationPortrait animated:false]; - } + if([self.uiViewController isKindOfClass:ofxiOSViewController.class]) { + ofxiOSViewController *controller = (ofxiOSViewController*)self.uiViewController; + [controller rotateToInterfaceOrientation:UIInterfaceOrientationPortrait animated:false]; + } else if([self.uiViewController isKindOfClass:ofxiOSGLKViewController.class]) { + ofxiOSGLKViewController *controller = (ofxiOSGLKViewController *)self.uiViewController; + [controller rotateToInterfaceOrientation:UIInterfaceOrientationPortrait animated:false]; + } } else { [[UIApplication sharedApplication] setStatusBarOrientation:interfaceOrientation animated:NO]; - if([self.uiViewController respondsToSelector:@selector(rotateToInterfaceOrientation:animated:)]) { - [self.uiViewController rotateToInterfaceOrientation:interfaceOrientation animated:false]; - } + if([self.uiViewController isKindOfClass:ofxiOSViewController.class]) { + ofxiOSViewController *controller = (ofxiOSViewController*)self.uiViewController; + [controller rotateToInterfaceOrientation:UIInterfaceOrientationPortrait animated:false]; + } else if([self.uiViewController isKindOfClass:ofxiOSGLKViewController.class]) { + ofxiOSGLKViewController *controller = (ofxiOSGLKViewController *)self.uiViewController; + [controller rotateToInterfaceOrientation:UIInterfaceOrientationPortrait animated:false]; + } ofSetOrientation(requested); } @@ -239,11 +247,17 @@ - (void)receivedRotate:(NSNotification*)notification { if( [[[UIDevice currentDevice] systemVersion] compare:@"8.0" options:NSNumericSearch] == NSOrderedAscending ) { //iOS7- if(deviceOrientation != UIDeviceOrientationUnknown && deviceOrientation != UIDeviceOrientationFaceUp && deviceOrientation != UIDeviceOrientationFaceDown ) { - if([self.uiViewController respondsToSelector:@selector(isReadyToRotate)]) { - if([self.uiViewController isReadyToRotate]) { - ofxiOSAlerts.deviceOrientationChanged( deviceOrientation ); - } - } + if([self.uiViewController isKindOfClass:ofxiOSViewController.class]) { + ofxiOSViewController *controller = (ofxiOSViewController*)self.uiViewController; + if([controller isReadyToRotate]) { + ofxiOSAlerts.deviceOrientationChanged( deviceOrientation ); + } + } else if([self.uiViewController isKindOfClass:ofxiOSGLKViewController.class]) { + ofxiOSGLKViewController *controller = (ofxiOSGLKViewController *)self.uiViewController; + if([controller isReadyToRotate]) { + ofxiOSAlerts.deviceOrientationChanged( deviceOrientation ); + } + } } }else { ofxiOSAlerts.deviceOrientationChanged( deviceOrientation ); @@ -293,7 +307,7 @@ - (BOOL)createExternalWindowWithPreferredMode { externalScreenFrame = CGRectZero; externalScreenFrame.size = CGSizeMake(w, h); - self.externalWindow = [[[UIWindow alloc] initWithFrame:externalScreenFrame] autorelease]; + self.externalWindow = [[UIWindow alloc] initWithFrame:externalScreenFrame]; self.externalWindow.screen = externalScreen; self.externalWindow.clipsToBounds = YES; self.externalWindow.hidden = NO; @@ -331,7 +345,7 @@ - (BOOL)createExternalWindowWithScreenModeIndex:(NSInteger)screenModeIndex { externalScreenFrame = CGRectZero; externalScreenFrame.size = CGSizeMake(w, h); - self.externalWindow = [[[UIWindow alloc] initWithFrame:externalScreenFrame] autorelease]; + self.externalWindow = [[UIWindow alloc] initWithFrame:externalScreenFrame]; self.externalWindow.screen = externalScreen; self.externalWindow.clipsToBounds = YES; self.externalWindow.hidden = NO; From bbcb7cad206652aa362109418ffdd99364697d57 Mon Sep 17 00:00:00 2001 From: 2bit Date: Mon, 24 Jan 2022 00:50:58 +0900 Subject: [PATCH 10/32] update to ARC (simple updates) --- addons/ofxiOS/src/core/ofxiOSEAGLView.h | 2 +- addons/ofxiOS/src/core/ofxiOSEAGLView.mm | 27 +++---- addons/ofxiOS/src/core/ofxiOSGLKView.h | 2 +- addons/ofxiOS/src/core/ofxiOSGLKView.mm | 18 +++-- .../ofxiOS/src/core/ofxiOSGLKViewController.h | 2 +- .../src/core/ofxiOSGLKViewController.mm | 8 +- addons/ofxiOS/src/gl/EAGLKView.h | 2 +- addons/ofxiOS/src/gl/EAGLKView.m | 7 +- addons/ofxiOS/src/gl/EAGLView.h | 9 +-- addons/ofxiOS/src/gl/EAGLView.m | 12 +-- addons/ofxiOS/src/gl/ES1Renderer.m | 9 ++- addons/ofxiOS/src/gl/ES2Renderer.m | 9 ++- addons/ofxiOS/src/sound/AVSoundPlayer.h | 10 +-- addons/ofxiOS/src/sound/AVSoundPlayer.m | 13 ++-- addons/ofxiOS/src/sound/SoundInputStream.m | 5 +- addons/ofxiOS/src/sound/SoundOutputStream.m | 9 ++- addons/ofxiOS/src/sound/SoundStream.h | 3 +- addons/ofxiOS/src/sound/SoundStream.m | 9 ++- .../src/sound/ofxiOSSoundStreamDelegate.mm | 7 +- addons/ofxiOS/src/utils/ofxiOSCoreLocation.mm | 13 ++-- addons/ofxiOS/src/utils/ofxiOSCoreMotion.mm | 8 +- addons/ofxiOS/src/utils/ofxiOSExtras.mm | 27 +++---- addons/ofxiOS/src/utils/ofxiOSImagePicker.h | 2 +- addons/ofxiOS/src/utils/ofxiOSImagePicker.mm | 16 ++-- addons/ofxiOS/src/utils/ofxiOSKeyboard.mm | 10 ++- .../ofxiOS/src/utils/ofxiOSMapKitDelegate.mm | 5 +- .../src/video/AVFoundationVideoGrabber.mm | 10 +-- .../src/video/AVFoundationVideoPlayer.h | 22 +++--- .../src/video/AVFoundationVideoPlayer.m | 24 +++--- addons/ofxiOS/src/video/ofxiOSVideoPlayer.mm | 77 ++++++++++--------- 30 files changed, 199 insertions(+), 178 deletions(-) diff --git a/addons/ofxiOS/src/core/ofxiOSEAGLView.h b/addons/ofxiOS/src/core/ofxiOSEAGLView.h index 8887a3614d4..4a86b917768 100644 --- a/addons/ofxiOS/src/core/ofxiOSEAGLView.h +++ b/addons/ofxiOS/src/core/ofxiOSEAGLView.h @@ -17,7 +17,7 @@ class ofAppiOSWindow; @interface ofxiOSEAGLView : EAGLView { @protected - NSMutableDictionary * activeTouches; + NSMutableDictionary *activeTouches; glm::vec2 * screenSize; // because glm::vec2 is forward declared, glm::vec2 * windowSize; // these values have to be pointers. glm::vec2 * windowPos; diff --git a/addons/ofxiOS/src/core/ofxiOSEAGLView.mm b/addons/ofxiOS/src/core/ofxiOSEAGLView.mm index 7620ac65182..a6891f6836b 100644 --- a/addons/ofxiOS/src/core/ofxiOSEAGLView.mm +++ b/addons/ofxiOS/src/core/ofxiOSEAGLView.mm @@ -13,6 +13,10 @@ #include #import +#if !__has_feature(objc_arc) +# error need ARC +#endif + static ofxiOSEAGLView * _instanceRef = nil; @interface ofxiOSEAGLView() { @@ -35,8 +39,7 @@ + (ofxiOSEAGLView *) getInstance { } - (id)initWithFrame:(CGRect)frame andApp:(ofxiOSApp *)appPtr { - [self initWithFrame:frame andApp:appPtr sharegroup:nil]; - return self; + return [self initWithFrame:frame andApp:appPtr sharegroup:nil]; } - (id)initWithFrame:(CGRect)frame andApp:(ofxiOSApp *)appPtr sharegroup:(EAGLSharegroup *)sharegroup { @@ -128,8 +131,7 @@ - (void)destroy { app = NULL; window = NULL; - [activeTouches release]; - + activeTouches = nil; delete screenSize; screenSize = NULL; delete windowSize; @@ -146,7 +148,6 @@ - (void)destroy { - (void)dealloc { [self destroy]; - [super dealloc]; } - (void)layoutSubviews { @@ -248,7 +249,7 @@ -(void) resetTouches { [activeTouches removeAllObjects]; } -- (void)touchesBegan:(NSSet *)touches +- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ if(!bInit || !bSetup) { @@ -259,12 +260,12 @@ - (void)touchesBegan:(NSSet *)touches for(UITouch *touch in touches) { int touchIndex = 0; - while([[activeTouches allValues] containsObject:[NSNumber numberWithInt:touchIndex]]){ + while([[activeTouches allValues] containsObject:@(touchIndex)]){ touchIndex++; } - [activeTouches setObject:[NSNumber numberWithInt:touchIndex] forKey:[NSValue valueWithPointer:touch]]; - + [activeTouches setObject:[NSNumber numberWithInt:touchIndex] + forKey:[NSValue valueWithPointer:(__bridge void *)touch]]; CGPoint touchPoint = [touch locationInView:self]; touchPoint.x *= scaleFactor; // this has to be done because retina still returns points in 320x240 but with high percision @@ -300,7 +301,7 @@ - (void)touchesMoved:(NSSet *)touches } for(UITouch *touch in touches){ - int touchIndex = [[activeTouches objectForKey:[NSValue valueWithPointer:touch]] intValue]; + int touchIndex = [[activeTouches objectForKey:[NSValue valueWithPointer:(__bridge void *)touch]] intValue]; CGPoint touchPoint = [touch locationInView:self]; @@ -332,9 +333,9 @@ - (void)touchesEnded:(NSSet *)touches } for(UITouch *touch in touches){ - int touchIndex = [[activeTouches objectForKey:[NSValue valueWithPointer:touch]] intValue]; + int touchIndex = [[activeTouches objectForKey:[NSValue valueWithPointer:(__bridge void *)touch]] intValue]; - [activeTouches removeObjectForKey:[NSValue valueWithPointer:touch]]; + [activeTouches removeObjectForKey:[NSValue valueWithPointer:(__bridge void *)touch]]; CGPoint touchPoint = [touch locationInView:self]; @@ -367,7 +368,7 @@ - (void)touchesCancelled:(NSSet *)touches } for(UITouch *touch in touches){ - int touchIndex = [[activeTouches objectForKey:[NSValue valueWithPointer:touch]] intValue]; + int touchIndex = [[activeTouches objectForKey:[NSValue valueWithPointer:(__bridge void *)touch]] intValue]; CGPoint touchPoint = [touch locationInView:self]; diff --git a/addons/ofxiOS/src/core/ofxiOSGLKView.h b/addons/ofxiOS/src/core/ofxiOSGLKView.h index 290c0ec0dff..9a2f7aa9e3d 100644 --- a/addons/ofxiOS/src/core/ofxiOSGLKView.h +++ b/addons/ofxiOS/src/core/ofxiOSGLKView.h @@ -18,7 +18,7 @@ class ofAppiOSWindow; @interface ofxiOSGLKView : EAGLKView { @protected - NSMutableDictionary * activeTouches; + NSMutableDictionary * activeTouches; glm::vec2 * screenSize; // because glm::vec2 is forward declared, glm::vec2 * windowSize; // these values have to be pointers. glm::vec2 * windowPos; diff --git a/addons/ofxiOS/src/core/ofxiOSGLKView.mm b/addons/ofxiOS/src/core/ofxiOSGLKView.mm index 6025f3f2c71..b3558de426c 100644 --- a/addons/ofxiOS/src/core/ofxiOSGLKView.mm +++ b/addons/ofxiOS/src/core/ofxiOSGLKView.mm @@ -13,6 +13,10 @@ #include #import +#if !__has_feature(objc_arc) +# error need ARC +#endif + static ofxiOSGLKView * _instanceRef = nil; @interface ofxiOSGLKView() { @@ -128,8 +132,7 @@ - (void)destroy { app = NULL; window = NULL; - [activeTouches release]; - + activeTouches = nil; delete screenSize; screenSize = NULL; delete windowSize; @@ -146,7 +149,6 @@ - (void)destroy { - (void)dealloc { [self destroy]; - [super dealloc]; } - (void)layoutSubviews { @@ -270,7 +272,7 @@ - (void)touchesBegan:(NSSet *)touches touchIndex++; } - [activeTouches setObject:[NSNumber numberWithInt:touchIndex] forKey:[NSValue valueWithPointer:touch]]; + [activeTouches setObject:@(touchIndex) forKey:[NSValue valueWithPointer:(__bridge void *)touch]]; CGPoint touchPoint = [touch locationInView:self]; @@ -307,7 +309,7 @@ - (void)touchesMoved:(NSSet *)touches } for(UITouch *touch in touches){ - int touchIndex = [[activeTouches objectForKey:[NSValue valueWithPointer:touch]] intValue]; + int touchIndex = [[activeTouches objectForKey:[NSValue valueWithPointer:(__bridge void *)touch]] intValue]; CGPoint touchPoint = [touch locationInView:self]; @@ -339,9 +341,9 @@ - (void)touchesEnded:(NSSet *)touches } for(UITouch *touch in touches){ - int touchIndex = [[activeTouches objectForKey:[NSValue valueWithPointer:touch]] intValue]; + int touchIndex = [[activeTouches objectForKey:[NSValue valueWithPointer:(__bridge void *)touch]] intValue]; - [activeTouches removeObjectForKey:[NSValue valueWithPointer:touch]]; + [activeTouches removeObjectForKey:[NSValue valueWithPointer:(__bridge void *)touch]]; CGPoint touchPoint = [touch locationInView:self]; @@ -374,7 +376,7 @@ - (void)touchesCancelled:(NSSet *)touches } for(UITouch *touch in touches){ - int touchIndex = [[activeTouches objectForKey:[NSValue valueWithPointer:touch]] intValue]; + int touchIndex = [[activeTouches objectForKey:[NSValue valueWithPointer:(__bridge void *)touch]] intValue]; CGPoint touchPoint = [touch locationInView:self]; diff --git a/addons/ofxiOS/src/core/ofxiOSGLKViewController.h b/addons/ofxiOS/src/core/ofxiOSGLKViewController.h index 622f82ff719..6d98381396a 100644 --- a/addons/ofxiOS/src/core/ofxiOSGLKViewController.h +++ b/addons/ofxiOS/src/core/ofxiOSGLKViewController.h @@ -21,7 +21,7 @@ class ofxiOSApp; @interface ofxiOSGLKViewController : GLKViewController -@property (nonatomic, retain) ofxiOSGLKView * glView; +@property (nonatomic, strong) ofxiOSGLKView * glView; - (id)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app; - (id)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app sharegroup:(EAGLSharegroup *)sharegroup; diff --git a/addons/ofxiOS/src/core/ofxiOSGLKViewController.mm b/addons/ofxiOS/src/core/ofxiOSGLKViewController.mm index 8d91ed88b56..10c2ef98611 100644 --- a/addons/ofxiOS/src/core/ofxiOSGLKViewController.mm +++ b/addons/ofxiOS/src/core/ofxiOSGLKViewController.mm @@ -8,6 +8,10 @@ #include #if TARGET_OS_IOS || (TARGET_OS_IPHONE && !TARGET_OS_TV) +#if !__has_feature(objc_arc) +# error need ARC +#endif + #import "ofxiOSGLKViewController.h" #include "ofxiOSGLKView.h" @@ -43,7 +47,7 @@ - (id)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app sharegroup:(EAGLSharegrou bFirstUpdate = NO; bAnimated = NO; - self.glView = [[[ofxiOSGLKView alloc] initWithFrame:frame andApp:app sharegroup:sharegroup] autorelease]; + self.glView = [[ofxiOSGLKView alloc] initWithFrame:frame andApp:app sharegroup:sharegroup]; self.glView.delegate = self; } @@ -54,8 +58,6 @@ - (void) dealloc { [self.glView removeFromSuperview]; self.glView.delegate = nil; self.glView = nil; - - [super dealloc]; } - (void)viewDidLoad { diff --git a/addons/ofxiOS/src/gl/EAGLKView.h b/addons/ofxiOS/src/gl/EAGLKView.h index 4f18592e9ca..18f8cbfe191 100644 --- a/addons/ofxiOS/src/gl/EAGLKView.h +++ b/addons/ofxiOS/src/gl/EAGLKView.h @@ -35,7 +35,7 @@ ESRendererVersion rendererVersion; } -@property (nonatomic, assign) id delegate; +@property (nonatomic, weak) id delegate; - (id)initWithFrame:(CGRect)frame andPreferedRenderer:(ESRendererVersion)rendererVersion diff --git a/addons/ofxiOS/src/gl/EAGLKView.m b/addons/ofxiOS/src/gl/EAGLKView.m index f9c427ab748..0b41694cc72 100644 --- a/addons/ofxiOS/src/gl/EAGLKView.m +++ b/addons/ofxiOS/src/gl/EAGLKView.m @@ -12,6 +12,10 @@ #import "ES1Renderer.h" #import "ES2Renderer.h" +#if !__has_feature(objc_arc) +# error need ARC +#endif + @interface EAGLKView() { BOOL bInit; } @@ -80,7 +84,7 @@ - (id)initWithFrame:(CGRect)frame if(!self.context){ NSLog(@"Critical Error - ofiOS GLKView.m could not start any type of OpenGLES renderer"); - [self release]; + self = nil; return nil; } } @@ -116,7 +120,6 @@ - (void) destroy { - (void) dealloc{ [self destroy]; - [super dealloc]; } - (void) setup { diff --git a/addons/ofxiOS/src/gl/EAGLView.h b/addons/ofxiOS/src/gl/EAGLView.h index 0c9f9563a62..a66d32894cb 100644 --- a/addons/ofxiOS/src/gl/EAGLView.h +++ b/addons/ofxiOS/src/gl/EAGLView.h @@ -47,9 +47,6 @@ // Note that setting the view non-opaque will only work if the EAGL surface has an alpha channel. @interface EAGLView : UIView { -@public - id delegate; - @protected id renderer; CGFloat scaleFactor; @@ -74,10 +71,10 @@ NSLock * glLock; } -@property (nonatomic, assign) id delegate; +@property (nonatomic, weak) id delegate; @property (readonly, nonatomic, getter=isAnimating) BOOL animating; -@property (nonatomic) float animationFrameInterval; -@property (nonatomic) float animationFrameRate; +@property (nonatomic, assign) float animationFrameInterval; +@property (nonatomic, assign) float animationFrameRate; - (id)initWithFrame:(CGRect)frame andPreferedRenderer:(ESRendererVersion)rendererVersion diff --git a/addons/ofxiOS/src/gl/EAGLView.m b/addons/ofxiOS/src/gl/EAGLView.m index 7a7409e0d5f..4047e566141 100644 --- a/addons/ofxiOS/src/gl/EAGLView.m +++ b/addons/ofxiOS/src/gl/EAGLView.m @@ -30,6 +30,10 @@ * ***********************************************************************/ +#if !__has_feature(objc_arc) +# error need ARC +#endif + #import #include @@ -123,7 +127,7 @@ - (id)initWithFrame:(CGRect)frame if(!renderer){ NSLog(@"Critical Error - ofiOS EAGLView.m could not start any type of OpenGLES renderer"); - [self release]; + self = nil; return nil; } @@ -169,15 +173,13 @@ - (void) destroy { return; } [self stopAnimation]; - [renderer release]; - [glLock release]; - + renderer = nil; + glLock = nil; bInit = NO; } - (void) dealloc{ [self destroy]; - [super dealloc]; } - (void) drawView:(id)sender { diff --git a/addons/ofxiOS/src/gl/ES1Renderer.m b/addons/ofxiOS/src/gl/ES1Renderer.m index 477b864c467..eec70139335 100644 --- a/addons/ofxiOS/src/gl/ES1Renderer.m +++ b/addons/ofxiOS/src/gl/ES1Renderer.m @@ -2,6 +2,10 @@ #import "ES1Renderer.h" +#if !__has_feature(objc_arc) +# error need ARC +#endif + @implementation ES1Renderer // Create an OpenGL ES 1.1 context @@ -24,7 +28,7 @@ - (id)initWithDepth:(bool)depth andAA:(bool)msaa andMSAASamples:(int)samples and if(!context || ![EAGLContext setCurrentContext:context]) { NSLog(@"OpenGL ES1 failed"); - [self release]; + self = nil; return nil; } @@ -176,10 +180,7 @@ - (void)dealloc { [EAGLContext setCurrentContext:nil]; } - [context release]; context = nil; - - [super dealloc]; } - (NSInteger)getWidth { diff --git a/addons/ofxiOS/src/gl/ES2Renderer.m b/addons/ofxiOS/src/gl/ES2Renderer.m index 68c8d2d7530..0500c35d6be 100644 --- a/addons/ofxiOS/src/gl/ES2Renderer.m +++ b/addons/ofxiOS/src/gl/ES2Renderer.m @@ -2,6 +2,10 @@ #import "ES2Renderer.h" +#if !__has_feature(objc_arc) +# error need ARC +#endif + @implementation ES2Renderer // Create an OpenGL ES 2.0 context @@ -22,7 +26,7 @@ - (id)initWithDepth:(bool)depth andAA:(bool)msaa andMSAASamples:(int)samples and if(!context || ![EAGLContext setCurrentContext:context]) { NSLog(@"OpenGL ES2 failed"); - [self release]; + self = nil; return nil; } @@ -172,10 +176,7 @@ - (void)dealloc { [EAGLContext setCurrentContext:nil]; } - [context release]; context = nil; - - [super dealloc]; } - (NSInteger)getWidth { diff --git a/addons/ofxiOS/src/sound/AVSoundPlayer.h b/addons/ofxiOS/src/sound/AVSoundPlayer.h index 3b3abe8e9a8..48907378255 100644 --- a/addons/ofxiOS/src/sound/AVSoundPlayer.h +++ b/addons/ofxiOS/src/sound/AVSoundPlayer.h @@ -16,13 +16,11 @@ - (void)soundPlayerError:(NSError *)error; @end -@interface AVSoundPlayer : NSObject { - id delegate; -} +@interface AVSoundPlayer : NSObject -@property(nonatomic, assign) id delegate; -@property(nonatomic, retain) AVAudioPlayer * player; -@property(nonatomic, retain) NSTimer * timer; +@property(nonatomic, weak) id delegate; +@property(nonatomic, strong) AVAudioPlayer * player; +@property(nonatomic, strong) NSTimer * timer; - (BOOL)loadWithFile:(NSString*)file; - (BOOL)loadWithPath:(NSString*)path; diff --git a/addons/ofxiOS/src/sound/AVSoundPlayer.m b/addons/ofxiOS/src/sound/AVSoundPlayer.m index 836b80f486d..6b70749f94d 100644 --- a/addons/ofxiOS/src/sound/AVSoundPlayer.m +++ b/addons/ofxiOS/src/sound/AVSoundPlayer.m @@ -7,6 +7,10 @@ #import "AVSoundPlayer.h" #include +#if !__has_feature(objc_arc) +# error need ARC +#endif + @interface AVSoundPlayer() { BOOL bMultiPlay; } @@ -14,10 +18,6 @@ @interface AVSoundPlayer() { @implementation AVSoundPlayer -@synthesize delegate; -@synthesize player; -@synthesize timer; - - (id)init { self = [super init]; if(self) { @@ -52,7 +52,6 @@ - (void) setupSharedSession { - (void)dealloc { [self unloadSound]; - [super dealloc]; } //----------------------------------------------------------- load / unload. @@ -72,8 +71,8 @@ - (BOOL)loadWithURL:(NSURL*)url { [self unloadSound]; [self setupSharedSession]; NSError * error = nil; - self.player = [[[AVAudioPlayer alloc] initWithContentsOfURL:url - error:&error] autorelease]; + self.player = [[AVAudioPlayer alloc] initWithContentsOfURL:url + error:&error]; if([self.player respondsToSelector:@selector(setEnableRate:)]) { [self.player setEnableRate:YES]; } diff --git a/addons/ofxiOS/src/sound/SoundInputStream.m b/addons/ofxiOS/src/sound/SoundInputStream.m index 1eb2658c2bc..ea835d6d539 100644 --- a/addons/ofxiOS/src/sound/SoundInputStream.m +++ b/addons/ofxiOS/src/sound/SoundInputStream.m @@ -17,6 +17,10 @@ #import "SoundInputStream.h" #import +#if !__has_feature(objc_arc) +# error need ARC +#endif + typedef struct { AudioBufferList * bufferList; AudioUnit remoteIO; @@ -99,7 +103,6 @@ - (id)initWithNumOfChannels:(NSInteger)value0 - (void)dealloc { [self stop]; - [super dealloc]; } - (void)start { diff --git a/addons/ofxiOS/src/sound/SoundOutputStream.m b/addons/ofxiOS/src/sound/SoundOutputStream.m index 0089249d5bb..217475b433f 100644 --- a/addons/ofxiOS/src/sound/SoundOutputStream.m +++ b/addons/ofxiOS/src/sound/SoundOutputStream.m @@ -16,6 +16,10 @@ #import "SoundOutputStream.h" +#if !__has_feature(objc_arc) +# error need ARC +#endif + static OSStatus soundOutputStreamRenderCallback(void *inRefCon, AudioUnitRenderActionFlags *ioActionFlags, const AudioTimeStamp *inTimeStamp, @@ -23,7 +27,7 @@ static OSStatus soundOutputStreamRenderCallback(void *inRefCon, UInt32 inNumberFrames, AudioBufferList *ioData) { - SoundOutputStream * stream = (SoundOutputStream *)inRefCon; + SoundOutputStream * stream = (__bridge SoundOutputStream *)inRefCon; AudioBuffer * audioBuffer = &ioData->mBuffers[0]; // clearing the buffer before handing it off to the user @@ -66,7 +70,6 @@ - (id)initWithNumOfChannels:(NSInteger)value0 - (void)dealloc { [self stop]; - [super dealloc]; } - (void)start { @@ -128,7 +131,7 @@ - (void)start { //---------------------------------------------------------- render callback. - AURenderCallbackStruct callback = {soundOutputStreamRenderCallback, self}; + AURenderCallbackStruct callback = {soundOutputStreamRenderCallback, (__bridge void * _Nullable)(self)}; [self checkStatus:AudioUnitSetProperty(audioUnit, kAudioUnitProperty_SetRenderCallback, kAudioUnitScope_Global, diff --git a/addons/ofxiOS/src/sound/SoundStream.h b/addons/ofxiOS/src/sound/SoundStream.h index d8c59bd922f..7b33f4f733a 100644 --- a/addons/ofxiOS/src/sound/SoundStream.h +++ b/addons/ofxiOS/src/sound/SoundStream.h @@ -30,7 +30,6 @@ typedef enum { @end @interface SoundStream : NSObject { - id delegate; SoundStreamType streamType; NSInteger numOfChannels; NSInteger sampleRate; @@ -40,7 +39,7 @@ typedef enum { BOOL bInterruptedWhileRunning; } -@property (nonatomic, assign) id delegate; +@property (nonatomic, strong) id delegate; @property (readonly) SoundStreamType streamType; @property (readonly) NSInteger numOfChannels; @property (readonly) NSInteger sampleRate; diff --git a/addons/ofxiOS/src/sound/SoundStream.m b/addons/ofxiOS/src/sound/SoundStream.m index a4423effda8..076396d58ae 100644 --- a/addons/ofxiOS/src/sound/SoundStream.m +++ b/addons/ofxiOS/src/sound/SoundStream.m @@ -8,6 +8,10 @@ #import "SoundStream.h" #import +#if !__has_feature(objc_arc) +# error need ARC +#endif + @interface SoundStream() { // } @@ -15,7 +19,6 @@ @interface SoundStream() { @implementation SoundStream -@synthesize delegate; @synthesize streamType; @synthesize numOfChannels; @synthesize sampleRate; @@ -51,9 +54,7 @@ - (id)initWithNumOfChannels:(NSInteger)value0 } - (void)dealloc { - [super dealloc]; - - + self.delegate = nil; if([SoundStream shouldUseAudioSessionNotifications]) { [[NSNotificationCenter defaultCenter] removeObserver:self name:AVAudioSessionInterruptionNotification diff --git a/addons/ofxiOS/src/sound/ofxiOSSoundStreamDelegate.mm b/addons/ofxiOS/src/sound/ofxiOSSoundStreamDelegate.mm index 6c89913151f..6999244474e 100644 --- a/addons/ofxiOS/src/sound/ofxiOSSoundStreamDelegate.mm +++ b/addons/ofxiOS/src/sound/ofxiOSSoundStreamDelegate.mm @@ -8,6 +8,10 @@ #include "ofLog.h" #include "ofSoundBuffer.h" +#if !__has_feature(objc_arc) +# error need ARC +#endif + @interface ofxiOSSoundStreamDelegate() { std::function inCallback; std::function outCallback; @@ -25,7 +29,7 @@ - (id)init { if(self) { inputBuffer = std::shared_ptr(new ofSoundBuffer); outputBuffer = std::shared_ptr(new ofSoundBuffer); - tickCount = 0; + tickCount = 0; } return self; } @@ -33,7 +37,6 @@ - (id)init { - (void)dealloc { inCallback = nullptr; outCallback = nullptr; - [super dealloc]; } - (id)initWithSoundInputFn:(std::function)fn { diff --git a/addons/ofxiOS/src/utils/ofxiOSCoreLocation.mm b/addons/ofxiOS/src/utils/ofxiOSCoreLocation.mm index a21043a9798..0d3ffae74c0 100644 --- a/addons/ofxiOS/src/utils/ofxiOSCoreLocation.mm +++ b/addons/ofxiOS/src/utils/ofxiOSCoreLocation.mm @@ -22,6 +22,10 @@ #include #if TARGET_OS_IOS || (TARGET_OS_IPHONE && !TARGET_OS_TV) +#if !__has_feature(objc_arc) +# error need ARC +#endif + //C++ class implementations //-------------------------------------------------------------- @@ -33,7 +37,6 @@ //-------------------------------------------------------------- ofxiOSCoreLocation::~ofxiOSCoreLocation() { - [coreLoc release]; } //-------------------------------------------------------------- @@ -188,9 +191,7 @@ - (id) init //-------------------------------------------------------------- - (void)dealloc { - [locationManager release]; - - [super dealloc]; + locationManager = nil; } //-------------------------------------------------------------- @@ -298,7 +299,7 @@ - (void)locationManager:(CLLocationManager *)manager didUpdateHeading:(CLHeading - (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error //thx apple { - NSMutableString *errorString = [[[NSMutableString alloc] init] autorelease]; + NSMutableString *errorString = [[NSMutableString alloc] init]; if ([error domain] == kCLErrorDomain) { @@ -344,4 +345,4 @@ - (void)locationManager:(CLLocationManager *)manager @end -#endif \ No newline at end of file +#endif diff --git a/addons/ofxiOS/src/utils/ofxiOSCoreMotion.mm b/addons/ofxiOS/src/utils/ofxiOSCoreMotion.mm index 571b5357b8a..94f9b48b06d 100755 --- a/addons/ofxiOS/src/utils/ofxiOSCoreMotion.mm +++ b/addons/ofxiOS/src/utils/ofxiOSCoreMotion.mm @@ -1,6 +1,9 @@ #include "ofxiOSCoreMotion.h" +#if !__has_feature(objc_arc) +# error need ARC +#endif ofxiOSCoreMotion::ofxiOSCoreMotion() { @@ -18,13 +21,11 @@ ofxiOSCoreMotion::~ofxiOSCoreMotion() { - [referenceAttitude release]; referenceAttitude = nil; [motionManager stopAccelerometerUpdates]; [motionManager stopGyroUpdates]; [motionManager stopMagnetometerUpdates]; [motionManager stopDeviceMotionUpdates]; - [motionManager release]; motionManager = nil; } @@ -121,10 +122,9 @@ if(toCurrentReferenceFrame) { CMDeviceMotion *deviceMotion = motionManager.deviceMotion; CMAttitude *attitude = deviceMotion.attitude; - referenceAttitude = [attitude retain]; + referenceAttitude = attitude; } else { if(referenceAttitude != nil) { - [referenceAttitude release]; referenceAttitude = nil; } } diff --git a/addons/ofxiOS/src/utils/ofxiOSExtras.mm b/addons/ofxiOS/src/utils/ofxiOSExtras.mm index 0d864cfebf0..218e2299482 100644 --- a/addons/ofxiOS/src/utils/ofxiOSExtras.mm +++ b/addons/ofxiOS/src/utils/ofxiOSExtras.mm @@ -33,8 +33,14 @@ #include "ofxiOSExtras.h" #include #if TARGET_OS_IOS || (TARGET_OS_IPHONE && !TARGET_OS_TV) -#include "ofxiOSAppDelegate.h" -#include "ofxiOSViewController.h" + +#if !__has_feature(objc_arc) +# error need ARC +#endif + +#import "ofxiOSAppDelegate.h" +#import "ofxiOSViewController.h" +#import "ofxiOSGLKViewController.h" #elif TARGET_OS_TV #include "ofxtvOSAppDelegate.h" #include "ofxtvOSViewController.h" @@ -534,30 +540,25 @@ string ofxiOSGetClipboardString() { /******************** ofxiOSScreenGrab *********************/ -@interface SaveDelegate : NSObject { - id delegate; -} -@property (retain, nonatomic) id delegate; +@interface SaveDelegate : NSObject +/// TODO: give protocol explicitly +@property (nonatomic, strong) id delegate; @end @implementation SaveDelegate -@synthesize delegate; // callback for UIImageWriteToSavedPhotosAlbum - (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo { ofLogVerbose("ofxiOSExtras") << "didFinishSavingWithError: save finished"; - if([delegate respondsToSelector: @selector(saveComplete)]) { - [delegate performSelector:@selector(saveComplete)]; + if([self.delegate respondsToSelector: @selector(saveComplete)]) { + [self.delegate performSelector:@selector(saveComplete)]; } - - [self release]; } -(void)dealloc { - [delegate release]; - [super dealloc]; + self.delegate = nil; } @end diff --git a/addons/ofxiOS/src/utils/ofxiOSImagePicker.h b/addons/ofxiOS/src/utils/ofxiOSImagePicker.h index c957f6896a8..7765967172b 100644 --- a/addons/ofxiOS/src/utils/ofxiOSImagePicker.h +++ b/addons/ofxiOS/src/utils/ofxiOSImagePicker.h @@ -27,7 +27,7 @@ class canLoadPixels //----------------------------------------------------------- overlay. @interface ofxiOSImagePickerOverlayView : UIView -@property (nonatomic, retain) id delegate; +@property (nonatomic, strong) id delegate; - (void)initUI; - (void)takePhoto:(id)sender; @end diff --git a/addons/ofxiOS/src/utils/ofxiOSImagePicker.mm b/addons/ofxiOS/src/utils/ofxiOSImagePicker.mm index b0e3f7680ee..1988c5cba72 100644 --- a/addons/ofxiOS/src/utils/ofxiOSImagePicker.mm +++ b/addons/ofxiOS/src/utils/ofxiOSImagePicker.mm @@ -15,6 +15,10 @@ #if TARGET_OS_IOS || (TARGET_OS_IPHONE && !TARGET_OS_TV) +#if !__has_feature(objc_arc) +# error need ARC +#endif + //C++ class implementations //-------------------------------------------------------------- @@ -32,7 +36,6 @@ //-------------------------------------------------------------- ofxiOSImagePicker::~ofxiOSImagePicker(){ close(); - [imagePicker release]; } //-------------------------------------------------------------- @@ -219,22 +222,18 @@ - (void)dealloc { _imagePicker.delegate = nil; [_imagePicker.view removeFromSuperview]; - [_imagePicker release]; + _imagePicker = nil; if(_image) { - [_image release]; _image = nil; } if(overlay) { overlay.delegate = nil; - [overlay release]; overlay = nil; } cppPixelLoader = NULL; - - [super dealloc]; } //---------------------------------------------------------------- @@ -242,14 +241,14 @@ - (void) imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo { - _image = [[self scaleAndRotateImage:image] retain]; + _image = [self scaleAndRotateImage:image]; cppPixelLoader->loadPixels(); } - (void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { - _image = [[self scaleAndRotateImage:[info objectForKey:UIImagePickerControllerOriginalImage]] retain]; + _image = [self scaleAndRotateImage:[info objectForKey:UIImagePickerControllerOriginalImage]]; cppPixelLoader->loadPixels(); } @@ -369,7 +368,6 @@ - (void) hideCameraOverlay { if(overlay) { overlay.delegate = nil; - [overlay release]; overlay = nil; } } diff --git a/addons/ofxiOS/src/utils/ofxiOSKeyboard.mm b/addons/ofxiOS/src/utils/ofxiOSKeyboard.mm index caee3efc5c4..d5cdeff9c35 100644 --- a/addons/ofxiOS/src/utils/ofxiOSKeyboard.mm +++ b/addons/ofxiOS/src/utils/ofxiOSKeyboard.mm @@ -15,6 +15,10 @@ using namespace std; +#if !__has_feature(objc_arc) +# error need ARC +#endif + //C++ class implementations //-------------------------------------------------------------- @@ -34,7 +38,6 @@ //-------------------------------------------------------------- ofxiOSKeyboard::~ofxiOSKeyboard() { - [keyboard release]; } @@ -288,8 +291,7 @@ - (void) updateOrientation //-------------------------------------------------------------- - (void)dealloc { - [_textField release]; - [super dealloc]; + _textField = nil; } //-------------------------------------------------------------- @@ -421,7 +423,7 @@ - (void) setFieldLength: (int)len //-------------------------------------------------------------- - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string { - NSMutableString *newValue = [[textField.text mutableCopy] autorelease]; + NSMutableString *newValue = [textField.text mutableCopy]; [newValue replaceCharactersInRange:range withString:string]; ofLogVerbose("ofxiOSKeyboard") << "shouldChangeCharactersInRange: " << [newValue length] << " " << fieldLength; diff --git a/addons/ofxiOS/src/utils/ofxiOSMapKitDelegate.mm b/addons/ofxiOS/src/utils/ofxiOSMapKitDelegate.mm index bcab0a62528..fdd90d3410c 100644 --- a/addons/ofxiOS/src/utils/ofxiOSMapKitDelegate.mm +++ b/addons/ofxiOS/src/utils/ofxiOSMapKitDelegate.mm @@ -32,6 +32,10 @@ #if TARGET_OS_IOS || (TARGET_OS_IPHONE && !TARGET_OS_TV) +#if !__has_feature(objc_arc) +# error need ARC +#endif + #include "ofxiOSMapKitDelegate.h" #include "ofxiOSMapKit.h" #include "ofLog.h" @@ -48,7 +52,6 @@ -(id)initWithMapKit:(ofxiOSMapKit*)mk { -(void)dealloc { ofLogVerbose("ofxiOSMapKitDelegate") << "dealloc"; - [super dealloc]; } diff --git a/addons/ofxiOS/src/video/AVFoundationVideoGrabber.mm b/addons/ofxiOS/src/video/AVFoundationVideoGrabber.mm index b225faee12c..7243bacf939 100644 --- a/addons/ofxiOS/src/video/AVFoundationVideoGrabber.mm +++ b/addons/ofxiOS/src/video/AVFoundationVideoGrabber.mm @@ -7,6 +7,10 @@ #if TARGET_OS_IOS || (TARGET_OS_IPHONE && !TARGET_OS_TV) +#if !__has_feature(objc_arc) +# error need ARC +#endif + #include "ofxiOSExtras.h" #include "ofAppRunner.h" #include "ofLog.h" @@ -109,7 +113,6 @@ - (BOOL)initCapture:(int)framerate capWidth:(int)w capHeight:(int)h{ dispatch_queue_t queue; queue = dispatch_queue_create("cameraQueue", NULL); [captureOutput setSampleBufferDelegate:self queue:queue]; - dispatch_release(queue); // Set the video output to store frame in BGRA (It is supposed to be faster) NSString* key = (NSString*)kCVPixelBufferPixelFormatTypeKey; @@ -122,7 +125,7 @@ - (BOOL)initCapture:(int)framerate capWidth:(int)w capHeight:(int)h{ if(self.captureSession) { self.captureSession = nil; } - self.captureSession = [[[AVCaptureSession alloc] init] autorelease]; + self.captureSession = [[AVCaptureSession alloc] init]; [self.captureSession beginConfiguration]; @@ -330,7 +333,6 @@ - (void)dealloc { if(captureOutput.sampleBufferDelegate != nil) { [captureOutput setSampleBufferDelegate:nil queue:NULL]; } - [captureOutput release]; captureOutput = nil; } @@ -346,7 +348,6 @@ - (void)dealloc { CGImageRelease(currentFrame); currentFrame = nil; } - [super dealloc]; } - (void)eraseGrabberPtr { @@ -376,7 +377,6 @@ - (void)eraseGrabberPtr { // Stop and release the the iOSVideoGrabber [grabber stopCapture]; [grabber eraseGrabberPtr]; - [grabber release]; grabber = nil; } clear(); diff --git a/addons/ofxiOS/src/video/AVFoundationVideoPlayer.h b/addons/ofxiOS/src/video/AVFoundationVideoPlayer.h index f2046d669e3..e2175ec8ae6 100644 --- a/addons/ofxiOS/src/video/AVFoundationVideoPlayer.h +++ b/addons/ofxiOS/src/video/AVFoundationVideoPlayer.h @@ -35,18 +35,16 @@ @end //---------------------------------------------------------- video player. -@interface AVFoundationVideoPlayer : NSObject { - id delegate; -} - -@property (nonatomic, assign) id delegate; -@property (nonatomic, retain) UIView * playerView; -@property (nonatomic, retain) AVPlayer * player; -@property (nonatomic, retain) AVPlayerItem * playerItem; -@property (nonatomic, retain) AVAsset * asset; -@property (nonatomic, retain) AVAssetReader * assetReader; -@property (nonatomic, retain) AVAssetReaderTrackOutput * assetReaderVideoTrackOutput; -@property (nonatomic, retain) AVAssetReaderTrackOutput * assetReaderAudioTrackOutput; +@interface AVFoundationVideoPlayer : NSObject + +@property (nonatomic, weak) id delegate; +@property (nonatomic, strong) UIView * playerView; +@property (nonatomic, strong) AVPlayer * player; +@property (nonatomic, strong) AVPlayerItem * playerItem; +@property (nonatomic, strong) AVAsset * asset; +@property (nonatomic, strong) AVAssetReader * assetReader; +@property (nonatomic, strong) AVAssetReaderTrackOutput * assetReaderVideoTrackOutput; +@property (nonatomic, strong) AVAssetReaderTrackOutput * assetReaderAudioTrackOutput; - (BOOL)loadWithFile:(NSString*)file; - (BOOL)loadWithPath:(NSString*)path; diff --git a/addons/ofxiOS/src/video/AVFoundationVideoPlayer.m b/addons/ofxiOS/src/video/AVFoundationVideoPlayer.m index 44d1e755cb7..740abc78cff 100644 --- a/addons/ofxiOS/src/video/AVFoundationVideoPlayer.m +++ b/addons/ofxiOS/src/video/AVFoundationVideoPlayer.m @@ -9,6 +9,10 @@ #define IS_OS_6_OR_LATER ([[[UIDevice currentDevice] systemVersion] floatValue] >= 6.0) +#if !__has_feature(objc_arc) +# error need ARC +#endif + /* Asset keys */ NSString * const kTracksKey = @"tracks"; NSString * const kPlayableKey = @"playable"; @@ -39,7 +43,6 @@ - (void)setPlayer:(AVPlayer*)player { - (void)dealloc { self.player = nil; - [super dealloc]; } @end @@ -97,10 +100,10 @@ - (id)init { * initialise video player view to full screen by default. * later the view frame can be changed if need be. */ - self.playerView = [[[AVFoundationVideoPlayerView alloc] initWithFrame:[UIScreen mainScreen].bounds] autorelease]; + self.playerView = [[AVFoundationVideoPlayerView alloc] initWithFrame:[UIScreen mainScreen].bounds]; self.playerView.backgroundColor = [UIColor blackColor]; - self.player = [[[AVPlayer alloc] init] autorelease]; + self.player = [[AVPlayer alloc] init]; [(AVFoundationVideoPlayerView *)self.playerView setPlayer:_player]; [_player addObserver:self @@ -162,7 +165,6 @@ - (void)dealloc { [_player removeObserver:self forKeyPath:kRateKey]; self.player = nil; - [_player release]; [self.assetReader cancelReading]; self.assetReader = nil; @@ -179,8 +181,6 @@ - (void)dealloc { CFRelease(audioSampleBuffer); audioSampleBuffer = nil; } - - [super dealloc]; } //---------------------------------------------------------- position / size. @@ -306,7 +306,7 @@ - (BOOL)createAssetReaderWithTimeRange:(CMTimeRange)timeRange { self.assetReader.timeRange = timeRange; //------------------------------------------------------------ add video output. - NSMutableDictionary * videoOutputSettings = [[[NSMutableDictionary alloc] init] autorelease]; + NSMutableDictionary * videoOutputSettings = [[NSMutableDictionary alloc] init]; [videoOutputSettings setObject:[NSNumber numberWithInt:kCVPixelFormatType_32BGRA] forKey:(NSString*)kCVPixelBufferPixelFormatTypeKey]; @@ -635,17 +635,17 @@ - (void)addTimeObserverToPlayer { double interval = 1.0 / (double)timeObserverFps; - timeObserver = [[_player addPeriodicTimeObserverForInterval:CMTimeMakeWithSeconds(interval, NSEC_PER_SEC) - queue:dispatch_get_main_queue() usingBlock: + __block typeof(self) weak_self = self; + timeObserver = [_player addPeriodicTimeObserverForInterval:CMTimeMakeWithSeconds(interval, NSEC_PER_SEC) + queue:dispatch_get_main_queue() usingBlock: ^(CMTime time) { - [self update]; - }] retain]; + [weak_self update]; + }]; } - (void)removeTimeObserverFromPlayer { if(timeObserver) { [_player removeTimeObserver:timeObserver]; - [timeObserver release]; timeObserver = nil; } } diff --git a/addons/ofxiOS/src/video/ofxiOSVideoPlayer.mm b/addons/ofxiOS/src/video/ofxiOSVideoPlayer.mm index 9d62660829e..59e1412ec3d 100644 --- a/addons/ofxiOS/src/video/ofxiOSVideoPlayer.mm +++ b/addons/ofxiOS/src/video/ofxiOSVideoPlayer.mm @@ -7,6 +7,10 @@ using namespace std; +#if !__has_feature(objc_arc) +# error need ARC +#endif + CVOpenGLESTextureCacheRef _videoTextureCache = NULL; CVOpenGLESTextureRef _videoTextureRef = NULL; @@ -41,12 +45,12 @@ bool ofxiOSVideoPlayer::load(string name) { if(!videoPlayer) { - videoPlayer = [[AVFoundationVideoPlayer alloc] init]; - [(AVFoundationVideoPlayer *)videoPlayer setWillBeUpdatedExternally:YES]; + videoPlayer = (__bridge void *)[[AVFoundationVideoPlayer alloc] init]; + [(__bridge AVFoundationVideoPlayer *)videoPlayer setWillBeUpdatedExternally:YES]; } NSString * videoPath = [NSString stringWithUTF8String:ofToDataPath(name).c_str()]; - [(AVFoundationVideoPlayer*)videoPlayer loadWithPath:videoPath]; + [(__bridge AVFoundationVideoPlayer*)videoPlayer loadWithPath:videoPath]; bResetPixels = true; bUpdatePixels = true; @@ -84,8 +88,7 @@ videoTexture.clear(); - ((AVFoundationVideoPlayer *)videoPlayer).delegate = nil; - [(AVFoundationVideoPlayer *)videoPlayer release]; + ((__bridge AVFoundationVideoPlayer *)videoPlayer).delegate = nil; if(bTextureCacheSupported == true) { killTextureCache(); @@ -135,8 +138,8 @@ return; } - [(AVFoundationVideoPlayer *)videoPlayer update]; - bFrameNew = [(AVFoundationVideoPlayer *)videoPlayer isNewFrame]; // check for new frame staright after the call to update. + [(__bridge AVFoundationVideoPlayer *)videoPlayer update]; + bFrameNew = [(__bridge AVFoundationVideoPlayer *)videoPlayer isNewFrame]; // check for new frame staright after the call to update. if(bFrameNew) { /** @@ -156,7 +159,7 @@ ofLogWarning("ofxiOSVideoPlayer::play()") << "video not loaded"; } - [(AVFoundationVideoPlayer *)videoPlayer play]; + [(__bridge AVFoundationVideoPlayer *)videoPlayer play]; } //---------------------------------------- @@ -165,8 +168,8 @@ return; } - [(AVFoundationVideoPlayer *)videoPlayer pause]; - [(AVFoundationVideoPlayer *)videoPlayer setPosition:0]; + [(__bridge AVFoundationVideoPlayer *)videoPlayer pause]; + [(__bridge AVFoundationVideoPlayer *)videoPlayer setPosition:0]; } //---------------------------------------- @@ -195,7 +198,7 @@ bResetPixels = false; } - CVImageBufferRef imageBuffer = [(AVFoundationVideoPlayer *)videoPlayer getCurrentFrame]; + CVImageBufferRef imageBuffer = [(__bridge AVFoundationVideoPlayer *)videoPlayer getCurrentFrame]; CVPixelBufferLockBaseAddress(imageBuffer, kCVPixelBufferLock_ReadOnly); @@ -288,10 +291,10 @@ int maxTextureSize = 0; glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxTextureSize); - if([(AVFoundationVideoPlayer *)videoPlayer getWidth] > maxTextureSize || - [(AVFoundationVideoPlayer *)videoPlayer getHeight] > maxTextureSize) { + if([(__bridge AVFoundationVideoPlayer *)videoPlayer getWidth] > maxTextureSize || + [(__bridge AVFoundationVideoPlayer *)videoPlayer getHeight] > maxTextureSize) { ofLogWarning("ofxiOSVideoPlayer::getTexturePtr()") - << [(AVFoundationVideoPlayer *)videoPlayer getWidth] << "x" << [(AVFoundationVideoPlayer *)videoPlayer getHeight] + << [(__bridge AVFoundationVideoPlayer *)videoPlayer getWidth] << "x" << [(__bridge AVFoundationVideoPlayer *)videoPlayer getHeight] << " video image is bigger then max supported texture size " << maxTextureSize; return NULL; } @@ -307,7 +310,7 @@ //---------------------------------------- texture cache void ofxiOSVideoPlayer::initTextureCache() { - CVImageBufferRef imageBuffer = [(AVFoundationVideoPlayer *)videoPlayer getCurrentFrame]; + CVImageBufferRef imageBuffer = [(__bridge AVFoundationVideoPlayer *)videoPlayer getCurrentFrame]; if(imageBuffer == nil) { return; } @@ -329,8 +332,8 @@ * so... we can use ofTexture::setUseExternalTextureID() to get around this. */ - int videoTextureW = [(AVFoundationVideoPlayer *)videoPlayer getWidth]; - int videoTextureH = [(AVFoundationVideoPlayer *)videoPlayer getHeight]; + int videoTextureW = [(__bridge AVFoundationVideoPlayer *)videoPlayer getWidth]; + int videoTextureH = [(__bridge AVFoundationVideoPlayer *)videoPlayer getHeight]; videoTexture.allocate(videoTextureW, videoTextureH, GL_RGBA); ofTextureData & texData = videoTexture.getTextureData(); @@ -397,7 +400,7 @@ return 0; } - return [((AVFoundationVideoPlayer *)videoPlayer) getWidth]; + return [((__bridge AVFoundationVideoPlayer *)videoPlayer) getWidth]; } //---------------------------------------- @@ -406,7 +409,7 @@ return 0; } - return [((AVFoundationVideoPlayer *)videoPlayer) getHeight]; + return [((__bridge AVFoundationVideoPlayer *)videoPlayer) getHeight]; } //---------------------------------------- @@ -415,7 +418,7 @@ return false; } - return ![((AVFoundationVideoPlayer *)videoPlayer) isPlaying]; + return ![((__bridge AVFoundationVideoPlayer *)videoPlayer) isPlaying]; } //---------------------------------------- @@ -424,7 +427,7 @@ return false; } - return [((AVFoundationVideoPlayer *)videoPlayer) isReady]; + return [((__bridge AVFoundationVideoPlayer *)videoPlayer) isReady]; } //---------------------------------------- @@ -433,7 +436,7 @@ return false; } - return [((AVFoundationVideoPlayer *)videoPlayer) isPlaying]; + return [((__bridge AVFoundationVideoPlayer *)videoPlayer) isPlaying]; } //---------------------------------------- @@ -442,7 +445,7 @@ return 0; } - return [((AVFoundationVideoPlayer *)videoPlayer) getPosition]; + return [((__bridge AVFoundationVideoPlayer *)videoPlayer) getPosition]; } //---------------------------------------- @@ -451,7 +454,7 @@ return 0; } - return [((AVFoundationVideoPlayer *)videoPlayer) getSpeed]; + return [((__bridge AVFoundationVideoPlayer *)videoPlayer) getSpeed]; } //---------------------------------------- @@ -460,7 +463,7 @@ return 0; } - return [((AVFoundationVideoPlayer *)videoPlayer) getDurationInSec]; + return [((__bridge AVFoundationVideoPlayer *)videoPlayer) getDurationInSec]; } //---------------------------------------- @@ -469,7 +472,7 @@ return false; } - return [((AVFoundationVideoPlayer *)videoPlayer) isFinished]; + return [((__bridge AVFoundationVideoPlayer *)videoPlayer) isFinished]; } //---------------------------------------- @@ -479,9 +482,9 @@ } if(bPause) { - [((AVFoundationVideoPlayer *)videoPlayer) pause]; + [((__bridge AVFoundationVideoPlayer *)videoPlayer) pause]; } else { - [((AVFoundationVideoPlayer *)videoPlayer) play]; + [((__bridge AVFoundationVideoPlayer *)videoPlayer) play]; } } @@ -491,7 +494,7 @@ return; } - [((AVFoundationVideoPlayer *)videoPlayer) setPosition:pct]; + [((__bridge AVFoundationVideoPlayer *)videoPlayer) setPosition:pct]; } //---------------------------------------- @@ -503,7 +506,7 @@ ofLogWarning("ofxiOSVideoPlayer::setVolume()") << "expected range is 0-1, limiting requested volume " << volume << " to 1.0"; volume = 1.0f; } - [((AVFoundationVideoPlayer *)videoPlayer) setVolume:volume]; + [((__bridge AVFoundationVideoPlayer *)videoPlayer) setVolume:volume]; } //---------------------------------------- @@ -517,7 +520,7 @@ (state == OF_LOOP_PALINDROME)) { bLoop = true; } - [((AVFoundationVideoPlayer *)videoPlayer) setLoop:bLoop]; + [((__bridge AVFoundationVideoPlayer *)videoPlayer) setLoop:bLoop]; } //---------------------------------------- @@ -526,7 +529,7 @@ return; } - [((AVFoundationVideoPlayer *)videoPlayer) setSpeed:speed]; + [((__bridge AVFoundationVideoPlayer *)videoPlayer) setSpeed:speed]; } //---------------------------------------- @@ -535,7 +538,7 @@ return; } - [((AVFoundationVideoPlayer *)videoPlayer) setFrame:frame]; + [((__bridge AVFoundationVideoPlayer *)videoPlayer) setFrame:frame]; } //---------------------------------------- @@ -543,7 +546,7 @@ if(videoPlayer == NULL){ return 0; } - return [((AVFoundationVideoPlayer *)videoPlayer) getCurrentFrameNum]; + return [((__bridge AVFoundationVideoPlayer *)videoPlayer) getCurrentFrameNum]; } //---------------------------------------- @@ -551,7 +554,7 @@ if(videoPlayer == NULL){ return 0; } - return [((AVFoundationVideoPlayer *)videoPlayer) getDurationInFrames]; + return [((__bridge AVFoundationVideoPlayer *)videoPlayer) getDurationInFrames]; } //---------------------------------------- @@ -560,7 +563,7 @@ return OF_LOOP_NONE; } - bool bLoop = [((AVFoundationVideoPlayer *)videoPlayer) getLoop]; + bool bLoop = [((__bridge AVFoundationVideoPlayer *)videoPlayer) getLoop]; if(bLoop) { return OF_LOOP_NORMAL; } @@ -573,7 +576,7 @@ return; } - [((AVFoundationVideoPlayer *)videoPlayer) setPosition:0]; + [((__bridge AVFoundationVideoPlayer *)videoPlayer) setPosition:0]; } //---------------------------------------- From 3c529f4d505f97d4638cab0c8ad92ea37cd57e96 Mon Sep 17 00:00:00 2001 From: 2bit Date: Mon, 24 Jan 2022 00:58:43 +0900 Subject: [PATCH 11/32] update to ARC, change: hold delegate because MKMapView doesn't hold it. --- addons/ofxiOS/src/utils/ofxiOSMapKit.h | 3 ++- addons/ofxiOS/src/utils/ofxiOSMapKit.mm | 9 +++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/addons/ofxiOS/src/utils/ofxiOSMapKit.h b/addons/ofxiOS/src/utils/ofxiOSMapKit.h index 63ae6e33cdd..4500d10f603 100644 --- a/addons/ofxiOS/src/utils/ofxiOSMapKit.h +++ b/addons/ofxiOS/src/utils/ofxiOSMapKit.h @@ -36,6 +36,7 @@ #import #include "ofConstants.h" #include "ofxiOSMapKitListener.h" +#import "ofxiOSMapKitDelegate.h" #include "glm/vec2.hpp" #include "ofRectangle.h" #include @@ -140,7 +141,7 @@ class ofxiOSMapKit : public ofxiOSMapKitListener { MKMapView *getMKMapView(); protected: - + ofxiOSMapKitDelegate *mapKitDelegate; MKMapView *mapView; std::list listeners; diff --git a/addons/ofxiOS/src/utils/ofxiOSMapKit.mm b/addons/ofxiOS/src/utils/ofxiOSMapKit.mm index cd249662df0..e05d793711e 100644 --- a/addons/ofxiOS/src/utils/ofxiOSMapKit.mm +++ b/addons/ofxiOS/src/utils/ofxiOSMapKit.mm @@ -33,6 +33,10 @@ #if TARGET_OS_IOS || (TARGET_OS_IPHONE && !TARGET_OS_TV) +#if !__has_feature(objc_arc) +# error need ARC +#endif + #include "ofxiOSMapKitDelegate.h" #include "ofxiOSExtras.h" #include "ofAppRunner.h" @@ -40,6 +44,7 @@ #include "glm/common.hpp" ofxiOSMapKit::ofxiOSMapKit() { + mapKitDelegate = nil; mapView = nil; } @@ -63,7 +68,6 @@ ofLogVerbose("ofxiOSMapKit") << "close(): releasing MKMapView"; mapView.delegate = nil; [mapView removeFromSuperview]; - [mapView release]; mapView = nil; } } @@ -221,7 +225,8 @@ if(isOpen()) { ofLogVerbose("ofxiOSMapKit") << "addListener(): adding ofxiOSMapKitDelegate"; if(mapView.delegate == nil) { - mapView.delegate = [[ofxiOSMapKitDelegate alloc] initWithMapKit:this]; + mapKitDelegate = [[ofxiOSMapKitDelegate alloc] initWithMapKit:this]; + mapView.delegate = mapKitDelegate; } listeners.push_back(o); } From 9bff9276c7f6da787831b49ec635cf88254fd733 Mon Sep 17 00:00:00 2001 From: 2bit Date: Mon, 24 Jan 2022 01:00:33 +0900 Subject: [PATCH 12/32] update to ARC (simple updates) --- addons/ofxiOS/src/sound/ofxiOSSoundPlayer.mm | 47 +++++++++++--------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/addons/ofxiOS/src/sound/ofxiOSSoundPlayer.mm b/addons/ofxiOS/src/sound/ofxiOSSoundPlayer.mm index 2c1a0ad5ef7..2c3ee85daee 100644 --- a/addons/ofxiOS/src/sound/ofxiOSSoundPlayer.mm +++ b/addons/ofxiOS/src/sound/ofxiOSSoundPlayer.mm @@ -9,6 +9,10 @@ #include "ofLog.h" #import "AVSoundPlayer.h" +#if !__has_feature(objc_arc) +# error need ARC +#endif + using namespace std; ofxiOSSoundPlayer::ofxiOSSoundPlayer() { @@ -25,16 +29,15 @@ } string filePath = ofToDataPath(fileName); - soundPlayer = [[AVSoundPlayer alloc] init]; - BOOL bOk = [(AVSoundPlayer *)soundPlayer loadWithPath:[NSString stringWithUTF8String:filePath.c_str()]]; + soundPlayer = (__bridge void *)[[AVSoundPlayer alloc] init]; + BOOL bOk = [(__bridge AVSoundPlayer *)soundPlayer loadWithPath:[NSString stringWithUTF8String:filePath.c_str()]]; return bOk; } void ofxiOSSoundPlayer::unload() { if(soundPlayer != NULL) { - [(AVSoundPlayer *)soundPlayer unloadSound]; - [(AVSoundPlayer *)soundPlayer release]; + [(__bridge AVSoundPlayer *)soundPlayer unloadSound]; soundPlayer = NULL; } } @@ -43,35 +46,35 @@ if(soundPlayer == NULL) { return; } - [(AVSoundPlayer *)soundPlayer play]; + [(__bridge AVSoundPlayer *)soundPlayer play]; } void ofxiOSSoundPlayer::stop() { if(soundPlayer == NULL) { return; } - [(AVSoundPlayer *)soundPlayer stop]; + [(__bridge AVSoundPlayer *)soundPlayer stop]; } void ofxiOSSoundPlayer::setVolume(float value) { if(soundPlayer == NULL) { return; } - [(AVSoundPlayer *)soundPlayer volume:value]; + [(__bridge AVSoundPlayer *)soundPlayer volume:value]; } void ofxiOSSoundPlayer::setPan(float value) { if(soundPlayer == NULL) { return; } - [(AVSoundPlayer *)soundPlayer pan:value]; + [(__bridge AVSoundPlayer *)soundPlayer pan:value]; } void ofxiOSSoundPlayer::setSpeed(float value) { if(soundPlayer == NULL) { return; } - [(AVSoundPlayer *)soundPlayer speed:value]; + [(__bridge AVSoundPlayer *)soundPlayer speed:value]; } void ofxiOSSoundPlayer::setPaused(bool bPause) { @@ -79,9 +82,9 @@ return; } if(bPause) { - [(AVSoundPlayer *)soundPlayer pause]; + [(__bridge AVSoundPlayer *)soundPlayer pause]; } else { - [(AVSoundPlayer *)soundPlayer play]; + [(__bridge AVSoundPlayer *)soundPlayer play]; } } @@ -89,7 +92,7 @@ if(soundPlayer == NULL) { return; } - [(AVSoundPlayer *)soundPlayer loop:bLoop]; + [(__bridge AVSoundPlayer *)soundPlayer loop:bLoop]; } void ofxiOSSoundPlayer::setMultiPlay(bool bMultiPlay) { @@ -97,70 +100,70 @@ if(soundPlayer == NULL) { return; } - [(AVSoundPlayer *)soundPlayer multiPlay:bMultiPlay]; + [(__bridge AVSoundPlayer *)soundPlayer multiPlay:bMultiPlay]; } void ofxiOSSoundPlayer::setPosition(float position) { if(soundPlayer == NULL) { return; } - [(AVSoundPlayer *)soundPlayer position:position]; + [(__bridge AVSoundPlayer *)soundPlayer position:position]; } void ofxiOSSoundPlayer::setPositionMS(int positionMS) { if(soundPlayer == NULL) { return; } - [(AVSoundPlayer *)soundPlayer positionMs:positionMS]; + [(__bridge AVSoundPlayer *)soundPlayer positionMs:positionMS]; } float ofxiOSSoundPlayer::getPosition() const{ if(soundPlayer == NULL) { return 0; } - return [(AVSoundPlayer *)soundPlayer position]; + return [(__bridge AVSoundPlayer *)soundPlayer position]; } int ofxiOSSoundPlayer::getPositionMS() const { if(soundPlayer == NULL) { return 0; } - return [(AVSoundPlayer *)soundPlayer positionMs]; + return [(__bridge AVSoundPlayer *)soundPlayer positionMs]; } bool ofxiOSSoundPlayer::isPlaying() const{ if(soundPlayer == NULL) { return false; } - return [(AVSoundPlayer *)soundPlayer isPlaying]; + return [(__bridge AVSoundPlayer *)soundPlayer isPlaying]; } float ofxiOSSoundPlayer::getSpeed() const{ if(soundPlayer == NULL) { return 0; } - return [(AVSoundPlayer *)soundPlayer speed]; + return [(__bridge AVSoundPlayer *)soundPlayer speed]; } float ofxiOSSoundPlayer::getPan() const{ if(soundPlayer == NULL) { return 0; } - return [(AVSoundPlayer *)soundPlayer pan]; + return [(__bridge AVSoundPlayer *)soundPlayer pan]; } bool ofxiOSSoundPlayer::isLoaded() const{ if(soundPlayer == NULL) { return false; } - return [(AVSoundPlayer *)soundPlayer isLoaded]; + return [(__bridge AVSoundPlayer *)soundPlayer isLoaded]; } float ofxiOSSoundPlayer::getVolume() const{ if(soundPlayer == NULL) { return false; } - return [(AVSoundPlayer *)soundPlayer volume]; + return [(__bridge AVSoundPlayer *)soundPlayer volume]; } void * ofxiOSSoundPlayer::getAVSoundPlayer() { From bc6f39ad9224d0cdae216a84ad567a7325db589b Mon Sep 17 00:00:00 2001 From: 2bit Date: Mon, 24 Jan 2022 01:01:31 +0900 Subject: [PATCH 13/32] update to ARC fixed bugs about casting (SoundOutputStream *)soundInputStream).delegate --- addons/ofxiOS/src/sound/ofxiOSSoundStream.mm | 40 ++++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/addons/ofxiOS/src/sound/ofxiOSSoundStream.mm b/addons/ofxiOS/src/sound/ofxiOSSoundStream.mm index 9b644dd95e7..0b8cdec4f69 100644 --- a/addons/ofxiOS/src/sound/ofxiOSSoundStream.mm +++ b/addons/ofxiOS/src/sound/ofxiOSSoundStream.mm @@ -15,6 +15,10 @@ #import "SoundOutputStream.h" #import +#if !__has_feature(objc_arc) +# error need ARC +#endif + using namespace std; //------------------------------------------------------------------------------ @@ -47,13 +51,13 @@ //------------------------------------------------------------------------------ void ofxiOSSoundStream::setInput(ofBaseSoundInput * soundInput) { settings.setInListener(soundInput); - [(ofxiOSSoundStreamDelegate *)[(id)soundInputStream delegate] setInput: settings.inCallback]; + [(ofxiOSSoundStreamDelegate *)[(__bridge id)soundInputStream delegate] setInput: settings.inCallback]; } //------------------------------------------------------------------------------ void ofxiOSSoundStream::setOutput(ofBaseSoundOutput * soundOutput) { settings.setOutListener(soundOutput); - [(ofxiOSSoundStreamDelegate *)[(id)soundOutputStream delegate] setOutput: settings.outCallback]; + [(ofxiOSSoundStreamDelegate *)[(__bridge id)soundOutputStream delegate] setOutput: settings.outCallback]; } //------------------------------------------------------------------------------ @@ -63,21 +67,21 @@ this->settings = settings; if(settings.numInputChannels > 0) { - soundInputStream = [[SoundInputStream alloc] initWithNumOfChannels:settings.numInputChannels + soundInputStream = (__bridge void *)[[SoundInputStream alloc] initWithNumOfChannels:settings.numInputChannels withSampleRate:settings.sampleRate withBufferSize:settings.bufferSize]; ofxiOSSoundStreamDelegate * delegate = [[ofxiOSSoundStreamDelegate alloc] initWithSoundInputFn:settings.inCallback]; - ((SoundInputStream *)soundInputStream).delegate = delegate; - [(SoundInputStream *)soundInputStream start]; + ((__bridge SoundInputStream *)soundInputStream).delegate = delegate; + [(__bridge SoundInputStream *)soundInputStream start]; } if(settings.numOutputChannels > 0) { - soundOutputStream = [[SoundOutputStream alloc] initWithNumOfChannels:settings.numOutputChannels + soundOutputStream = (__bridge void *)[[SoundOutputStream alloc] initWithNumOfChannels:settings.numOutputChannels withSampleRate:settings.sampleRate withBufferSize:settings.bufferSize]; ofxiOSSoundStreamDelegate * delegate = [[ofxiOSSoundStreamDelegate alloc] initWithSoundOutputFn:settings.outCallback]; - ((SoundInputStream *)soundOutputStream).delegate = delegate; - [(SoundInputStream *)soundOutputStream start]; + ((__bridge SoundInputStream *)soundOutputStream).delegate = delegate; + [(__bridge SoundInputStream *)soundOutputStream start]; } bool bOk = (soundInputStream != NULL) || (soundOutputStream != NULL); @@ -87,40 +91,36 @@ //------------------------------------------------------------------------------ void ofxiOSSoundStream::start(){ if(soundInputStream != NULL) { - [(SoundInputStream *)soundInputStream start]; + [(__bridge SoundInputStream *)soundInputStream start]; } if(soundOutputStream != NULL) { - [(SoundOutputStream *)soundOutputStream start]; + [(__bridge SoundOutputStream *)soundOutputStream start]; } } //------------------------------------------------------------------------------ void ofxiOSSoundStream::stop(){ if(soundInputStream != NULL) { - [(SoundInputStream *)soundInputStream stop]; + [(__bridge SoundInputStream *)soundInputStream stop]; } if(soundOutputStream != NULL) { - [(SoundOutputStream *)soundOutputStream stop]; + [(__bridge SoundOutputStream *)soundOutputStream stop]; } } //------------------------------------------------------------------------------ void ofxiOSSoundStream::close(){ if(soundInputStream != NULL) { - [((SoundInputStream *)soundInputStream).delegate release]; - [(SoundInputStream *)soundInputStream setDelegate:nil]; - [(SoundInputStream *)soundInputStream stop]; - [(SoundInputStream *)soundInputStream release]; + [(__bridge SoundInputStream *)soundInputStream setDelegate:nil]; + [(__bridge SoundInputStream *)soundInputStream stop]; soundInputStream = NULL; } if(soundOutputStream != NULL) { - [((SoundOutputStream *)soundInputStream).delegate release]; - [(SoundOutputStream *)soundInputStream setDelegate:nil]; - [(SoundOutputStream *)soundOutputStream stop]; - [(SoundOutputStream *)soundOutputStream release]; + [(__bridge SoundOutputStream *)soundOutputStream setDelegate:nil]; + [(__bridge SoundOutputStream *)soundOutputStream stop]; soundOutputStream = NULL; } From 020ecd4f7e3783503b5a8d3dbbb17af816e8231e Mon Sep 17 00:00:00 2001 From: 2bit Date: Mon, 24 Jan 2022 01:38:02 +0900 Subject: [PATCH 14/32] update to ARC (tvOS) --- addons/ofxiOS/src/tvOS/ofxtvOSAppDelegate.h | 4 ++-- addons/ofxiOS/src/tvOS/ofxtvOSAppDelegate.mm | 12 ++++++++---- addons/ofxiOS/src/tvOS/ofxtvOSGLKViewController.mm | 10 ++++++---- addons/ofxiOS/src/tvOS/ofxtvOSViewController.mm | 13 +++++++------ addons/ofxiOS/src/utils/ofxiOSExtras.mm | 2 +- .../project/tvOS/CoreOF.xcconfig | 1 + 6 files changed, 25 insertions(+), 17 deletions(-) diff --git a/addons/ofxiOS/src/tvOS/ofxtvOSAppDelegate.h b/addons/ofxiOS/src/tvOS/ofxtvOSAppDelegate.h index 754ea798a99..fd19acd40f2 100644 --- a/addons/ofxiOS/src/tvOS/ofxtvOSAppDelegate.h +++ b/addons/ofxiOS/src/tvOS/ofxtvOSAppDelegate.h @@ -19,8 +19,8 @@ @interface ofxtvOSAppDelegate : NSObject { } -@property (nonatomic, retain) UIWindow * window; -@property (nonatomic, retain) UIViewController * uiViewController; +@property (nonatomic, strong) UIWindow * window; +@property (nonatomic, strong) UIViewController * uiViewController; - (BOOL)application:(UIApplication*)application handleOpenURL:(NSURL*)url; diff --git a/addons/ofxiOS/src/tvOS/ofxtvOSAppDelegate.mm b/addons/ofxiOS/src/tvOS/ofxtvOSAppDelegate.mm index bf6faef4b30..10d6e273771 100644 --- a/addons/ofxiOS/src/tvOS/ofxtvOSAppDelegate.mm +++ b/addons/ofxiOS/src/tvOS/ofxtvOSAppDelegate.mm @@ -5,9 +5,14 @@ // Created by Daniel Rosser on 26/10/2015. // +#if !__has_feature(objc_arc) +# error need ARC +#endif + #include "ofxtvOSAppDelegate.h" #include "ofxtvOSViewController.h" +#include "ofxtvOSGLKViewController.h" #include "ofxiOSExtras.h" #include "ofxiOSAlerts.h" #include "ofxiOSEAGLView.h" @@ -24,12 +29,11 @@ @implementation ofxtvOSAppDelegate - (void)dealloc { self.window = nil; self.uiViewController = nil; - [super dealloc]; } - (void)applicationDidFinishLaunching:(UIApplication *)application { - self.window = [[[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]] autorelease]; + self.window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]]; [self.window makeKeyAndVisible]; // set the root application path @@ -45,11 +49,11 @@ - (void)applicationDidFinishLaunching:(UIApplication *)application { case METAL_KIT: NSLog(@"No MetalKit yet supported for openFrameworks: Falling back to GLKit"); case GL_KIT: - self.uiViewController = (UIViewController*)[[[ofxtvOSGLKViewController alloc] initWithFrame:frame app:(ofxiOSApp *)ofGetAppPtr() sharegroup:nil] autorelease]; + self.uiViewController = (UIViewController *)[[ofxtvOSGLKViewController alloc] initWithFrame:frame app:(ofxiOSApp *)ofGetAppPtr() sharegroup:nil]; break; case CORE_ANIMATION: default: - self.uiViewController = [[[ofxtvOSViewController alloc] initWithFrame:frame app:(ofxiOSApp *)ofGetAppPtr() sharegroup:nil] autorelease]; + self.uiViewController = [[ofxtvOSViewController alloc] initWithFrame:frame app:(ofxiOSApp *)ofGetAppPtr() sharegroup:nil]; break; } self.window.rootViewController = self.uiViewController; diff --git a/addons/ofxiOS/src/tvOS/ofxtvOSGLKViewController.mm b/addons/ofxiOS/src/tvOS/ofxtvOSGLKViewController.mm index a01b95a0003..246ae676667 100644 --- a/addons/ofxiOS/src/tvOS/ofxtvOSGLKViewController.mm +++ b/addons/ofxiOS/src/tvOS/ofxtvOSGLKViewController.mm @@ -3,6 +3,10 @@ // // Created by Dan Rosser on 10/3/18. +#if !__has_feature(objc_arc) +# error need ARC +#endif + #include "ofxtvOSGLKViewController.h" #include "ofxiOSGLKView.h" @@ -21,7 +25,7 @@ - (id)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app { - (id)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app sharegroup:(EAGLSharegroup *)sharegroup { if((self = [super init])) { - self.glView = [[[ofxiOSGLKView alloc] initWithFrame:frame andApp:app sharegroup:sharegroup] autorelease]; + self.glView = [[ofxiOSGLKView alloc] initWithFrame:frame andApp:app sharegroup:sharegroup]; self.glView.delegate = self; } @@ -32,8 +36,6 @@ - (void) dealloc { [self.glView removeFromSuperview]; self.glView.delegate = nil; self.glView = nil; - - [super dealloc]; } - (void)viewDidLoad { @@ -139,7 +141,7 @@ - (void)viewWillLayoutSubviews { - (void)handleTap:(UITapGestureRecognizer *)sender { if([self.view respondsToSelector:@selector(handleTap:)]) { - [self.glView handleTap:sender]; + [self.glView performSelector:@selector(handleTap:) withObject:sender]; } } diff --git a/addons/ofxiOS/src/tvOS/ofxtvOSViewController.mm b/addons/ofxiOS/src/tvOS/ofxtvOSViewController.mm index 1eced93be7a..7891ffd4299 100644 --- a/addons/ofxiOS/src/tvOS/ofxtvOSViewController.mm +++ b/addons/ofxiOS/src/tvOS/ofxtvOSViewController.mm @@ -4,6 +4,10 @@ // // Created by Daniel Rosser on 26/10/2015. +#if !__has_feature(objc_arc) +# error need ARC +#endif + #include "ofxtvOSViewController.h" #import #include "ofxiOSEAGLView.h" @@ -15,15 +19,13 @@ @interface ofxtvOSViewController() { @implementation ofxtvOSViewController -@synthesize glView; - - (id)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app { return [self initWithFrame:frame app:app sharegroup:nil]; } - (id)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app sharegroup:(EAGLSharegroup *)sharegroup { if((self = [super init])) { - self.glView = [[[ofxiOSEAGLView alloc] initWithFrame:frame andApp:app sharegroup:sharegroup] autorelease]; + self.glView = [[ofxiOSEAGLView alloc] initWithFrame:frame andApp:app sharegroup:sharegroup]; self.glView.delegate = self; } @@ -35,8 +37,6 @@ - (void) dealloc { [self.glView removeFromSuperview]; self.glView.delegate = nil; self.glView = nil; - - [super dealloc]; } - (void)viewDidLoad { @@ -101,7 +101,8 @@ - (void)viewWillLayoutSubviews { - (void)handleTap:(UITapGestureRecognizer *)sender { if([self.view respondsToSelector:@selector(handleTap:)]) { - [self.glView handleTap:sender]; + [self.glView performSelector:@selector(handleTap:) + withObject:sender]; } } diff --git a/addons/ofxiOS/src/utils/ofxiOSExtras.mm b/addons/ofxiOS/src/utils/ofxiOSExtras.mm index 218e2299482..027b53e4a87 100644 --- a/addons/ofxiOS/src/utils/ofxiOSExtras.mm +++ b/addons/ofxiOS/src/utils/ofxiOSExtras.mm @@ -193,7 +193,7 @@ ofxiOSDeviceInfo ofxiOSGetDeviceInfo(){ //-------------------------------------------------------------- ofxtvOSViewController * ofxiOSGetViewController() { - return [ofxiOSGetAppDelegate() glViewController]; + return (ofxtvOSViewController *)[ofxiOSGetAppDelegate() uiViewController]; } #endif diff --git a/libs/openFrameworksCompiled/project/tvOS/CoreOF.xcconfig b/libs/openFrameworksCompiled/project/tvOS/CoreOF.xcconfig index 6af7aef76b6..5d6093ec67f 100644 --- a/libs/openFrameworksCompiled/project/tvOS/CoreOF.xcconfig +++ b/libs/openFrameworksCompiled/project/tvOS/CoreOF.xcconfig @@ -41,3 +41,4 @@ OF_CORE_FRAMEWORKS = -framework AudioToolbox -framework Accelerate -framework AV // once all libraries are compiled for libc++ / all architectures CLANG_CXX_LIBRARY = libc++ CLANG_CXX_LANGUAGE_STANDARD = c++11 +CLANG_ENABLE_OBJC_ARC = YES From 8dd7a3a3ff1f411987c4ad5683cf9a1793c20935 Mon Sep 17 00:00:00 2001 From: 2bit Date: Mon, 24 Jan 2022 02:02:26 +0900 Subject: [PATCH 15/32] update to remove flag disable ARC on pbxproj --- .../project/tvOS/tvOS+OFLib.xcodeproj/project.pbxproj | 4 ---- 1 file changed, 4 deletions(-) diff --git a/libs/openFrameworksCompiled/project/tvOS/tvOS+OFLib.xcodeproj/project.pbxproj b/libs/openFrameworksCompiled/project/tvOS/tvOS+OFLib.xcodeproj/project.pbxproj index 9b56c85081e..1fd26c8f53e 100644 --- a/libs/openFrameworksCompiled/project/tvOS/tvOS+OFLib.xcodeproj/project.pbxproj +++ b/libs/openFrameworksCompiled/project/tvOS/tvOS+OFLib.xcodeproj/project.pbxproj @@ -459,8 +459,6 @@ libc++ CLANG_ENABLE_MODULES YES - CLANG_ENABLE_OBJC_ARC - NO CLANG_WARN_BOOL_CONVERSION YES CLANG_WARN_CONSTANT_CONVERSION @@ -550,8 +548,6 @@ libc++ CLANG_ENABLE_MODULES YES - CLANG_ENABLE_OBJC_ARC - NO CLANG_WARN_BOOL_CONVERSION YES CLANG_WARN_CONSTANT_CONVERSION From ef4befccb1ba54188780539d327688df6426f86d Mon Sep 17 00:00:00 2001 From: 2bit Date: Mon, 24 Jan 2022 02:10:40 +0900 Subject: [PATCH 16/32] fix include guard --- addons/ofxiOS/src/tvOS/ofxtvOSGLKViewController.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/ofxiOS/src/tvOS/ofxtvOSGLKViewController.h b/addons/ofxiOS/src/tvOS/ofxtvOSGLKViewController.h index 1fb0286bdef..68546d50ba1 100644 --- a/addons/ofxiOS/src/tvOS/ofxtvOSGLKViewController.h +++ b/addons/ofxiOS/src/tvOS/ofxtvOSGLKViewController.h @@ -5,8 +5,8 @@ #pragma once -#ifndef ofxtvOSViewController_h -#define ofxtvOSViewController_h +#ifndef ofxtvOSGLKViewController_h +#define ofxtvOSGLKViewController_h #import #import From 0908c4bec988bef172b205934cd9f4bff70b9313 Mon Sep 17 00:00:00 2001 From: 2bit Date: Fri, 11 Mar 2022 16:34:33 +0900 Subject: [PATCH 17/32] resolve confilict to current master --- libs/openFrameworksCompiled/project/ios/CoreOF.xcconfig | 3 ++- libs/openFrameworksCompiled/project/tvOS/CoreOF.xcconfig | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/libs/openFrameworksCompiled/project/ios/CoreOF.xcconfig b/libs/openFrameworksCompiled/project/ios/CoreOF.xcconfig index 737a6d60b9a..bb7e43171da 100644 --- a/libs/openFrameworksCompiled/project/ios/CoreOF.xcconfig +++ b/libs/openFrameworksCompiled/project/ios/CoreOF.xcconfig @@ -40,5 +40,6 @@ OF_CORE_FRAMEWORKS = -framework AudioToolbox -framework Accelerate -framework AV // once all libraries are compiled for libc++ / all architectures CLANG_CXX_LIBRARY = libc++ -CLANG_CXX_LANGUAGE_STANDARD = c++11 +CLANG_CXX_LANGUAGE_STANDARD = c++17 +IPHONEOS_DEPLOYMENT_TARGET = 13.0 CLANG_ENABLE_OBJC_ARC = YES diff --git a/libs/openFrameworksCompiled/project/tvOS/CoreOF.xcconfig b/libs/openFrameworksCompiled/project/tvOS/CoreOF.xcconfig index 5d6093ec67f..cd309394fcb 100644 --- a/libs/openFrameworksCompiled/project/tvOS/CoreOF.xcconfig +++ b/libs/openFrameworksCompiled/project/tvOS/CoreOF.xcconfig @@ -40,5 +40,6 @@ OF_CORE_FRAMEWORKS = -framework AudioToolbox -framework Accelerate -framework AV // once all libraries are compiled for libc++ / all architectures CLANG_CXX_LIBRARY = libc++ -CLANG_CXX_LANGUAGE_STANDARD = c++11 +CLANG_CXX_LANGUAGE_STANDARD = c++17 +TVOS_DEPLOYMENT_TARGET = 13.0 CLANG_ENABLE_OBJC_ARC = YES From 96f11b878c5eb6dac137a4454f2b2a0f73632feb Mon Sep 17 00:00:00 2001 From: 2bit Date: Thu, 17 Mar 2022 19:36:54 +0900 Subject: [PATCH 18/32] remove ARC feature test from implementation, add it to env conditional section of ofConstants.h --- addons/ofxiOS/src/core/ofxiOSAppDelegate.mm | 4 ---- addons/ofxiOS/src/core/ofxiOSEAGLView.mm | 4 ---- addons/ofxiOS/src/core/ofxiOSGLKView.mm | 4 ---- addons/ofxiOS/src/core/ofxiOSGLKViewController.mm | 4 ---- addons/ofxiOS/src/core/ofxiOSViewController.mm | 4 ---- addons/ofxiOS/src/gl/EAGLKView.m | 4 ---- addons/ofxiOS/src/gl/EAGLView.m | 4 ---- addons/ofxiOS/src/gl/ES1Renderer.m | 4 ---- addons/ofxiOS/src/gl/ES2Renderer.m | 4 ---- addons/ofxiOS/src/sound/AVSoundPlayer.m | 4 ---- addons/ofxiOS/src/sound/SoundInputStream.m | 4 ---- addons/ofxiOS/src/sound/SoundOutputStream.m | 4 ---- addons/ofxiOS/src/sound/SoundStream.m | 4 ---- addons/ofxiOS/src/sound/ofxiOSSoundPlayer.mm | 4 ---- addons/ofxiOS/src/sound/ofxiOSSoundStream.mm | 4 ---- addons/ofxiOS/src/sound/ofxiOSSoundStreamDelegate.mm | 4 ---- addons/ofxiOS/src/utils/ofxiOSCoreLocation.mm | 4 ---- addons/ofxiOS/src/utils/ofxiOSCoreMotion.mm | 4 ---- addons/ofxiOS/src/utils/ofxiOSExtras.mm | 4 ---- addons/ofxiOS/src/utils/ofxiOSImagePicker.mm | 4 ---- addons/ofxiOS/src/utils/ofxiOSKeyboard.mm | 4 ---- addons/ofxiOS/src/utils/ofxiOSMapKit.mm | 4 ---- addons/ofxiOS/src/utils/ofxiOSMapKitDelegate.mm | 4 ---- addons/ofxiOS/src/video/AVFoundationVideoGrabber.mm | 4 ---- addons/ofxiOS/src/video/AVFoundationVideoPlayer.m | 4 ---- addons/ofxiOS/src/video/ofxiOSVideoPlayer.mm | 4 ---- libs/openFrameworks/utils/ofConstants.h | 9 +++++++++ libs/openFrameworks/video/ofAVFoundationGrabber.mm | 4 ---- libs/openFrameworks/video/ofAVFoundationPlayer.mm | 4 ---- libs/openFrameworks/video/ofAVFoundationVideoPlayer.m | 4 ---- 30 files changed, 9 insertions(+), 116 deletions(-) diff --git a/addons/ofxiOS/src/core/ofxiOSAppDelegate.mm b/addons/ofxiOS/src/core/ofxiOSAppDelegate.mm index 5ad3976aa9b..67aab9449f4 100644 --- a/addons/ofxiOS/src/core/ofxiOSAppDelegate.mm +++ b/addons/ofxiOS/src/core/ofxiOSAppDelegate.mm @@ -33,10 +33,6 @@ #if TARGET_OS_IOS || (TARGET_OS_IPHONE && !TARGET_OS_TV) -#if !__has_feature(objc_arc) -# error need ARC -#endif - #import "ofxiOSViewController.h" #import "ofxiOSGLKViewController.h" #import "ofxiOSExternalDisplay.h" diff --git a/addons/ofxiOS/src/core/ofxiOSEAGLView.mm b/addons/ofxiOS/src/core/ofxiOSEAGLView.mm index a6891f6836b..05b7b2178f0 100644 --- a/addons/ofxiOS/src/core/ofxiOSEAGLView.mm +++ b/addons/ofxiOS/src/core/ofxiOSEAGLView.mm @@ -13,10 +13,6 @@ #include #import -#if !__has_feature(objc_arc) -# error need ARC -#endif - static ofxiOSEAGLView * _instanceRef = nil; @interface ofxiOSEAGLView() { diff --git a/addons/ofxiOS/src/core/ofxiOSGLKView.mm b/addons/ofxiOS/src/core/ofxiOSGLKView.mm index b3558de426c..4f12f9e621a 100644 --- a/addons/ofxiOS/src/core/ofxiOSGLKView.mm +++ b/addons/ofxiOS/src/core/ofxiOSGLKView.mm @@ -13,10 +13,6 @@ #include #import -#if !__has_feature(objc_arc) -# error need ARC -#endif - static ofxiOSGLKView * _instanceRef = nil; @interface ofxiOSGLKView() { diff --git a/addons/ofxiOS/src/core/ofxiOSGLKViewController.mm b/addons/ofxiOS/src/core/ofxiOSGLKViewController.mm index 10c2ef98611..5f6fd042a81 100644 --- a/addons/ofxiOS/src/core/ofxiOSGLKViewController.mm +++ b/addons/ofxiOS/src/core/ofxiOSGLKViewController.mm @@ -8,10 +8,6 @@ #include #if TARGET_OS_IOS || (TARGET_OS_IPHONE && !TARGET_OS_TV) -#if !__has_feature(objc_arc) -# error need ARC -#endif - #import "ofxiOSGLKViewController.h" #include "ofxiOSGLKView.h" diff --git a/addons/ofxiOS/src/core/ofxiOSViewController.mm b/addons/ofxiOS/src/core/ofxiOSViewController.mm index 5aa9a7b7663..b2f9264a12c 100644 --- a/addons/ofxiOS/src/core/ofxiOSViewController.mm +++ b/addons/ofxiOS/src/core/ofxiOSViewController.mm @@ -6,10 +6,6 @@ #include #if TARGET_OS_IOS || (TARGET_OS_IPHONE && !TARGET_OS_TV) -#if !__has_feature(objc_arc) -# error need ARC -#endif - #import #include "ofxiOSViewController.h" diff --git a/addons/ofxiOS/src/gl/EAGLKView.m b/addons/ofxiOS/src/gl/EAGLKView.m index 0b41694cc72..c643a224fb4 100644 --- a/addons/ofxiOS/src/gl/EAGLKView.m +++ b/addons/ofxiOS/src/gl/EAGLKView.m @@ -12,10 +12,6 @@ #import "ES1Renderer.h" #import "ES2Renderer.h" -#if !__has_feature(objc_arc) -# error need ARC -#endif - @interface EAGLKView() { BOOL bInit; } diff --git a/addons/ofxiOS/src/gl/EAGLView.m b/addons/ofxiOS/src/gl/EAGLView.m index 4047e566141..617a23bb1b2 100644 --- a/addons/ofxiOS/src/gl/EAGLView.m +++ b/addons/ofxiOS/src/gl/EAGLView.m @@ -30,10 +30,6 @@ * ***********************************************************************/ -#if !__has_feature(objc_arc) -# error need ARC -#endif - #import #include diff --git a/addons/ofxiOS/src/gl/ES1Renderer.m b/addons/ofxiOS/src/gl/ES1Renderer.m index eec70139335..01df94c4956 100644 --- a/addons/ofxiOS/src/gl/ES1Renderer.m +++ b/addons/ofxiOS/src/gl/ES1Renderer.m @@ -2,10 +2,6 @@ #import "ES1Renderer.h" -#if !__has_feature(objc_arc) -# error need ARC -#endif - @implementation ES1Renderer // Create an OpenGL ES 1.1 context diff --git a/addons/ofxiOS/src/gl/ES2Renderer.m b/addons/ofxiOS/src/gl/ES2Renderer.m index 0500c35d6be..858cbeb32d6 100644 --- a/addons/ofxiOS/src/gl/ES2Renderer.m +++ b/addons/ofxiOS/src/gl/ES2Renderer.m @@ -2,10 +2,6 @@ #import "ES2Renderer.h" -#if !__has_feature(objc_arc) -# error need ARC -#endif - @implementation ES2Renderer // Create an OpenGL ES 2.0 context diff --git a/addons/ofxiOS/src/sound/AVSoundPlayer.m b/addons/ofxiOS/src/sound/AVSoundPlayer.m index 363352ae892..c3f316d7e1f 100644 --- a/addons/ofxiOS/src/sound/AVSoundPlayer.m +++ b/addons/ofxiOS/src/sound/AVSoundPlayer.m @@ -7,10 +7,6 @@ #import "AVSoundPlayer.h" #include -#if !__has_feature(objc_arc) -# error need ARC -#endif - @interface AVSoundPlayer() { BOOL bMultiPlay; } diff --git a/addons/ofxiOS/src/sound/SoundInputStream.m b/addons/ofxiOS/src/sound/SoundInputStream.m index ea835d6d539..f9fc2b8f9ac 100644 --- a/addons/ofxiOS/src/sound/SoundInputStream.m +++ b/addons/ofxiOS/src/sound/SoundInputStream.m @@ -17,10 +17,6 @@ #import "SoundInputStream.h" #import -#if !__has_feature(objc_arc) -# error need ARC -#endif - typedef struct { AudioBufferList * bufferList; AudioUnit remoteIO; diff --git a/addons/ofxiOS/src/sound/SoundOutputStream.m b/addons/ofxiOS/src/sound/SoundOutputStream.m index 217475b433f..4f0d589b7ec 100644 --- a/addons/ofxiOS/src/sound/SoundOutputStream.m +++ b/addons/ofxiOS/src/sound/SoundOutputStream.m @@ -16,10 +16,6 @@ #import "SoundOutputStream.h" -#if !__has_feature(objc_arc) -# error need ARC -#endif - static OSStatus soundOutputStreamRenderCallback(void *inRefCon, AudioUnitRenderActionFlags *ioActionFlags, const AudioTimeStamp *inTimeStamp, diff --git a/addons/ofxiOS/src/sound/SoundStream.m b/addons/ofxiOS/src/sound/SoundStream.m index 076396d58ae..314b27421e4 100644 --- a/addons/ofxiOS/src/sound/SoundStream.m +++ b/addons/ofxiOS/src/sound/SoundStream.m @@ -8,10 +8,6 @@ #import "SoundStream.h" #import -#if !__has_feature(objc_arc) -# error need ARC -#endif - @interface SoundStream() { // } diff --git a/addons/ofxiOS/src/sound/ofxiOSSoundPlayer.mm b/addons/ofxiOS/src/sound/ofxiOSSoundPlayer.mm index 2c3ee85daee..8632fda22b1 100644 --- a/addons/ofxiOS/src/sound/ofxiOSSoundPlayer.mm +++ b/addons/ofxiOS/src/sound/ofxiOSSoundPlayer.mm @@ -9,10 +9,6 @@ #include "ofLog.h" #import "AVSoundPlayer.h" -#if !__has_feature(objc_arc) -# error need ARC -#endif - using namespace std; ofxiOSSoundPlayer::ofxiOSSoundPlayer() { diff --git a/addons/ofxiOS/src/sound/ofxiOSSoundStream.mm b/addons/ofxiOS/src/sound/ofxiOSSoundStream.mm index 48d1db749f9..ad0bec9ee74 100644 --- a/addons/ofxiOS/src/sound/ofxiOSSoundStream.mm +++ b/addons/ofxiOS/src/sound/ofxiOSSoundStream.mm @@ -15,10 +15,6 @@ #import "SoundOutputStream.h" #import -#if !__has_feature(objc_arc) -# error need ARC -#endif - using namespace std; //------------------------------------------------------------------------------ diff --git a/addons/ofxiOS/src/sound/ofxiOSSoundStreamDelegate.mm b/addons/ofxiOS/src/sound/ofxiOSSoundStreamDelegate.mm index 6999244474e..27437e548bc 100644 --- a/addons/ofxiOS/src/sound/ofxiOSSoundStreamDelegate.mm +++ b/addons/ofxiOS/src/sound/ofxiOSSoundStreamDelegate.mm @@ -8,10 +8,6 @@ #include "ofLog.h" #include "ofSoundBuffer.h" -#if !__has_feature(objc_arc) -# error need ARC -#endif - @interface ofxiOSSoundStreamDelegate() { std::function inCallback; std::function outCallback; diff --git a/addons/ofxiOS/src/utils/ofxiOSCoreLocation.mm b/addons/ofxiOS/src/utils/ofxiOSCoreLocation.mm index 0d3ffae74c0..6947d750541 100644 --- a/addons/ofxiOS/src/utils/ofxiOSCoreLocation.mm +++ b/addons/ofxiOS/src/utils/ofxiOSCoreLocation.mm @@ -22,10 +22,6 @@ #include #if TARGET_OS_IOS || (TARGET_OS_IPHONE && !TARGET_OS_TV) -#if !__has_feature(objc_arc) -# error need ARC -#endif - //C++ class implementations //-------------------------------------------------------------- diff --git a/addons/ofxiOS/src/utils/ofxiOSCoreMotion.mm b/addons/ofxiOS/src/utils/ofxiOSCoreMotion.mm index 94f9b48b06d..0980eb6c18f 100755 --- a/addons/ofxiOS/src/utils/ofxiOSCoreMotion.mm +++ b/addons/ofxiOS/src/utils/ofxiOSCoreMotion.mm @@ -1,10 +1,6 @@ #include "ofxiOSCoreMotion.h" -#if !__has_feature(objc_arc) -# error need ARC -#endif - ofxiOSCoreMotion::ofxiOSCoreMotion() { motionManager = [[CMMotionManager alloc] init]; diff --git a/addons/ofxiOS/src/utils/ofxiOSExtras.mm b/addons/ofxiOS/src/utils/ofxiOSExtras.mm index 027b53e4a87..464d180a5ba 100644 --- a/addons/ofxiOS/src/utils/ofxiOSExtras.mm +++ b/addons/ofxiOS/src/utils/ofxiOSExtras.mm @@ -34,10 +34,6 @@ #include #if TARGET_OS_IOS || (TARGET_OS_IPHONE && !TARGET_OS_TV) -#if !__has_feature(objc_arc) -# error need ARC -#endif - #import "ofxiOSAppDelegate.h" #import "ofxiOSViewController.h" #import "ofxiOSGLKViewController.h" diff --git a/addons/ofxiOS/src/utils/ofxiOSImagePicker.mm b/addons/ofxiOS/src/utils/ofxiOSImagePicker.mm index 1988c5cba72..e1c0a6861ef 100644 --- a/addons/ofxiOS/src/utils/ofxiOSImagePicker.mm +++ b/addons/ofxiOS/src/utils/ofxiOSImagePicker.mm @@ -15,10 +15,6 @@ #if TARGET_OS_IOS || (TARGET_OS_IPHONE && !TARGET_OS_TV) -#if !__has_feature(objc_arc) -# error need ARC -#endif - //C++ class implementations //-------------------------------------------------------------- diff --git a/addons/ofxiOS/src/utils/ofxiOSKeyboard.mm b/addons/ofxiOS/src/utils/ofxiOSKeyboard.mm index d5cdeff9c35..877d2c82f69 100644 --- a/addons/ofxiOS/src/utils/ofxiOSKeyboard.mm +++ b/addons/ofxiOS/src/utils/ofxiOSKeyboard.mm @@ -15,10 +15,6 @@ using namespace std; -#if !__has_feature(objc_arc) -# error need ARC -#endif - //C++ class implementations //-------------------------------------------------------------- diff --git a/addons/ofxiOS/src/utils/ofxiOSMapKit.mm b/addons/ofxiOS/src/utils/ofxiOSMapKit.mm index e05d793711e..da4c09d1e30 100644 --- a/addons/ofxiOS/src/utils/ofxiOSMapKit.mm +++ b/addons/ofxiOS/src/utils/ofxiOSMapKit.mm @@ -33,10 +33,6 @@ #if TARGET_OS_IOS || (TARGET_OS_IPHONE && !TARGET_OS_TV) -#if !__has_feature(objc_arc) -# error need ARC -#endif - #include "ofxiOSMapKitDelegate.h" #include "ofxiOSExtras.h" #include "ofAppRunner.h" diff --git a/addons/ofxiOS/src/utils/ofxiOSMapKitDelegate.mm b/addons/ofxiOS/src/utils/ofxiOSMapKitDelegate.mm index fdd90d3410c..c5ee03e43bf 100644 --- a/addons/ofxiOS/src/utils/ofxiOSMapKitDelegate.mm +++ b/addons/ofxiOS/src/utils/ofxiOSMapKitDelegate.mm @@ -32,10 +32,6 @@ #if TARGET_OS_IOS || (TARGET_OS_IPHONE && !TARGET_OS_TV) -#if !__has_feature(objc_arc) -# error need ARC -#endif - #include "ofxiOSMapKitDelegate.h" #include "ofxiOSMapKit.h" #include "ofLog.h" diff --git a/addons/ofxiOS/src/video/AVFoundationVideoGrabber.mm b/addons/ofxiOS/src/video/AVFoundationVideoGrabber.mm index 7243bacf939..b8e3a3dce39 100644 --- a/addons/ofxiOS/src/video/AVFoundationVideoGrabber.mm +++ b/addons/ofxiOS/src/video/AVFoundationVideoGrabber.mm @@ -7,10 +7,6 @@ #if TARGET_OS_IOS || (TARGET_OS_IPHONE && !TARGET_OS_TV) -#if !__has_feature(objc_arc) -# error need ARC -#endif - #include "ofxiOSExtras.h" #include "ofAppRunner.h" #include "ofLog.h" diff --git a/addons/ofxiOS/src/video/AVFoundationVideoPlayer.m b/addons/ofxiOS/src/video/AVFoundationVideoPlayer.m index 740abc78cff..d64d4d3616f 100644 --- a/addons/ofxiOS/src/video/AVFoundationVideoPlayer.m +++ b/addons/ofxiOS/src/video/AVFoundationVideoPlayer.m @@ -9,10 +9,6 @@ #define IS_OS_6_OR_LATER ([[[UIDevice currentDevice] systemVersion] floatValue] >= 6.0) -#if !__has_feature(objc_arc) -# error need ARC -#endif - /* Asset keys */ NSString * const kTracksKey = @"tracks"; NSString * const kPlayableKey = @"playable"; diff --git a/addons/ofxiOS/src/video/ofxiOSVideoPlayer.mm b/addons/ofxiOS/src/video/ofxiOSVideoPlayer.mm index 59e1412ec3d..b4698517fd6 100644 --- a/addons/ofxiOS/src/video/ofxiOSVideoPlayer.mm +++ b/addons/ofxiOS/src/video/ofxiOSVideoPlayer.mm @@ -7,10 +7,6 @@ using namespace std; -#if !__has_feature(objc_arc) -# error need ARC -#endif - CVOpenGLESTextureCacheRef _videoTextureCache = NULL; CVOpenGLESTextureRef _videoTextureRef = NULL; diff --git a/libs/openFrameworks/utils/ofConstants.h b/libs/openFrameworks/utils/ofConstants.h index 8afb8b778be..4a06d3952d0 100644 --- a/libs/openFrameworks/utils/ofConstants.h +++ b/libs/openFrameworks/utils/ofConstants.h @@ -196,6 +196,10 @@ enum ofTargetPlatform{ #if defined(__LITTLE_ENDIAN__) #define TARGET_LITTLE_ENDIAN // intel cpu #endif + + #if defined(__OBJC__) && !__has_feature(objc_arc) + #error "Please enable ARC (Automatic Reference Counting) at the project level" + #endif #endif #ifdef TARGET_LINUX @@ -246,6 +250,11 @@ enum ofTargetPlatform{ #define TARGET_LITTLE_ENDIAN // arm cpu + + #if defined(__OBJC__) && !__has_feature(objc_arc) + #error "Please enable ARC (Automatic Reference Counting) at the project level" + #endif + #endif #ifdef TARGET_ANDROID diff --git a/libs/openFrameworks/video/ofAVFoundationGrabber.mm b/libs/openFrameworks/video/ofAVFoundationGrabber.mm index 35af5e46cb8..50ad134d24a 100644 --- a/libs/openFrameworks/video/ofAVFoundationGrabber.mm +++ b/libs/openFrameworks/video/ofAVFoundationGrabber.mm @@ -9,10 +9,6 @@ #ifdef OF_VIDEO_CAPTURE_AVF -#if !__has_feature(objc_arc) -# error need ARC -#endif - #import @interface OSXVideoGrabber () diff --git a/libs/openFrameworks/video/ofAVFoundationPlayer.mm b/libs/openFrameworks/video/ofAVFoundationPlayer.mm index 29dd26b7567..9768f29caed 100644 --- a/libs/openFrameworks/video/ofAVFoundationPlayer.mm +++ b/libs/openFrameworks/video/ofAVFoundationPlayer.mm @@ -14,10 +14,6 @@ #include "ofTexture.h" #endif -#if !__has_feature(objc_arc) -# error need ARC -#endif - //-------------------------------------------------------------- ofAVFoundationPlayer::ofAVFoundationPlayer() { videoPlayer = nullptr; diff --git a/libs/openFrameworks/video/ofAVFoundationVideoPlayer.m b/libs/openFrameworks/video/ofAVFoundationVideoPlayer.m index ba78bd09302..572a929595e 100644 --- a/libs/openFrameworks/video/ofAVFoundationVideoPlayer.m +++ b/libs/openFrameworks/video/ofAVFoundationVideoPlayer.m @@ -6,10 +6,6 @@ #import "ofAVFoundationVideoPlayer.h" -#if !__has_feature(objc_arc) -# error need ARC -#endif - #define IS_OS_6_OR_LATER ([[[UIDevice currentDevice] systemVersion] floatValue] >= 6.0) From b77fd3d3aed2c0f85fed91c2cdb47f1fb4fb0955 Mon Sep 17 00:00:00 2001 From: 2bit Date: Thu, 17 Mar 2022 19:45:19 +0900 Subject: [PATCH 19/32] remove ARC feature test from tvos implementation files --- addons/ofxiOS/src/tvOS/ofxtvOSAppDelegate.mm | 4 ---- addons/ofxiOS/src/tvOS/ofxtvOSGLKViewController.mm | 4 ---- addons/ofxiOS/src/tvOS/ofxtvOSViewController.mm | 4 ---- 3 files changed, 12 deletions(-) diff --git a/addons/ofxiOS/src/tvOS/ofxtvOSAppDelegate.mm b/addons/ofxiOS/src/tvOS/ofxtvOSAppDelegate.mm index 10d6e273771..a943574a0f6 100644 --- a/addons/ofxiOS/src/tvOS/ofxtvOSAppDelegate.mm +++ b/addons/ofxiOS/src/tvOS/ofxtvOSAppDelegate.mm @@ -5,10 +5,6 @@ // Created by Daniel Rosser on 26/10/2015. // -#if !__has_feature(objc_arc) -# error need ARC -#endif - #include "ofxtvOSAppDelegate.h" #include "ofxtvOSViewController.h" diff --git a/addons/ofxiOS/src/tvOS/ofxtvOSGLKViewController.mm b/addons/ofxiOS/src/tvOS/ofxtvOSGLKViewController.mm index 246ae676667..36f060cf195 100644 --- a/addons/ofxiOS/src/tvOS/ofxtvOSGLKViewController.mm +++ b/addons/ofxiOS/src/tvOS/ofxtvOSGLKViewController.mm @@ -3,10 +3,6 @@ // // Created by Dan Rosser on 10/3/18. -#if !__has_feature(objc_arc) -# error need ARC -#endif - #include "ofxtvOSGLKViewController.h" #include "ofxiOSGLKView.h" diff --git a/addons/ofxiOS/src/tvOS/ofxtvOSViewController.mm b/addons/ofxiOS/src/tvOS/ofxtvOSViewController.mm index 7891ffd4299..d858e3c003c 100644 --- a/addons/ofxiOS/src/tvOS/ofxtvOSViewController.mm +++ b/addons/ofxiOS/src/tvOS/ofxtvOSViewController.mm @@ -4,10 +4,6 @@ // // Created by Daniel Rosser on 26/10/2015. -#if !__has_feature(objc_arc) -# error need ARC -#endif - #include "ofxtvOSViewController.h" #import #include "ofxiOSEAGLView.h" From da9a8750e880442e85b1012b445ee253b40149d5 Mon Sep 17 00:00:00 2001 From: 2bit Date: Thu, 17 Mar 2022 20:46:15 +0900 Subject: [PATCH 20/32] replace id type to instancetype on initXXX methods --- addons/ofxiOS/src/core/ofxiOSEAGLView.h | 4 ++-- addons/ofxiOS/src/core/ofxiOSEAGLView.mm | 4 ++-- addons/ofxiOS/src/core/ofxiOSGLKView.h | 10 +++++----- addons/ofxiOS/src/core/ofxiOSGLKView.mm | 4 ++-- .../ofxiOS/src/core/ofxiOSGLKViewController.h | 4 ++-- .../ofxiOS/src/core/ofxiOSGLKViewController.mm | 4 ++-- addons/ofxiOS/src/core/ofxiOSViewController.h | 4 ++-- addons/ofxiOS/src/core/ofxiOSViewController.mm | 4 ++-- addons/ofxiOS/src/gl/EAGLKView.h | 18 +++++++++--------- addons/ofxiOS/src/gl/EAGLKView.m | 18 +++++++++--------- addons/ofxiOS/src/gl/EAGLView.h | 16 ++++++++-------- addons/ofxiOS/src/gl/EAGLView.m | 16 ++++++++-------- addons/ofxiOS/src/gl/ES1Renderer.h | 10 +++++----- addons/ofxiOS/src/gl/ES1Renderer.m | 4 ++-- addons/ofxiOS/src/gl/ES2Renderer.h | 10 +++++----- addons/ofxiOS/src/gl/ES2Renderer.m | 4 ++-- addons/ofxiOS/src/sound/AVSoundPlayer.m | 2 +- addons/ofxiOS/src/sound/SoundInputStream.m | 6 +++--- addons/ofxiOS/src/sound/SoundOutputStream.m | 6 +++--- addons/ofxiOS/src/sound/SoundStream.h | 6 +++--- addons/ofxiOS/src/sound/SoundStream.m | 6 +++--- .../src/sound/ofxiOSSoundStreamDelegate.h | 6 +++--- .../src/sound/ofxiOSSoundStreamDelegate.mm | 6 +++--- .../ofxiOS/src/tvOS/ofxtvOSGLKViewController.h | 4 ++-- .../src/tvOS/ofxtvOSGLKViewController.mm | 4 ++-- addons/ofxiOS/src/tvOS/ofxtvOSViewController.h | 4 ++-- .../ofxiOS/src/tvOS/ofxtvOSViewController.mm | 4 ++-- addons/ofxiOS/src/utils/ofxiOSCoreLocation.h | 2 +- addons/ofxiOS/src/utils/ofxiOSCoreLocation.mm | 2 +- addons/ofxiOS/src/utils/ofxiOSImagePicker.h | 2 +- addons/ofxiOS/src/utils/ofxiOSImagePicker.mm | 4 ++-- addons/ofxiOS/src/utils/ofxiOSKeyboard.h | 2 +- addons/ofxiOS/src/utils/ofxiOSKeyboard.mm | 2 +- addons/ofxiOS/src/utils/ofxiOSMapKitDelegate.h | 2 +- .../ofxiOS/src/utils/ofxiOSMapKitDelegate.mm | 2 +- .../src/video/AVFoundationVideoGrabber.mm | 2 +- .../ofxiOS/src/video/AVFoundationVideoPlayer.m | 2 +- .../video/ofAVFoundationGrabber.mm | 2 +- .../video/ofAVFoundationVideoPlayer.m | 2 +- 39 files changed, 107 insertions(+), 107 deletions(-) diff --git a/addons/ofxiOS/src/core/ofxiOSEAGLView.h b/addons/ofxiOS/src/core/ofxiOSEAGLView.h index 4a86b917768..2546bc1f335 100644 --- a/addons/ofxiOS/src/core/ofxiOSEAGLView.h +++ b/addons/ofxiOS/src/core/ofxiOSEAGLView.h @@ -29,8 +29,8 @@ class ofAppiOSWindow; + (ofxiOSEAGLView *) getInstance; -- (id)initWithFrame:(CGRect)frame andApp:(ofxiOSApp *)app; -- (id)initWithFrame:(CGRect)frame andApp:(ofxiOSApp *)app sharegroup:(EAGLSharegroup *)sharegroup; +- (instancetype)initWithFrame:(CGRect)frame andApp:(ofxiOSApp *)app; +- (instancetype)initWithFrame:(CGRect)frame andApp:(ofxiOSApp *)app sharegroup:(EAGLSharegroup *)sharegroup; - (void)setup; - (void)updateDimensions; - (void)destroy; diff --git a/addons/ofxiOS/src/core/ofxiOSEAGLView.mm b/addons/ofxiOS/src/core/ofxiOSEAGLView.mm index 05b7b2178f0..60c7a677e0e 100644 --- a/addons/ofxiOS/src/core/ofxiOSEAGLView.mm +++ b/addons/ofxiOS/src/core/ofxiOSEAGLView.mm @@ -34,11 +34,11 @@ + (ofxiOSEAGLView *) getInstance { return _instanceRef; } -- (id)initWithFrame:(CGRect)frame andApp:(ofxiOSApp *)appPtr { +- (instancetype)initWithFrame:(CGRect)frame andApp:(ofxiOSApp *)appPtr { return [self initWithFrame:frame andApp:appPtr sharegroup:nil]; } -- (id)initWithFrame:(CGRect)frame andApp:(ofxiOSApp *)appPtr sharegroup:(EAGLSharegroup *)sharegroup { +- (instancetype)initWithFrame:(CGRect)frame andApp:(ofxiOSApp *)appPtr sharegroup:(EAGLSharegroup *)sharegroup { window = dynamic_pointer_cast(ofGetMainLoop()->getCurrentWindow()); diff --git a/addons/ofxiOS/src/core/ofxiOSGLKView.h b/addons/ofxiOS/src/core/ofxiOSGLKView.h index 9a2f7aa9e3d..5a930f51fc2 100644 --- a/addons/ofxiOS/src/core/ofxiOSGLKView.h +++ b/addons/ofxiOS/src/core/ofxiOSGLKView.h @@ -30,11 +30,11 @@ class ofAppiOSWindow; + (ofxiOSGLKView *) getInstance; -- (id)initWithFrame:(CGRect)frame - andApp:(ofxiOSApp *)app; -- (id)initWithFrame:(CGRect)frame - andApp:(ofxiOSApp *)app - sharegroup:(EAGLSharegroup *)sharegroup; +- (instancetype)initWithFrame:(CGRect)frame + andApp:(ofxiOSApp *)app; +- (instancetype)initWithFrame:(CGRect)frame + andApp:(ofxiOSApp *)app + sharegroup:(EAGLSharegroup *)sharegroup; - (void)setup; - (void)update; - (void)draw; diff --git a/addons/ofxiOS/src/core/ofxiOSGLKView.mm b/addons/ofxiOS/src/core/ofxiOSGLKView.mm index 4f12f9e621a..7aac2d06616 100644 --- a/addons/ofxiOS/src/core/ofxiOSGLKView.mm +++ b/addons/ofxiOS/src/core/ofxiOSGLKView.mm @@ -34,11 +34,11 @@ + (ofxiOSGLKView *) getInstance { return _instanceRef; } -- (id)initWithFrame:(CGRect)frame andApp:(ofxiOSApp *)appPtr { +- (instancetype)initWithFrame:(CGRect)frame andApp:(ofxiOSApp *)appPtr { return [self initWithFrame:frame andApp:appPtr sharegroup:nil]; } -- (id)initWithFrame:(CGRect)frame andApp:(ofxiOSApp *)appPtr sharegroup:(EAGLSharegroup *)sharegroup{ +- (instancetype)initWithFrame:(CGRect)frame andApp:(ofxiOSApp *)appPtr sharegroup:(EAGLSharegroup *)sharegroup{ window = dynamic_pointer_cast(ofGetMainLoop()->getCurrentWindow()); diff --git a/addons/ofxiOS/src/core/ofxiOSGLKViewController.h b/addons/ofxiOS/src/core/ofxiOSGLKViewController.h index 6d98381396a..6feec8efb63 100644 --- a/addons/ofxiOS/src/core/ofxiOSGLKViewController.h +++ b/addons/ofxiOS/src/core/ofxiOSGLKViewController.h @@ -23,8 +23,8 @@ class ofxiOSApp; @property (nonatomic, strong) ofxiOSGLKView * glView; -- (id)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app; -- (id)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app sharegroup:(EAGLSharegroup *)sharegroup; +- (instancetype)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app; +- (instancetype)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app sharegroup:(EAGLSharegroup *)sharegroup; - (UIInterfaceOrientation)currentInterfaceOrientation; - (void)setCurrentInterfaceOrientation:(UIInterfaceOrientation) orient; diff --git a/addons/ofxiOS/src/core/ofxiOSGLKViewController.mm b/addons/ofxiOS/src/core/ofxiOSGLKViewController.mm index 5f6fd042a81..be14fb59118 100644 --- a/addons/ofxiOS/src/core/ofxiOSGLKViewController.mm +++ b/addons/ofxiOS/src/core/ofxiOSGLKViewController.mm @@ -27,11 +27,11 @@ @implementation ofxiOSGLKViewController @synthesize glView; -- (id)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app { +- (instancetype)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app { return [self initWithFrame:frame app:app sharegroup:nil]; } -- (id)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app sharegroup:(EAGLSharegroup *)sharegroup{ +- (instancetype)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app sharegroup:(EAGLSharegroup *)sharegroup{ currentInterfaceOrientation = pendingInterfaceOrientation = UIInterfaceOrientationPortrait; if((self = [super init])) { currentInterfaceOrientation = pendingInterfaceOrientation = self.interfaceOrientation; diff --git a/addons/ofxiOS/src/core/ofxiOSViewController.h b/addons/ofxiOS/src/core/ofxiOSViewController.h index 15a67429218..dec71de8b31 100644 --- a/addons/ofxiOS/src/core/ofxiOSViewController.h +++ b/addons/ofxiOS/src/core/ofxiOSViewController.h @@ -17,8 +17,8 @@ class ofxiOSApp; @property (nonatomic, strong) ofxiOSEAGLView * glView; -- (id)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app; -- (id)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app sharegroup:(EAGLSharegroup *)sharegroup; +- (instancetype)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app; +- (instancetype)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app sharegroup:(EAGLSharegroup *)sharegroup; - (UIInterfaceOrientation)currentInterfaceOrientation; - (void)setCurrentInterfaceOrientation:(UIInterfaceOrientation) orient; diff --git a/addons/ofxiOS/src/core/ofxiOSViewController.mm b/addons/ofxiOS/src/core/ofxiOSViewController.mm index b2f9264a12c..9b1382e78ee 100644 --- a/addons/ofxiOS/src/core/ofxiOSViewController.mm +++ b/addons/ofxiOS/src/core/ofxiOSViewController.mm @@ -25,11 +25,11 @@ @interface ofxiOSViewController() { @implementation ofxiOSViewController -- (id)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app { +- (instancetype)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app { return [self initWithFrame:frame app:app sharegroup:nil]; } -- (id)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app sharegroup:(EAGLSharegroup *)sharegroup{ +- (instancetype)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app sharegroup:(EAGLSharegroup *)sharegroup{ currentInterfaceOrientation = pendingInterfaceOrientation = UIInterfaceOrientationPortrait; if((self = [super init])) { currentInterfaceOrientation = pendingInterfaceOrientation = self.interfaceOrientation; diff --git a/addons/ofxiOS/src/gl/EAGLKView.h b/addons/ofxiOS/src/gl/EAGLKView.h index 18f8cbfe191..74ac56ea118 100644 --- a/addons/ofxiOS/src/gl/EAGLKView.h +++ b/addons/ofxiOS/src/gl/EAGLKView.h @@ -37,15 +37,15 @@ @property (nonatomic, weak) id delegate; -- (id)initWithFrame:(CGRect)frame -andPreferedRenderer:(ESRendererVersion)rendererVersion - andAA:(bool)msaaEnabled - andRetina:(bool)retinaEnabled - andRetinaScale:(CGFloat)retinaScale - sharegroup:(EAGLSharegroup*)sharegroup - colorFormat:(GLKViewDrawableColorFormat)colorFormat - depthFormat:(GLKViewDrawableDepthFormat)depthFormat - stencilFormat:(GLKViewDrawableStencilFormat)stencilFormat; +- (instancetype)initWithFrame:(CGRect)frame + andPreferedRenderer:(ESRendererVersion)rendererVersion + andAA:(bool)msaaEnabled + andRetina:(bool)retinaEnabled + andRetinaScale:(CGFloat)retinaScale + sharegroup:(EAGLSharegroup*)sharegroup + colorFormat:(GLKViewDrawableColorFormat)colorFormat + depthFormat:(GLKViewDrawableDepthFormat)depthFormat + stencilFormat:(GLKViewDrawableStencilFormat)stencilFormat; diff --git a/addons/ofxiOS/src/gl/EAGLKView.m b/addons/ofxiOS/src/gl/EAGLKView.m index c643a224fb4..6de6dd8bb9d 100644 --- a/addons/ofxiOS/src/gl/EAGLKView.m +++ b/addons/ofxiOS/src/gl/EAGLKView.m @@ -25,15 +25,15 @@ + (Class) layerClass { return [CAEAGLLayer class]; } -- (id)initWithFrame:(CGRect)frame -andPreferedRenderer:(ESRendererVersion)version - andAA:(bool)msaaEnabled - andRetina:(bool)retinaEnabled - andRetinaScale:(CGFloat)retinaScale - sharegroup:(EAGLSharegroup*)sharegroup - colorFormat:(GLKViewDrawableColorFormat)colorFormat - depthFormat:(GLKViewDrawableDepthFormat)depthFormat - stencilFormat:(GLKViewDrawableStencilFormat)stencilFormat { +- (instancetype)initWithFrame:(CGRect)frame + andPreferedRenderer:(ESRendererVersion)version + andAA:(bool)msaaEnabled + andRetina:(bool)retinaEnabled + andRetinaScale:(CGFloat)retinaScale + sharegroup:(EAGLSharegroup*)sharegroup + colorFormat:(GLKViewDrawableColorFormat)colorFormat + depthFormat:(GLKViewDrawableDepthFormat)depthFormat + stencilFormat:(GLKViewDrawableStencilFormat)stencilFormat { if((self = [super initWithFrame:frame])) { diff --git a/addons/ofxiOS/src/gl/EAGLView.h b/addons/ofxiOS/src/gl/EAGLView.h index a66d32894cb..8559c802f29 100644 --- a/addons/ofxiOS/src/gl/EAGLView.h +++ b/addons/ofxiOS/src/gl/EAGLView.h @@ -76,14 +76,14 @@ @property (nonatomic, assign) float animationFrameInterval; @property (nonatomic, assign) float animationFrameRate; -- (id)initWithFrame:(CGRect)frame -andPreferedRenderer:(ESRendererVersion)rendererVersion - andDepth:(bool)depth - andAA:(bool)msaaEnabled - andNumSamples:(int)samples - andRetina:(bool)retinaEnabled - andRetinaScale:(CGFloat)retinaScale - sharegroup:(EAGLSharegroup*)sharegroup; +- (instancetype)initWithFrame:(CGRect)frame + andPreferedRenderer:(ESRendererVersion)rendererVersion + andDepth:(bool)depth + andAA:(bool)msaaEnabled + andNumSamples:(int)samples + andRetina:(bool)retinaEnabled + andRetinaScale:(CGFloat)retinaScale + sharegroup:(EAGLSharegroup*)sharegroup; - (void)startAnimation; - (void)stopAnimation; diff --git a/addons/ofxiOS/src/gl/EAGLView.m b/addons/ofxiOS/src/gl/EAGLView.m index 617a23bb1b2..87bcb8d4f20 100644 --- a/addons/ofxiOS/src/gl/EAGLView.m +++ b/addons/ofxiOS/src/gl/EAGLView.m @@ -57,14 +57,14 @@ + (Class) layerClass { return [CAEAGLLayer class]; } -- (id)initWithFrame:(CGRect)frame -andPreferedRenderer:(ESRendererVersion)version - andDepth:(bool)depth - andAA:(bool)msaaEnabled - andNumSamples:(int)samples - andRetina:(bool)retinaEnabled - andRetinaScale:(CGFloat)retinaScale - sharegroup:(EAGLSharegroup*)sharegroup { +- (instancetype)initWithFrame:(CGRect)frame + andPreferedRenderer:(ESRendererVersion)version + andDepth:(bool)depth + andAA:(bool)msaaEnabled + andNumSamples:(int)samples + andRetina:(bool)retinaEnabled + andRetinaScale:(CGFloat)retinaScale + sharegroup:(EAGLSharegroup*)sharegroup { if((self = [super initWithFrame:frame])) { diff --git a/addons/ofxiOS/src/gl/ES1Renderer.h b/addons/ofxiOS/src/gl/ES1Renderer.h index 28a5b49e479..437116911ce 100644 --- a/addons/ofxiOS/src/gl/ES1Renderer.h +++ b/addons/ofxiOS/src/gl/ES1Renderer.h @@ -26,11 +26,11 @@ bool bResize; } -- (id)initWithDepth:(bool)depth - andAA:(bool)msaa - andMSAASamples:(int)samples - andRetina:(bool)retina - sharegroup:(EAGLSharegroup*)sharegroup; +- (instancetype)initWithDepth:(bool)depth + andAA:(bool)msaa + andMSAASamples:(int)samples + andRetina:(bool)retina + sharegroup:(EAGLSharegroup*)sharegroup; - (void)startRender; - (void)finishRender; - (void)destroyFramebuffer; diff --git a/addons/ofxiOS/src/gl/ES1Renderer.m b/addons/ofxiOS/src/gl/ES1Renderer.m index 01df94c4956..9d783340d32 100644 --- a/addons/ofxiOS/src/gl/ES1Renderer.m +++ b/addons/ofxiOS/src/gl/ES1Renderer.m @@ -5,11 +5,11 @@ @implementation ES1Renderer // Create an OpenGL ES 1.1 context -- (id)init { +- (instancetype)init { return [self initWithDepth:false andAA:false andMSAASamples:0 andRetina:false sharegroup:nil]; } -- (id)initWithDepth:(bool)depth andAA:(bool)msaa andMSAASamples:(int)samples andRetina:(bool)retina sharegroup:(EAGLSharegroup*)sharegroup{ +- (instancetype)initWithDepth:(bool)depth andAA:(bool)msaa andMSAASamples:(int)samples andRetina:(bool)retina sharegroup:(EAGLSharegroup*)sharegroup{ if((self = [super init])) { diff --git a/addons/ofxiOS/src/gl/ES2Renderer.h b/addons/ofxiOS/src/gl/ES2Renderer.h index 6b233ad0e74..608fb2edbb5 100644 --- a/addons/ofxiOS/src/gl/ES2Renderer.h +++ b/addons/ofxiOS/src/gl/ES2Renderer.h @@ -26,11 +26,11 @@ bool bResize; } -- (id)initWithDepth:(bool)depth - andAA:(bool)msaa - andMSAASamples:(int)samples - andRetina:(bool)retina - sharegroup:(EAGLSharegroup*)sharegroup; +- (instancetype)initWithDepth:(bool)depth + andAA:(bool)msaa + andMSAASamples:(int)samples + andRetina:(bool)retina + sharegroup:(EAGLSharegroup*)sharegroup; - (void)startRender; - (void)finishRender; - (BOOL)resizeFromLayer:(CAEAGLLayer *)layer; diff --git a/addons/ofxiOS/src/gl/ES2Renderer.m b/addons/ofxiOS/src/gl/ES2Renderer.m index 858cbeb32d6..20ebc27d65a 100644 --- a/addons/ofxiOS/src/gl/ES2Renderer.m +++ b/addons/ofxiOS/src/gl/ES2Renderer.m @@ -5,11 +5,11 @@ @implementation ES2Renderer // Create an OpenGL ES 2.0 context -- (id)init { +- (instancetype)init { return [self initWithDepth:false andAA:false andMSAASamples:0 andRetina:false sharegroup:nil]; } -- (id)initWithDepth:(bool)depth andAA:(bool)msaa andMSAASamples:(int)samples andRetina:(bool)retina sharegroup:(EAGLSharegroup*)sharegroup{ +- (instancetype)initWithDepth:(bool)depth andAA:(bool)msaa andMSAASamples:(int)samples andRetina:(bool)retina sharegroup:(EAGLSharegroup*)sharegroup{ if((self = [super init])) { depthEnabled = depth; msaaEnabled = msaa; diff --git a/addons/ofxiOS/src/sound/AVSoundPlayer.m b/addons/ofxiOS/src/sound/AVSoundPlayer.m index c3f316d7e1f..e17e938265d 100644 --- a/addons/ofxiOS/src/sound/AVSoundPlayer.m +++ b/addons/ofxiOS/src/sound/AVSoundPlayer.m @@ -14,7 +14,7 @@ @interface AVSoundPlayer() { @implementation AVSoundPlayer -- (id)init { +- (instancetype)init { self = [super init]; if(self) { bMultiPlay = NO; diff --git a/addons/ofxiOS/src/sound/SoundInputStream.m b/addons/ofxiOS/src/sound/SoundInputStream.m index f9fc2b8f9ac..fb8639044f8 100644 --- a/addons/ofxiOS/src/sound/SoundInputStream.m +++ b/addons/ofxiOS/src/sound/SoundInputStream.m @@ -84,9 +84,9 @@ static OSStatus soundInputStreamRenderCallback(void *inRefCon, //---------------------------------------------------------------- @implementation SoundInputStream -- (id)initWithNumOfChannels:(NSInteger)value0 - withSampleRate:(NSInteger)value1 - withBufferSize:(NSInteger)value2 { +- (instancetype)initWithNumOfChannels:(NSInteger)value0 + withSampleRate:(NSInteger)value1 + withBufferSize:(NSInteger)value2 { self = [super initWithNumOfChannels:value0 withSampleRate:value1 withBufferSize:value2]; diff --git a/addons/ofxiOS/src/sound/SoundOutputStream.m b/addons/ofxiOS/src/sound/SoundOutputStream.m index 4f0d589b7ec..8539a8ba461 100644 --- a/addons/ofxiOS/src/sound/SoundOutputStream.m +++ b/addons/ofxiOS/src/sound/SoundOutputStream.m @@ -51,9 +51,9 @@ @interface SoundOutputStream() { @implementation SoundOutputStream -- (id)initWithNumOfChannels:(NSInteger)value0 - withSampleRate:(NSInteger)value1 - withBufferSize:(NSInteger)value2 { +- (instancetype)initWithNumOfChannels:(NSInteger)value0 + withSampleRate:(NSInteger)value1 + withBufferSize:(NSInteger)value2 { self = [super initWithNumOfChannels:value0 withSampleRate:value1 withBufferSize:value2]; diff --git a/addons/ofxiOS/src/sound/SoundStream.h b/addons/ofxiOS/src/sound/SoundStream.h index 7b33f4f733a..92c1adf29ba 100644 --- a/addons/ofxiOS/src/sound/SoundStream.h +++ b/addons/ofxiOS/src/sound/SoundStream.h @@ -48,9 +48,9 @@ typedef enum { @property (readonly) AudioUnit audioUnit; @property (assign) BOOL bInterruptedWhileRunning; -- (id)initWithNumOfChannels:(NSInteger)numOfChannels - withSampleRate:(NSInteger)sampleRate - withBufferSize:(NSInteger)bufferSize; +- (instancetype)initWithNumOfChannels:(NSInteger)numOfChannels + withSampleRate:(NSInteger)sampleRate + withBufferSize:(NSInteger)bufferSize; - (void)start; - (void)stop; diff --git a/addons/ofxiOS/src/sound/SoundStream.m b/addons/ofxiOS/src/sound/SoundStream.m index 314b27421e4..95e3b746819 100644 --- a/addons/ofxiOS/src/sound/SoundStream.m +++ b/addons/ofxiOS/src/sound/SoundStream.m @@ -23,9 +23,9 @@ @implementation SoundStream @synthesize audioUnit; @synthesize bInterruptedWhileRunning; -- (id)initWithNumOfChannels:(NSInteger)value0 - withSampleRate:(NSInteger)value1 - withBufferSize:(NSInteger)value2 { +- (instancetype)initWithNumOfChannels:(NSInteger)value0 + withSampleRate:(NSInteger)value1 + withBufferSize:(NSInteger)value2 { self = [super init]; if(self) { numOfChannels = value0; diff --git a/addons/ofxiOS/src/sound/ofxiOSSoundStreamDelegate.h b/addons/ofxiOS/src/sound/ofxiOSSoundStreamDelegate.h index 1819cd75e58..d9598e9e20b 100644 --- a/addons/ofxiOS/src/sound/ofxiOSSoundStreamDelegate.h +++ b/addons/ofxiOS/src/sound/ofxiOSSoundStreamDelegate.h @@ -13,11 +13,11 @@ class ofSoundBuffer; @interface ofxiOSSoundStreamDelegate : NSObject -- (id)initWithSoundInputFn:(std::function)input; -- (id)initWithSoundOutputFn:(std::function)output; +- (instancetype)initWithSoundInputFn:(std::function)input; +- (instancetype)initWithSoundOutputFn:(std::function)output; - (void)setInput:(std::function)input; - (void)setOutput:(std::function)output; @end -#define ofxiPhoneSoundStreamDelegate ofxiOSSoundStreamDelegate \ No newline at end of file +#define ofxiPhoneSoundStreamDelegate ofxiOSSoundStreamDelegate diff --git a/addons/ofxiOS/src/sound/ofxiOSSoundStreamDelegate.mm b/addons/ofxiOS/src/sound/ofxiOSSoundStreamDelegate.mm index 27437e548bc..ee850f352ae 100644 --- a/addons/ofxiOS/src/sound/ofxiOSSoundStreamDelegate.mm +++ b/addons/ofxiOS/src/sound/ofxiOSSoundStreamDelegate.mm @@ -20,7 +20,7 @@ @interface ofxiOSSoundStreamDelegate() { @implementation ofxiOSSoundStreamDelegate -- (id)init { +- (instancetype)init { self = [super init]; if(self) { inputBuffer = std::shared_ptr(new ofSoundBuffer); @@ -35,7 +35,7 @@ - (void)dealloc { outCallback = nullptr; } -- (id)initWithSoundInputFn:(std::function)fn { +- (instancetype)initWithSoundInputFn:(std::function)fn { self = [self init]; if(self) { inCallback = fn; @@ -43,7 +43,7 @@ - (id)initWithSoundInputFn:(std::function)fn { return self; } -- (id)initWithSoundOutputFn:(std::function)fn { +- (instancetype)initWithSoundOutputFn:(std::function)fn { self = [self init]; if(self) { outCallback = fn; diff --git a/addons/ofxiOS/src/tvOS/ofxtvOSGLKViewController.h b/addons/ofxiOS/src/tvOS/ofxtvOSGLKViewController.h index 68546d50ba1..8a62b1d1f6c 100644 --- a/addons/ofxiOS/src/tvOS/ofxtvOSGLKViewController.h +++ b/addons/ofxiOS/src/tvOS/ofxtvOSGLKViewController.h @@ -18,8 +18,8 @@ class ofxiOSApp; @property (nonatomic, retain) ofxiOSGLKView * glView; -- (id)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app; -- (id)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app sharegroup:(EAGLSharegroup *)sharegroup; +- (instancetype)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app; +- (instancetype)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app sharegroup:(EAGLSharegroup *)sharegroup; - (void)setPreferredFPS:(int)fps; - (EAGLSharegroup *)getSharegroup; diff --git a/addons/ofxiOS/src/tvOS/ofxtvOSGLKViewController.mm b/addons/ofxiOS/src/tvOS/ofxtvOSGLKViewController.mm index 36f060cf195..221ef497cb0 100644 --- a/addons/ofxiOS/src/tvOS/ofxtvOSGLKViewController.mm +++ b/addons/ofxiOS/src/tvOS/ofxtvOSGLKViewController.mm @@ -15,11 +15,11 @@ @implementation ofxtvOSGLKViewController @synthesize glView; -- (id)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app { +- (instancetype)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app { return [self initWithFrame:frame app:app sharegroup:nil]; } -- (id)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app sharegroup:(EAGLSharegroup *)sharegroup { +- (instancetype)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app sharegroup:(EAGLSharegroup *)sharegroup { if((self = [super init])) { self.glView = [[ofxiOSGLKView alloc] initWithFrame:frame andApp:app sharegroup:sharegroup]; self.glView.delegate = self; diff --git a/addons/ofxiOS/src/tvOS/ofxtvOSViewController.h b/addons/ofxiOS/src/tvOS/ofxtvOSViewController.h index 56f53a3ce97..d823fb12175 100644 --- a/addons/ofxiOS/src/tvOS/ofxtvOSViewController.h +++ b/addons/ofxiOS/src/tvOS/ofxtvOSViewController.h @@ -18,8 +18,8 @@ class ofxiOSApp; @property (nonatomic, retain) ofxiOSEAGLView * glView; -- (id)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app; -- (id)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app sharegroup:(EAGLSharegroup *)sharegroup; +- (instancetype)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app; +- (instancetype)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app sharegroup:(EAGLSharegroup *)sharegroup; @end diff --git a/addons/ofxiOS/src/tvOS/ofxtvOSViewController.mm b/addons/ofxiOS/src/tvOS/ofxtvOSViewController.mm index d858e3c003c..e82bb5fec8c 100644 --- a/addons/ofxiOS/src/tvOS/ofxtvOSViewController.mm +++ b/addons/ofxiOS/src/tvOS/ofxtvOSViewController.mm @@ -15,11 +15,11 @@ @interface ofxtvOSViewController() { @implementation ofxtvOSViewController -- (id)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app { +- (instancetype)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app { return [self initWithFrame:frame app:app sharegroup:nil]; } -- (id)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app sharegroup:(EAGLSharegroup *)sharegroup { +- (instancetype)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app sharegroup:(EAGLSharegroup *)sharegroup { if((self = [super init])) { self.glView = [[ofxiOSEAGLView alloc] initWithFrame:frame andApp:app sharegroup:sharegroup]; self.glView.delegate = self; diff --git a/addons/ofxiOS/src/utils/ofxiOSCoreLocation.h b/addons/ofxiOS/src/utils/ofxiOSCoreLocation.h index 975bdf38ce9..9d7c119832f 100644 --- a/addons/ofxiOS/src/utils/ofxiOSCoreLocation.h +++ b/addons/ofxiOS/src/utils/ofxiOSCoreLocation.h @@ -49,7 +49,7 @@ @property (nonatomic, readonly) double trueHeading; @property (nonatomic, readonly) double headingAccuracy; -- (id) init; +- (instancetype) init; - (void) dealloc; - (bool) startHeading; diff --git a/addons/ofxiOS/src/utils/ofxiOSCoreLocation.mm b/addons/ofxiOS/src/utils/ofxiOSCoreLocation.mm index 6947d750541..2585894b97e 100644 --- a/addons/ofxiOS/src/utils/ofxiOSCoreLocation.mm +++ b/addons/ofxiOS/src/utils/ofxiOSCoreLocation.mm @@ -157,7 +157,7 @@ @implementation ofxiOSCoreLocationDelegate @synthesize lat, lng, hAccuracy, alt, vAccuracy, distMoved, x, y, z, magneticHeading, trueHeading, headingAccuracy; //-------------------------------------------------------------- -- (id) init +- (instancetype) init { if(self = [super init]) { diff --git a/addons/ofxiOS/src/utils/ofxiOSImagePicker.h b/addons/ofxiOS/src/utils/ofxiOSImagePicker.h index 7765967172b..2d5d830d449 100644 --- a/addons/ofxiOS/src/utils/ofxiOSImagePicker.h +++ b/addons/ofxiOS/src/utils/ofxiOSImagePicker.h @@ -47,7 +47,7 @@ class canLoadPixels canLoadPixels * cppPixelLoader; } -- (id) initWithPicker:(canLoadPixels *) _picker; +- (instancetype) initWithPicker:(canLoadPixels *) _picker; - (void) imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo; diff --git a/addons/ofxiOS/src/utils/ofxiOSImagePicker.mm b/addons/ofxiOS/src/utils/ofxiOSImagePicker.mm index e1c0a6861ef..be9a4887797 100644 --- a/addons/ofxiOS/src/utils/ofxiOSImagePicker.mm +++ b/addons/ofxiOS/src/utils/ofxiOSImagePicker.mm @@ -179,7 +179,7 @@ //---------------------------------------------------------------- @implementation ofxiOSImagePickerDelegate -- (id) initWithPicker:(canLoadPixels *) _picker +- (instancetype) initWithPicker:(canLoadPixels *) _picker { if(self = [super init]) { @@ -522,7 +522,7 @@ @implementation ofxiOSImagePickerOverlayView @synthesize delegate; -- (id)initWithFrame:(CGRect)frame{ +- (instancetype)initWithFrame:(CGRect)frame{ if (self = [super initWithFrame:frame]) { [self initUI]; } diff --git a/addons/ofxiOS/src/utils/ofxiOSKeyboard.h b/addons/ofxiOS/src/utils/ofxiOSKeyboard.h index a73a3003c8e..9001f716542 100644 --- a/addons/ofxiOS/src/utils/ofxiOSKeyboard.h +++ b/addons/ofxiOS/src/utils/ofxiOSKeyboard.h @@ -23,7 +23,7 @@ int _yOriginal; int fieldLength; } -- (id) init: (int)x y:(int)y width:(int)w height:(int)h; +- (instancetype) init:(int)x y:(int)y width:(int)w height:(int)h; - (void) showText; - (void) hideText; - (const char *) getText; diff --git a/addons/ofxiOS/src/utils/ofxiOSKeyboard.mm b/addons/ofxiOS/src/utils/ofxiOSKeyboard.mm index 877d2c82f69..b02cb203d26 100644 --- a/addons/ofxiOS/src/utils/ofxiOSKeyboard.mm +++ b/addons/ofxiOS/src/utils/ofxiOSKeyboard.mm @@ -191,7 +191,7 @@ - (BOOL)textFieldShouldReturn:(UITextField*)textField } //-------------------------------------------------------------- -- (id) init:(int)x y:(int)y width:(int)w height:(int)h +- (instancetype) init:(int)x y:(int)y width:(int)w height:(int)h { if(self = [super init]) { diff --git a/addons/ofxiOS/src/utils/ofxiOSMapKitDelegate.h b/addons/ofxiOS/src/utils/ofxiOSMapKitDelegate.h index 15ed0aff400..639ce591d6a 100644 --- a/addons/ofxiOS/src/utils/ofxiOSMapKitDelegate.h +++ b/addons/ofxiOS/src/utils/ofxiOSMapKitDelegate.h @@ -41,7 +41,7 @@ class ofxiOSMapKit; ofxiOSMapKit* mapKit; } --(id)initWithMapKit:(ofxiOSMapKit*)mk; +-(instancetype)initWithMapKit:(ofxiOSMapKit*)mk; -(void)dealloc; - (void)mapView:(MKMapView *)mapView regionDidChangeAnimated:(BOOL)animated; diff --git a/addons/ofxiOS/src/utils/ofxiOSMapKitDelegate.mm b/addons/ofxiOS/src/utils/ofxiOSMapKitDelegate.mm index c5ee03e43bf..aa3b9848f70 100644 --- a/addons/ofxiOS/src/utils/ofxiOSMapKitDelegate.mm +++ b/addons/ofxiOS/src/utils/ofxiOSMapKitDelegate.mm @@ -38,7 +38,7 @@ @implementation ofxiOSMapKitDelegate --(id)initWithMapKit:(ofxiOSMapKit*)mk { +-(instancetype)initWithMapKit:(ofxiOSMapKit*)mk { if(self = [super init]) { mapKit = mk; ofLogVerbose("ofxiOSMapKitDelegate") << "initWithMapKit"; diff --git a/addons/ofxiOS/src/video/AVFoundationVideoGrabber.mm b/addons/ofxiOS/src/video/AVFoundationVideoGrabber.mm index b8e3a3dce39..935117f2d34 100644 --- a/addons/ofxiOS/src/video/AVFoundationVideoGrabber.mm +++ b/addons/ofxiOS/src/video/AVFoundationVideoGrabber.mm @@ -33,7 +33,7 @@ @implementation iOSVideoGrabber #pragma mark - #pragma mark Initialization -- (id)init { +- (instancetype)init { self = [super init]; if (self) { captureInput = nil; diff --git a/addons/ofxiOS/src/video/AVFoundationVideoPlayer.m b/addons/ofxiOS/src/video/AVFoundationVideoPlayer.m index d64d4d3616f..da195f32f0c 100644 --- a/addons/ofxiOS/src/video/AVFoundationVideoPlayer.m +++ b/addons/ofxiOS/src/video/AVFoundationVideoPlayer.m @@ -89,7 +89,7 @@ @implementation AVFoundationVideoPlayer { static const NSString * ItemStatusContext; -- (id)init { +- (instancetype)init { self = [super init]; if(self) { /** diff --git a/libs/openFrameworks/video/ofAVFoundationGrabber.mm b/libs/openFrameworks/video/ofAVFoundationGrabber.mm index 50ad134d24a..5e697dfb52d 100644 --- a/libs/openFrameworks/video/ofAVFoundationGrabber.mm +++ b/libs/openFrameworks/video/ofAVFoundationGrabber.mm @@ -20,7 +20,7 @@ @implementation OSXVideoGrabber #pragma mark - #pragma mark Initialization -- (id)init { +- (instancetype)init { self = [super init]; if (self) { captureInput = nil; diff --git a/libs/openFrameworks/video/ofAVFoundationVideoPlayer.m b/libs/openFrameworks/video/ofAVFoundationVideoPlayer.m index 572a929595e..c8b654ac09b 100644 --- a/libs/openFrameworks/video/ofAVFoundationVideoPlayer.m +++ b/libs/openFrameworks/video/ofAVFoundationVideoPlayer.m @@ -21,7 +21,7 @@ @implementation ofAVFoundationVideoPlayer static const void *PlayerRateContext = &ItemStatusContext; -- (id)init { +- (instancetype)init { self = [super init]; if(self) { From 962432e1b128cd77459a782d2e2dd55b62ff4e4b Mon Sep 17 00:00:00 2001 From: 2bit Date: Thu, 17 Mar 2022 21:24:23 +0900 Subject: [PATCH 21/32] add TODO about delegates and protocols --- addons/ofxiOS/src/gl/EAGLKView.h | 3 +++ addons/ofxiOS/src/utils/ofxiOSExtras.h | 9 +++++++++ addons/ofxiOS/src/utils/ofxiOSExtras.mm | 3 +++ addons/ofxiOS/src/utils/ofxiOSImagePicker.h | 1 + 4 files changed, 16 insertions(+) diff --git a/addons/ofxiOS/src/gl/EAGLKView.h b/addons/ofxiOS/src/gl/EAGLKView.h index 74ac56ea118..5d0b68f2f1f 100644 --- a/addons/ofxiOS/src/gl/EAGLKView.h +++ b/addons/ofxiOS/src/gl/EAGLKView.h @@ -12,6 +12,7 @@ #import #import "ESRenderer.h" +/// ???: inherit GLKViewDelegate? @protocol EAGLKViewDelegate @optional - (void)glViewAnimationStarted; @@ -35,6 +36,8 @@ ESRendererVersion rendererVersion; } +/// TODO: need to give protocol explicity. +/// ???: can we assume EAGLKViewDelegate is inherit GLKViewDelegate? @property (nonatomic, weak) id delegate; - (instancetype)initWithFrame:(CGRect)frame diff --git a/addons/ofxiOS/src/utils/ofxiOSExtras.h b/addons/ofxiOS/src/utils/ofxiOSExtras.h index a52d0bbbf38..21bb62b2182 100644 --- a/addons/ofxiOS/src/utils/ofxiOSExtras.h +++ b/addons/ofxiOS/src/utils/ofxiOSExtras.h @@ -190,6 +190,15 @@ bool ofxiOSUIImageToOFTexture(UIImage * uiImage, ofTexture & outTexture, int tar bool ofxiOSCGImageToPixels(CGImageRef & ref, unsigned char * pixels); #if TARGET_OS_IOS || (TARGET_OS_IPHONE && !TARGET_OS_TV) + +/// TODO: define protocol for ofxiOSScreenGrab, and give protocol explicitly for argument of ofxiOSScreenGrab +//@protocol ofxiOSSaveDelegate +// +//@optional +//- (void)saveComplete; +// +//@end + // save current opengl screen to photos app // based on code from http://www.bit-101.com/blog/?p=1861 void ofxiOSScreenGrab(id delegate); diff --git a/addons/ofxiOS/src/utils/ofxiOSExtras.mm b/addons/ofxiOS/src/utils/ofxiOSExtras.mm index 464d180a5ba..0f0cb0d9fd1 100644 --- a/addons/ofxiOS/src/utils/ofxiOSExtras.mm +++ b/addons/ofxiOS/src/utils/ofxiOSExtras.mm @@ -536,6 +536,8 @@ string ofxiOSGetClipboardString() { /******************** ofxiOSScreenGrab *********************/ +/// TODO: rename SaveDelegate to ofxiOSSaveDelegateObject (SaveDelegate is too general name, and basically XXXDelegate is name for Protocol). +/// maybe this change will safety because SaveDelegate is private class @interface SaveDelegate : NSObject /// TODO: give protocol explicitly @property (nonatomic, strong) id delegate; @@ -568,6 +570,7 @@ void releaseData(void *info, const void *data, size_t dataSize) { } #if TARGET_OS_IOS || (TARGET_OS_IPHONE && !TARGET_OS_TV) +/// ???: need to change argument to give Protocol id explicitly? void ofxiOSScreenGrab(id delegate) { CGRect rect = [[UIScreen mainScreen] bounds]; diff --git a/addons/ofxiOS/src/utils/ofxiOSImagePicker.h b/addons/ofxiOS/src/utils/ofxiOSImagePicker.h index 2d5d830d449..68be12c2700 100644 --- a/addons/ofxiOS/src/utils/ofxiOSImagePicker.h +++ b/addons/ofxiOS/src/utils/ofxiOSImagePicker.h @@ -27,6 +27,7 @@ class canLoadPixels //----------------------------------------------------------- overlay. @interface ofxiOSImagePickerOverlayView : UIView +/// TODO: give protocol explicitly. @property (nonatomic, strong) id delegate; - (void)initUI; - (void)takePhoto:(id)sender; From 9c769a9903d4286065a8512bdc8f23aeea98e5e7 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Wed, 11 May 2022 20:09:52 +1000 Subject: [PATCH 22/32] Metal --- .../ofxiOS/src/core/ofxiOSGLKViewController.h | 5 + addons/ofxiOS/src/core/ofxiOSMLKView.h | 50 + addons/ofxiOS/src/core/ofxiOSMLKView.mm | 401 + .../ofxiOS/src/core/ofxiOSMLKViewController.h | 42 + .../src/core/ofxiOSMLKViewController.mm | 472 ++ addons/ofxiOS/src/ml/EAMLKView.h | 75 + addons/ofxiOS/src/ml/EAMLKView.m | 175 + .../project/ios/CoreOF.xcconfig | 18 +- .../ios/iOS+OFLib.xcodeproj/project.pbxproj | 7126 ++++------------- 9 files changed, 2704 insertions(+), 5660 deletions(-) create mode 100644 addons/ofxiOS/src/core/ofxiOSMLKView.h create mode 100644 addons/ofxiOS/src/core/ofxiOSMLKView.mm create mode 100644 addons/ofxiOS/src/core/ofxiOSMLKViewController.h create mode 100644 addons/ofxiOS/src/core/ofxiOSMLKViewController.mm create mode 100644 addons/ofxiOS/src/ml/EAMLKView.h create mode 100644 addons/ofxiOS/src/ml/EAMLKView.m diff --git a/addons/ofxiOS/src/core/ofxiOSGLKViewController.h b/addons/ofxiOS/src/core/ofxiOSGLKViewController.h index 6feec8efb63..61d2ceea236 100644 --- a/addons/ofxiOS/src/core/ofxiOSGLKViewController.h +++ b/addons/ofxiOS/src/core/ofxiOSGLKViewController.h @@ -16,11 +16,16 @@ #import #import +#if defined(METALKIT) +#import +#endif + class ofxiOSApp; @class ofxiOSGLKView; @interface ofxiOSGLKViewController : GLKViewController + @property (nonatomic, strong) ofxiOSGLKView * glView; - (instancetype)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app; diff --git a/addons/ofxiOS/src/core/ofxiOSMLKView.h b/addons/ofxiOS/src/core/ofxiOSMLKView.h new file mode 100644 index 00000000000..3b7a052577f --- /dev/null +++ b/addons/ofxiOS/src/core/ofxiOSMLKView.h @@ -0,0 +1,50 @@ +//// +//// ofxiOSGLKView.mm +//// iPhone+OF Static Library +//// +//// Created by Dan Rosser on 7/3/18. +//// +// +// +//#pragma once +//#include +//#import +//#import "EAGLKView.h" +//#include +// +//class ofxiOSApp; +//class ofAppiOSWindow; +// +//@interface ofxiOSGLKView : EAGLKView { +// +//@protected +// NSMutableDictionary * activeTouches; +// glm::vec2 * screenSize; // because glm::vec2 is forward declared, +// glm::vec2 * windowSize; // these values have to be pointers. +// glm::vec2 * windowPos; +//} +// +//@property (readonly, nonatomic, getter=getScreenSize) glm::vec2 * screenSize; +//@property (readonly, nonatomic, getter=getWindowSize) glm::vec2 * windowSize; +//@property (readonly, nonatomic, getter=getWindowPosition) glm::vec2 * windowPos; +// +//+ (ofxiOSGLKView *) getInstance; +// +//- (instancetype)initWithFrame:(CGRect)frame +// andApp:(ofxiOSApp *)app; +//- (instancetype)initWithFrame:(CGRect)frame +// andApp:(ofxiOSApp *)app +// sharegroup:(EAGLSharegroup *)sharegroup; +//- (void)setup; +//- (void)update; +//- (void)draw; +//- (void)setMSAA:(bool)on; +//- (void)updateDimensions; +//- (void)destroy; +//- (CGPoint)orientateTouchPoint:(CGPoint)touchPoint; +//- (void)resetTouches; +//- (UIImage*)getSnapshot; +// +//@end +// +//#define ofxiPhoneEAGLView ofxiOSEAGLView diff --git a/addons/ofxiOS/src/core/ofxiOSMLKView.mm b/addons/ofxiOS/src/core/ofxiOSMLKView.mm new file mode 100644 index 00000000000..ca997044662 --- /dev/null +++ b/addons/ofxiOS/src/core/ofxiOSMLKView.mm @@ -0,0 +1,401 @@ +//// +//// ofxiOSGLKView.mm +//// iPhone+OF Static Library +//// +//// Created by Dan Rosser on 7/3/18. +//// +// +//#include "ofxiOSGLKView.h" +//#include "ofxiOSApp.h" +//#include "ofAppiOSWindow.h" +//#include "ofGLRenderer.h" +//#include "ofGLProgrammableRenderer.h" +//#include +//#import +// +//static ofxiOSGLKView * _instanceRef = nil; +// +//@interface ofxiOSGLKView() { +// BOOL bInit; +// shared_ptr window; +// shared_ptr app; +// BOOL bSetup; +//} +//- (void)updateDimensions; +//@end +// +//@implementation ofxiOSGLKView +// +//@synthesize screenSize; +//@synthesize windowSize; +//@synthesize windowPos; +// +//+ (ofxiOSGLKView *) getInstance { +// return _instanceRef; +//} +// +//- (instancetype)initWithFrame:(CGRect)frame andApp:(ofxiOSApp *)appPtr { +// return [self initWithFrame:frame andApp:appPtr sharegroup:nil]; +//} +// +//- (instancetype)initWithFrame:(CGRect)frame andApp:(ofxiOSApp *)appPtr sharegroup:(EAGLSharegroup *)sharegroup{ +// +// window = dynamic_pointer_cast(ofGetMainLoop()->getCurrentWindow()); +// +// if(window.get() == NULL) { +// ofLog(OF_LOG_FATAL_ERROR, "ofxiOSEAGLView::initWithFrame - window is NULL"); +// return nil; +// } +// +// ESRendererVersion preferedRendererVersion = (ESRendererVersion)window->getSettings().glesVersion; +// +// self = [self initWithFrame:frame +// andPreferedRenderer:preferedRendererVersion +// andAA:window->isAntiAliasingEnabled() +// andRetina:window->isRetinaEnabled() +// andRetinaScale:window->getRetinaScale() +// sharegroup:sharegroup +// colorFormat:(GLKViewDrawableColorFormat)window->getRendererColorType() +// depthFormat:(GLKViewDrawableDepthFormat)window->getRendererDepthType() +// stencilFormat:(GLKViewDrawableStencilFormat)window->getRendererStencilType()]; +// +// bSetup = NO; +// if(self) { +// +// _instanceRef = self; +// +// app = shared_ptr(appPtr); +// activeTouches = [[NSMutableDictionary alloc] init]; +// +// screenSize = new glm::vec2(); +// windowSize = new glm::vec2(); +// windowPos = new glm::vec2(); +// ofSetOrientation(window->getOrientation()); +// [self updateDimensions]; +// +// bInit = YES; +// } +// +// return self; +//} +// +//- (void)setup { +// if(window.get() == NULL) { +// ofLog(OF_LOG_FATAL_ERROR, "ofxiOSEAGLView setup. Failed setup. window is NULL"); +// return; +// } +// +// if(app.get() != ofGetAppPtr()) { // check if already running. +// +// ofSetMainLoop(shared_ptr(NULL)); // destroy old main loop. +// auto mainLoop = std::make_shared(); // make new main loop. +// ofSetMainLoop(mainLoop); +// +// ofiOSWindowSettings windowSettings = window->getSettings(); +// window = NULL; +// +// window = dynamic_pointer_cast(ofCreateWindow(windowSettings)); +// +// ofRunApp(app); +// } +// +// if(window->isProgrammableRenderer() == true) { +// static_cast(window->renderer().get())->setup(window->getSettings().glesVersion, 0); +// } else{ +// static_cast(window->renderer().get())->setup(); +// } +// +// ofxiOSAlerts.addListener(app.get()); +// +// ofDisableTextureEdgeHack(); +// +// window->events().notifySetup(); +// bSetup = YES; +// window->renderer()->clear(); +//} +// +//- (void)destroy { +// if(!bInit) { +// return; +// } +// +// window->events().notifyExit(); +// +// ofxiOSAlerts.removeListener(app.get()); +// +// ofGetMainLoop()->exit(); +// +// app = NULL; +// window = NULL; +// +// activeTouches = nil; +// delete screenSize; +// screenSize = NULL; +// delete windowSize; +// windowSize = NULL; +// delete windowPos; +// windowPos = NULL; +// +// _instanceRef = nil; +// +// bInit = NO; +// +// [super destroy]; +//} +// +//- (void)dealloc { +// [self destroy]; +//} +// +//- (void)layoutSubviews { +// [super layoutSubviews]; +// [self updateDimensions]; +// +// [super notifyResized]; +// window->events().notifyWindowResized(ofGetWidth(), ofGetHeight()); +//} +// +//- (void)updateDimensions { +// *windowPos = glm::vec2(self.frame.origin.x * scaleFactor, self.frame.origin.y * scaleFactor); +// *windowSize = glm::vec2(self.bounds.size.width * scaleFactor, self.bounds.size.height * scaleFactor); +// +// UIScreen * currentScreen = self.window.screen; // current screen is the screen that GLView is attached to. +// if(!currentScreen) { // if GLView is not attached, assume to be main device screen. +// currentScreen = [UIScreen mainScreen]; +// } +// *screenSize = glm::vec2(currentScreen.bounds.size.width * scaleFactor, currentScreen.bounds.size.height * scaleFactor); +//} +// +//- (void) setMSAA:(bool)on +//{ +// if(on) +// self.drawableMultisample = GLKViewDrawableMultisample4X; +// else +// self.drawableMultisample = GLKViewDrawableMultisampleNone; +//} +// +//- (void)notifyResized { +// // blank this. +// // we want to notifyResized at the end of layoutSubviews. +//} +// +//- (void)update { +// if(bSetup == NO) return; +// +// window->events().notifyUpdate(); +//} +// +// +//- (void)draw { +// if(bSetup == NO) return; +// +// window->renderer()->startRender(); +// +// if(window->isSetupScreenEnabled()) { +// window->renderer()->setupScreen(); +// } +// +// //------------------------------------------ draw. +// +// window->events().notifyDraw(); +// +// //------------------------------------------ +// +// window->renderer()->finishRender(); +// +// [super notifyDraw]; // alerts delegate that a new frame has been drawn. +//} +// +// +//- (void)notifyDraw { +// // blank this. +// // we want to notifyDraw at the end of drawView. +//} +// +////------------------------------------------------------ +//- (CGPoint)orientateTouchPoint:(CGPoint)touchPoint { +// +// if(ofAppiOSWindow::getInstance()->doesHWOrientation()) { +// return touchPoint; +// } +// +// ofOrientation orientation = ofGetOrientation(); +// CGPoint touchPointOriented = CGPointZero; +// +// switch(orientation) { +// case OF_ORIENTATION_180: +// touchPointOriented.x = ofGetWidth() - touchPoint.x; +// touchPointOriented.y = ofGetHeight() - touchPoint.y; +// break; +// +// case OF_ORIENTATION_90_RIGHT: +// touchPointOriented.x = touchPoint.y; +// touchPointOriented.y = ofGetHeight() - touchPoint.x; +// break; +// +// case OF_ORIENTATION_90_LEFT: +// touchPointOriented.x = ofGetWidth() - touchPoint.y; +// touchPointOriented.y = touchPoint.x; +// break; +// +// case OF_ORIENTATION_DEFAULT: +// default: +// touchPointOriented = touchPoint; +// break; +// } +// return touchPointOriented; +//} +// +////------------------------------------------------------ +// +//-(void) resetTouches { +// +// [activeTouches removeAllObjects]; +//} +// +//- (void)touchesBegan:(NSSet *)touches +// withEvent:(UIEvent *)event{ +// +// if(!bInit || !bSetup) { +// // if the glView is destroyed which also includes the OF app, +// // we no longer need to pass on these touch events. +// return; +// } +// +// for(UITouch *touch in touches) { +// int touchIndex = 0; +// while([[activeTouches allValues] containsObject:[NSNumber numberWithInt:touchIndex]]){ +// touchIndex++; +// } +// +// [activeTouches setObject:@(touchIndex) forKey:[NSValue valueWithPointer:(__bridge void *)touch]]; +// +// CGPoint touchPoint = [touch locationInView:self]; +// +// touchPoint.x *= scaleFactor; // this has to be done because retina still returns points in 320x240 but with high percision +// touchPoint.y *= scaleFactor; +// touchPoint = [self orientateTouchPoint:touchPoint]; +// +// if( touchIndex==0 ){ +// window->events().notifyMousePressed(touchPoint.x, touchPoint.y, 0); +// } +// +// ofTouchEventArgs touchArgs; +// touchArgs.numTouches = [[event touchesForView:self] count]; +// touchArgs.x = touchPoint.x; +// touchArgs.y = touchPoint.y; +// touchArgs.id = touchIndex; +// if([touch tapCount] == 2){ +// touchArgs.type = ofTouchEventArgs::doubleTap; +// ofNotifyEvent(window->events().touchDoubleTap,touchArgs); // send doubletap +// } +// touchArgs.type = ofTouchEventArgs::down; +// ofNotifyEvent(window->events().touchDown,touchArgs); // but also send tap (upto app programmer to ignore this if doubletap came that frame) +// } +//} +// +////------------------------------------------------------ +//- (void)touchesMoved:(NSSet *)touches +// withEvent:(UIEvent *)event{ +// +// if(!bInit || !bSetup) { +// // if the glView is destroyed which also includes the OF app, +// // we no longer need to pass on these touch events. +// return; +// } +// +// for(UITouch *touch in touches){ +// int touchIndex = [[activeTouches objectForKey:[NSValue valueWithPointer:(__bridge void *)touch]] intValue]; +// +// CGPoint touchPoint = [touch locationInView:self]; +// +// touchPoint.x *= scaleFactor; // this has to be done because retina still returns points in 320x240 but with high percision +// touchPoint.y *= scaleFactor; +// touchPoint = [self orientateTouchPoint:touchPoint]; +// +// if( touchIndex==0 ){ +// window->events().notifyMouseDragged(touchPoint.x, touchPoint.y, 0); +// } +// ofTouchEventArgs touchArgs; +// touchArgs.numTouches = [[event touchesForView:self] count]; +// touchArgs.x = touchPoint.x; +// touchArgs.y = touchPoint.y; +// touchArgs.id = touchIndex; +// touchArgs.type = ofTouchEventArgs::move; +// ofNotifyEvent(window->events().touchMoved, touchArgs); +// } +//} +// +////------------------------------------------------------ +//- (void)touchesEnded:(NSSet *)touches +// withEvent:(UIEvent *)event{ +// +// if(!bInit || !bSetup) { +// // if the glView is destroyed which also includes the OF app, +// // we no longer need to pass on these touch events. +// return; +// } +// +// for(UITouch *touch in touches){ +// int touchIndex = [[activeTouches objectForKey:[NSValue valueWithPointer:(__bridge void *)touch]] intValue]; +// +// [activeTouches removeObjectForKey:[NSValue valueWithPointer:(__bridge void *)touch]]; +// +// CGPoint touchPoint = [touch locationInView:self]; +// +// touchPoint.x *= scaleFactor; // this has to be done because retina still returns points in 320x240 but with high percision +// touchPoint.y *= scaleFactor; +// touchPoint = [self orientateTouchPoint:touchPoint]; +// +// if( touchIndex==0 ){ +// window->events().notifyMouseReleased(touchPoint.x, touchPoint.y, 0); +// } +// +// ofTouchEventArgs touchArgs; +// touchArgs.numTouches = [[event touchesForView:self] count] - [touches count]; +// touchArgs.x = touchPoint.x; +// touchArgs.y = touchPoint.y; +// touchArgs.id = touchIndex; +// touchArgs.type = ofTouchEventArgs::up; +// ofNotifyEvent(window->events().touchUp, touchArgs); +// } +//} +// +////------------------------------------------------------ +//- (void)touchesCancelled:(NSSet *)touches +// withEvent:(UIEvent *)event{ +// +// if(!bInit || !bSetup) { +// // if the glView is destroyed which also includes the OF app, +// // we no longer need to pass on these touch events. +// return; +// } +// +// for(UITouch *touch in touches){ +// int touchIndex = [[activeTouches objectForKey:[NSValue valueWithPointer:(__bridge void *)touch]] intValue]; +// +// CGPoint touchPoint = [touch locationInView:self]; +// +// touchPoint.x *= scaleFactor; // this has to be done because retina still returns points in 320x240 but with high percision +// touchPoint.y *= scaleFactor; +// touchPoint = [self orientateTouchPoint:touchPoint]; +// +// ofTouchEventArgs touchArgs; +// touchArgs.numTouches = [[event touchesForView:self] count]; +// touchArgs.x = touchPoint.x; +// touchArgs.y = touchPoint.y; +// touchArgs.id = touchIndex; +// touchArgs.type = ofTouchEventArgs::cancel; +// ofNotifyEvent(window->events().touchCancelled, touchArgs); +// } +// +// [self touchesEnded:touches withEvent:event]; +//} +// +//- (UIImage*)getSnapshot { +// return self.snapshot; +//} +// +// +// +//@end diff --git a/addons/ofxiOS/src/core/ofxiOSMLKViewController.h b/addons/ofxiOS/src/core/ofxiOSMLKViewController.h new file mode 100644 index 00000000000..51ebbb106fe --- /dev/null +++ b/addons/ofxiOS/src/core/ofxiOSMLKViewController.h @@ -0,0 +1,42 @@ +//// +//// ofxiOSMLKViewController.h +//// iOS+OFLib +//// +//// Created by Dan R on 11/5/22. +//// +// +//#ifndef ofxiOSMLKViewController_h +//#define ofxiOSMLKViewController_h +// +//#pragma once +// +//#include +//#if TARGET_OS_IOS || (TARGET_OS_IPHONE && !TARGET_OS_TV) +// +//#import +//#import +// +//class ofxiOSApp; +//@class ofxiOSMLKView; +// +//@interface ofxiOSGLKViewController : MGLKViewController +// +// +//@property (nonatomic, strong) ofxiOSMLKView * glView; +// +//- (instancetype)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app; +// +//- (UIInterfaceOrientation)currentInterfaceOrientation; +//- (void)setCurrentInterfaceOrientation:(UIInterfaceOrientation) orient; +//- (void)rotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation +// animated:(BOOL)animated; +//- (BOOL)isReadyToRotate; +//- (void)setPreferredFPS:(int)fps; +//- (void)setMSAA:(bool)value; +// +//@end +// +//#endif +// +// +//#endif /* ofxiOSMLKViewController_h */ diff --git a/addons/ofxiOS/src/core/ofxiOSMLKViewController.mm b/addons/ofxiOS/src/core/ofxiOSMLKViewController.mm new file mode 100644 index 00000000000..65ad7f59101 --- /dev/null +++ b/addons/ofxiOS/src/core/ofxiOSMLKViewController.mm @@ -0,0 +1,472 @@ +//// +//// ofxiOSGLKViewController.mm +//// iPhone+OF Static Library +//// +//// Created by Dan Rosser on 7/3/18. +//// +// +//#include +//#if TARGET_OS_IOS || (TARGET_OS_IPHONE && !TARGET_OS_TV) +// +//#import "ofxiOSMLKViewController.h" +// +//#include "ofxiOSMLKView.h" +//#import "ofxiOSExtras.h" +//#include "ofAppiOSWindow.h" +// +//@interface ofxiOSMLKViewController() { +// UIInterfaceOrientation currentInterfaceOrientation; +// UIInterfaceOrientation pendingInterfaceOrientation; +// BOOL bReadyToRotate; +// BOOL bFirstUpdate; +// BOOL bAnimated; +//} +//@end +// +//@implementation ofxiOSGLKViewController +// +//@synthesize glView; +// +//- (instancetype)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app { +// return [self initWithFrame:frame app:app sharegroup:nil]; +//} +// +//- (instancetype)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app sharegroup:(EAGLSharegroup *)sharegroup{ +// currentInterfaceOrientation = pendingInterfaceOrientation = UIInterfaceOrientationPortrait; +// if((self = [super init])) { +// currentInterfaceOrientation = pendingInterfaceOrientation = self.interfaceOrientation; +// if( [[[UIDevice currentDevice] systemVersion] compare:@"8.0" options:NSNumericSearch] == NSOrderedAscending ) { +// bReadyToRotate = NO; +// }else{ +// bReadyToRotate = YES; +// } +// bFirstUpdate = NO; +// bAnimated = NO; +// +// self.glView = [[ofxiOSGLKView alloc] initWithFrame:frame andApp:app sharegroup:sharegroup]; +// self.glView.delegate = self; +// } +// +// return self; +//} +// +//- (void) dealloc { +// [self.glView removeFromSuperview]; +// self.glView.delegate = nil; +// self.glView = nil; +//} +// +//- (void)viewDidLoad { +// [super viewDidLoad]; +// +// GLKView *view = (GLKView *)self.view; +// view.context = [self.glView context]; +// self.delegate = self; +// self.preferredFramesPerSecond = 60; //default +// [view setMultipleTouchEnabled:ofxiOSGetOFWindow()->isMultiTouch()]; +// [view bindDrawable]; +// [self.glView setup]; +//} +// +// +//-(void) checkError +//{ +// GLenum error = glGetError(); +// +// if (error == GL_NO_ERROR) +// return; +// +// switch (error) +// { +// case GL_INVALID_ENUM: +// NSLog(@"Invalid Enum"); +// break; +// } +//} +// +// +//- (void)viewDidUnload +//{ +// [super viewDidUnload]; +//} +// +//- (void)viewWillAppear:(BOOL)animated { +// [super viewWillAppear:animated]; +// [self.glView resetTouches]; +//} +// +//- (void)glkViewControllerUpdate:(GLKViewController *)controller { +// [self.glView update]; +//} +// +//- (void)glkViewController:(GLKViewController *)controller willPause:(BOOL)pause { +// +//} +// +//- (void) glkView:(GLKView *)view drawInRect:(CGRect)rect +//{ +// [view bindDrawable]; +// [self.glView draw]; +//} +// +//- (void)viewDidAppear:(BOOL)animated { +// [super viewDidAppear:animated]; +// +// // rotation of the glView only works properly after viewDidAppear. +// // this is something to do with either the bounds, center or transform properties not being initialised earlier. +// // so now that glView is ready, we rotate it to the pendingInterfaceOrientation. +// if( [[[UIDevice currentDevice] systemVersion] compare:@"8.0" options:NSNumericSearch] == NSOrderedAscending ) { +// bReadyToRotate = YES; +// bFirstUpdate = YES; +// [self rotateToInterfaceOrientation:pendingInterfaceOrientation animated:NO]; +// } +//} +// +//- (void)viewWillDisappear:(BOOL)animated { +// [super viewWillDisappear:animated]; +//} +// +//- (void)viewDidDisappear:(BOOL)animated { +// [super viewDidDisappear:animated]; +//} +// +//- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { +// if(self.glView != nil) +// [self.glView touchesBegan:touches withEvent:event]; +//} +// +//- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { +// if(self.glView != nil) +// [self.glView touchesMoved:touches withEvent:event]; +//} +//- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { +// if(self.glView != nil) +// [self.glView touchesEnded:touches withEvent:event]; +//} +//- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event { +// if(self.glView != nil) +// [self.glView touchesCancelled:touches withEvent:event]; +//} +//#ifdef __IPHONE_9_1 +//- (void)touchesEstimatedPropertiesUpdated:(NSSet *)touches { +// if(self.glView != nil) +// [self.glView touchesEstimatedPropertiesUpdated:touches]; +//} +//#endif +// +//- (EAGLSharegroup *)getSharegroup { +// if(self.glView != nil) { +// EAGLContext * context = [self.glView context]; +// if(context) +// return [context sharegroup]; +// } +// return nil; +//} +// +// +////-------------------------------------------------------------- glView callbacks. +//- (void)glViewAnimationStarted { +// // +//} +// +//- (void)glViewAnimationStopped { +// // +//} +// +//- (void)glViewDraw { +// // +//} +// +//- (void)glViewResized { +// // +//} +// +////-------------------------------------------------------------- orientation. +//- (UIInterfaceOrientation)currentInterfaceOrientation { +// return currentInterfaceOrientation; +//} +// +////-------------------------------------------------------------- orientation. +//- (void)setCurrentInterfaceOrientation:(UIInterfaceOrientation) orient { +// currentInterfaceOrientation = pendingInterfaceOrientation = orient; +//} +// +//- (float)rotationForOrientation:(UIInterfaceOrientation)interfaceOrientation { +// if (interfaceOrientation == UIInterfaceOrientationPortrait) { +// return 0; // 0 degrees. +// } else if (interfaceOrientation == UIInterfaceOrientationLandscapeRight) { +// return M_PI * 0.5; // 90 degrees. +// } else if (interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown) { +// return M_PI; // 180 degrees. +// } else if (interfaceOrientation == UIInterfaceOrientationLandscapeLeft) { +// return M_PI * 1.5; // 270 degrees. +// } else { +// return 0; +// } +//} +// +//- (void)rotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation +// animated:(BOOL)animated { +// bAnimated = animated; +// +// +// if(bReadyToRotate == NO) { +// pendingInterfaceOrientation = interfaceOrientation; +// +// // we need to update the dimensions here, so if ofSetOrientation is called in setup, +// // then it will return the correct width and height +// CGSize screenSize = [UIScreen mainScreen].bounds.size; +// CGRect bounds = CGRectMake(0, 0, screenSize.width, screenSize.height); +// if(UIInterfaceOrientationIsLandscape(interfaceOrientation)) { +// bounds.size.width = screenSize.height; +// bounds.size.height = screenSize.width; +// } +// self.glView.bounds = bounds; +// [self.glView updateDimensions]; +// +// return; +// } +// +// +// if(currentInterfaceOrientation == interfaceOrientation && !bFirstUpdate) { +// return; +// } +// +// if(pendingInterfaceOrientation != interfaceOrientation) { +// CGSize screenSize = [UIScreen mainScreen].bounds.size; +// CGRect bounds = CGRectMake(0, 0, screenSize.width, screenSize.height); +// if(UIInterfaceOrientationIsLandscape(interfaceOrientation)) { +// bounds.size.width = screenSize.height; +// bounds.size.height = screenSize.width; +// } +// self.glView.bounds = bounds; +// [self.glView updateDimensions]; +// } +// +// CGSize screenSize = [UIScreen mainScreen].bounds.size; +// CGPoint center; +// CGRect bounds = CGRectMake(0, 0, screenSize.width, screenSize.height); +// +// if(UIInterfaceOrientationIsLandscape(interfaceOrientation)) { +// center.x = screenSize.height * 0.5; +// center.y = screenSize.width * 0.5; +// } else { +// center.x = screenSize.width * 0.5; +// center.y = screenSize.height * 0.5; +// } +// +// // Is the iOS version less than 8? +// if( [[[UIDevice currentDevice] systemVersion] compare:@"8.0" options:NSNumericSearch] == NSOrderedAscending ) { +// if(UIInterfaceOrientationIsLandscape(interfaceOrientation)) { +// bounds.size.width = screenSize.height; +// bounds.size.height = screenSize.width; +// } +// } else { +// // Fixes for iOS 8 Portrait to Landscape issues +// if((UIInterfaceOrientationIsPortrait(interfaceOrientation) && screenSize.width >= screenSize.height) || +// (UIInterfaceOrientationIsLandscape(interfaceOrientation) && screenSize.height >= screenSize.width)) { +// bounds.size.width = screenSize.height; +// bounds.size.height = screenSize.width; +// } else { +// bounds.size.width = screenSize.width; +// bounds.size.height = screenSize.height; +// } +// //borg +// //NSLog(@"w %f h %f",[UIScreen mainScreen].bounds.size.width,[UIScreen mainScreen].bounds.size.height); +// //assumes Portrait orientation +// if(screenSize.width>screenSize.height){ +// center.x = screenSize.height * 0.5; +// center.y = screenSize.width * 0.5; +// }else{ +// center.x = screenSize.width * 0.5; +// center.y = screenSize.height * 0.5; +// } +// //NSLog(@"rotating to portrait %i, is portrait %i, currentInterfaceOrientation %i, bound: w %f h %f",UIInterfaceOrientationIsPortrait(interfaceOrientation),UIInterfaceOrientationIsPortrait(self.interfaceOrientation),UIInterfaceOrientationIsPortrait(currentInterfaceOrientation),bounds.size.width,bounds.size.height); +// } +// +// float rot1 = [self rotationForOrientation:currentInterfaceOrientation]; +// float rot2 = [self rotationForOrientation:interfaceOrientation]; +// float rot3 = rot2 - rot1; +// CGAffineTransform rotate = CGAffineTransformMakeRotation(rot3); +// rotate = CGAffineTransformConcat(rotate, self.glView.transform); +// +// if(animated) { +// NSTimeInterval duration = 0.3; +// if((UIInterfaceOrientationIsLandscape(currentInterfaceOrientation) && UIInterfaceOrientationIsLandscape(interfaceOrientation)) || +// (UIInterfaceOrientationIsPortrait(currentInterfaceOrientation) && UIInterfaceOrientationIsPortrait(interfaceOrientation))) { +// duration = 0.6; +// } +// [self.glView.layer removeAllAnimations]; +// [UIView animateWithDuration:duration animations:^{ +// self.glView.center = center; +// self.glView.transform = rotate; +// self.glView.bounds = bounds; +// }]; +// } else { +// self.glView.center = center; +// self.glView.transform = rotate; +// self.glView.bounds = bounds; +// } +// +// currentInterfaceOrientation = interfaceOrientation; +// bFirstUpdate = NO; +// +// [self.glView updateDimensions]; +//} +// +// +////-------------------------------------------------------------- orientation callbacks. +//// http://developer.apple.com/library/ios/#featuredarticles/ViewControllerPGforiPhoneOS/RespondingtoDeviceOrientationChanges/RespondingtoDeviceOrientationChanges.html +// +//- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation +// duration:(NSTimeInterval)duration { +// +// // CALLBACK 1. +// // The window calls the root view controller’s willRotateToInterfaceOrientation:duration: method. +// // Container view controllers forward this message on to the currently displayed content view controllers. +// // You can override this method in your custom content view controllers to hide views or make other changes to your view layout before the interface is rotated. +// // Deprecated in iOS 8. See viewWillTransitionToSize below. +//} +// +//- (void)viewWillLayoutSubviews { +// [super viewWillLayoutSubviews]; +// +// // CALLBACK 2. +// // The window adjusts the bounds of the view controller’s view. +// // This causes the view to layout its subviews, triggering the view controller’s viewWillLayoutSubviews method. +// // When this method runs, you can query the app object’s statusBarOrientation property to determine the current user interface layout. +//} +// +//- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation +// duration:(NSTimeInterval)duration { +// +// // CALLBACK 3. +// // This method is called from within an animation block so that any property changes you make +// // are animated at the same time as other animations that comprise the rotation. +// // Deprecated in iOS 8. See viewWillTransitionToSize below. +// +// CGSize screenSize = [UIScreen mainScreen].bounds.size; +// +// CGPoint center; +// // Is the iOS version less than 8? +// if( [[[UIDevice currentDevice] systemVersion] compare:@"8.0" options:NSNumericSearch] == NSOrderedAscending ) { +// if(UIInterfaceOrientationIsLandscape(self.interfaceOrientation)) { +// center.x = screenSize.height * 0.5; +// center.y = screenSize.width * 0.5; +// } else { +// center.x = screenSize.width * 0.5; +// center.y = screenSize.height * 0.5; +// } +// } else { +// center.x = screenSize.width * 0.5; +// center.y = screenSize.height * 0.5; +// } +// +// if(bAnimated) { +// NSTimeInterval duration = 0.3; +// [self.glView.layer removeAllAnimations]; +// [UIView animateWithDuration:duration animations:^{ +// self.glView.center = center; +// self.glView.transform = CGAffineTransformMakeRotation(0); +// }]; +// } else { +// self.glView.center = center; +// self.glView.transform = CGAffineTransformMakeRotation(0); +// } +//} +// +//// iOS8+ version of willAnimateRotationToInterfaceOrientation +////NOTE: Only called if actually resizing and not masked +////http://stackoverflow.com/questions/25935006/ios8-interface-rotation-methods-not-called +// +////borg +//#ifdef __IPHONE_8_0 +//- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id)coordinator { +// +// CGPoint center; +// +// center.x = size.width * 0.5; +// center.y = size.height * 0.5; +// +// +// if(bAnimated) { +// NSTimeInterval duration = 0.3; +// [self.glView.layer removeAllAnimations]; +// [UIView animateWithDuration:duration animations:^{ +// self.glView.center = center; +// self.glView.transform = CGAffineTransformMakeRotation(0); +// self.glView.frame = CGRectMake(0, 0, size.width,size.height); +// }]; +// } else { +// self.glView.center = center; +// self.glView.transform = CGAffineTransformMakeRotation(0); +// self.glView.frame = CGRectMake(0, 0, size.width,size.height); +// } +//} +//#endif +// +// +//- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { +// +// // CALLBACK 4. +// // This action marks the end of the rotation process. +// // You can use this method to show views, change the layout of views, or make other changes to your app. +//} +// +////-------------------------------------------------------------- iOS5 and earlier. +//- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation { +// return (toInterfaceOrientation == currentInterfaceOrientation); +//} +// +////-------------------------------------------------------------- iOS6. +//#ifdef __IPHONE_6_0 +//- (NSUInteger)supportedInterfaceOrientations { +// switch (currentInterfaceOrientation) { +// case UIInterfaceOrientationPortrait: +// return UIInterfaceOrientationMaskPortrait; +// break; +// case UIInterfaceOrientationPortraitUpsideDown: +// return UIInterfaceOrientationMaskPortraitUpsideDown; +// break; +// case UIInterfaceOrientationLandscapeLeft: +// return UIInterfaceOrientationMaskLandscapeLeft; +// break; +// case UIInterfaceOrientationLandscapeRight: +// return UIInterfaceOrientationMaskLandscapeRight; +// break; +// default: +// break; +// } +// // defaults to orientations selected in the .plist file ('Supported Interface Orientations' in the XCode Project) +// return -1; +//} +//- (BOOL)shouldAutorotate { +// return YES; +//} +//#endif +// +//- (BOOL)isReadyToRotate { +// return bReadyToRotate; +//} +// +//#ifdef __IPHONE_7_0 +//-(BOOL)prefersStatusBarHidden{ +// return YES; +//} +//#endif +// +//- (void)setPreferredFPS:(int)fps { +// if(self.glView != nil) { +// self.preferredFramesPerSecond = fps; +// } +//} +// +//- (void)setMSAA:(bool)value { +// if(self.glView != nil) { +// [self.glView setMSAA:value]; +// } +//} +// +//@end +// +//#endif diff --git a/addons/ofxiOS/src/ml/EAMLKView.h b/addons/ofxiOS/src/ml/EAMLKView.h new file mode 100644 index 00000000000..311f84d90a0 --- /dev/null +++ b/addons/ofxiOS/src/ml/EAMLKView.h @@ -0,0 +1,75 @@ +//// +//// EAGLKView.h +//// iPhone+OF Static Library +//// +//// Created by Dan Rosser on 11/5/22. +//// +// +// +//#pragma once +// +//#import +//#import +//#import +// +//#import +//#import +//#import "ESRenderer.h" +// +///// ???: inherit MGLKViewDelegate? +//@protocol EAMGLKViewDelegate +//@optional +//- (void)glViewAnimationStarted; +//- (void)glViewAnimationStopped; +//- (void)glViewDraw; +//- (void)glViewResized; +//@end +// +//@interface EAMLKView : MGLKView +//{ +// +//@protected +// +// CGFloat scaleFactor; +// CGFloat scaleFactorPref; +// +// BOOL bUseDepth; +// BOOL bUseMSAA; +// BOOL bUseRetina; +// NSInteger msaaSamples; +// ESRendererVersion rendererVersion; +//} +// +///// TODO: need to give protocol explicity. +///// ???: can we assume EAGLKViewDelegate is inherit GLKViewDelegate? +//@property (nonatomic, weak) id delegate; +// +//- (instancetype)initWithFrame:(CGRect)frame +// andPreferedRenderer:(ESRendererVersion)rendererVersion +// andAA:(bool)msaaEnabled +// andRetina:(bool)retinaEnabled +// andRetinaScale:(CGFloat)retinaScale +// colorFormat:(MGLDrawableColorFormat)colorFormat +// depthFormat:(MGLDrawableDepthFormat)depthFormat +// stencilFormat:(MGLDrawableStencilFormat)stencilFormat; +// +// +// +//- (void)setup; +//- (void)update; +//- (void)draw; +//- (void)destroy; +// +//- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event; +//- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event; +//- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event; +//- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event; +// +//- (void)touchesEstimatedPropertiesUpdated:(NSSet *)toucheso; +//- (void)setMSAA:(bool)on; +//- (void)notifyAnimationStarted; +//- (void)notifyAnimationStopped; +//- (void)notifyDraw; +//- (void)notifyResized; +// +//@end diff --git a/addons/ofxiOS/src/ml/EAMLKView.m b/addons/ofxiOS/src/ml/EAMLKView.m new file mode 100644 index 00000000000..ad64ccb961a --- /dev/null +++ b/addons/ofxiOS/src/ml/EAMLKView.m @@ -0,0 +1,175 @@ +//// +//// EAMLKView.h +//// iPhone+OF Static Library +//// +//// Created by Dan Rosser on 11/5/22. +//// +// +//#include +// +//#import "EAMLKView.h" +//#import +// +//#import "ES2Renderer.h" +// +//@interface EAMLKView() { +// BOOL bInit; +//} +//@end +// +//@implementation EAMLKView +// +//@synthesize delegate; +//// You must implement this method +//+ (Class) layerClass { +// return [MGLLayer class]; +//} +// +//- (instancetype)initWithFrame:(CGRect)frame +// andPreferedRenderer:(ESRendererVersion)version +// andAA:(bool)msaaEnabled +// andRetina:(bool)retinaEnabled +// andRetinaScale:(CGFloat)retinaScale +// colorFormat:(MGLDrawableColorFormat)colorFormat +// depthFormat:(MGLDrawableDepthFormat)depthFormat +// stencilFormat:(MGLDrawableStencilFormat)stencilFormat { +// +// if((self = [super initWithFrame:frame])) { +// +// rendererVersion = version; +// bUseMSAA = msaaEnabled; +// bUseRetina = retinaEnabled; +// //------------------------------------------------------ +// scaleFactorPref = retinaScale; +// +// if(bUseRetina == YES) { +// if(scaleFactorPref == 0.0) { +// scaleFactorPref = [[UIScreen mainScreen] nativeScale]; // no scale preference, default to max scale. +// } else { +// if(scaleFactorPref < 1.0) { +// scaleFactorPref = 1.0; // invalid negative value, default scale to 1. +// } else if(scaleFactorPref > [[UIScreen mainScreen] nativeScale]) { +// scaleFactorPref = [[UIScreen mainScreen] nativeScale]; +// } +// } +// } else { +// scaleFactorPref = 1.0; +// } +// +// [self updateScaleFactor]; +// +// //------------------------------------------------------ +// if(rendererVersion == ESRendererVersion_30) { +// NSLog(@"OpenGLES 3.0 Renderer not implemented for oF. Defaulting to OpenGLES 2.0"); +// rendererVersion = ESRendererVersion_20; +// } +// +// if(rendererVersion == ESRendererVersion_20) { +// self.context = [[MGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2]; +// NSLog(@"Creating OpenGL ES2 Renderer"); +// if(!self.context) { +// NSLog(@"OpenGL ES2 failed"); +// rendererVersion = ESRendererVersion_11; +// } +// } +// +// +// +// self.drawableColorFormat = colorFormat; +// self.drawableDepthFormat = depthFormat; +// self.drawableStencilFormat = stencilFormat; +// +// if(msaaEnabled) +// self.drawableMultisample = GLKViewDrawableMultisample4X; +// else +// self.drawableMultisample = GLKViewDrawableMultisampleNone; +// +//#if TARGET_OS_IOS || (TARGET_OS_IPHONE && !TARGET_OS_TV) +// self.multipleTouchEnabled = true; +//#endif +// self.opaque = true; +// +// [self bindDrawable]; +// +// bInit = YES; +// } +// +// return self; +//} +// +//- (void) destroy { +// if(!bInit) { +// return; +// } +// bInit = NO; +//} +// +//- (void) dealloc{ +// [self destroy]; +//} +// +//- (void) setup { +// +//} +//- (void) update{ +// +//} +// +//- (void) draw{ +// +//} +// +//- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { } +//- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { } +//- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { } +//- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event { } +//#ifdef __IPHONE_9_1 +//- (void)touchesEstimatedPropertiesUpdated:(NSSet *)touches { } +//#endif +// +// +////------------------------------------------------------------------- +//- (void)updateScaleFactor { +// GLKView *view = (GLKView *)self; +// +// scaleFactor = MIN(scaleFactorPref, [view contentScaleFactor]); +// if(scaleFactor != self.contentScaleFactor) { +// self.contentScaleFactor = scaleFactor; +// } +//} +// +//- (void) setMSAA:(bool)on +//{ +// if(on) +// self.drawableMultisample = GLKViewDrawableMultisample4X; +// else +// self.drawableMultisample = GLKViewDrawableMultisampleNone; +//} +// +////------------------------------------------------------------------- notify. +//- (void) notifyAnimationStarted { +// if([self.delegate respondsToSelector:@selector(glViewAnimationStarted)]) { +// [self.delegate glViewAnimationStarted]; +// } +//} +// +//- (void) notifyAnimationStopped { +// if([self.delegate respondsToSelector:@selector(glViewAnimationStopped)]) { +// [self.delegate glViewAnimationStopped]; +// } +//} +// +//- (void) notifyDraw { +// if([self.delegate respondsToSelector:@selector(glViewDraw)]) { +// [self.delegate glViewDraw]; +// } +//} +// +//- (void) notifyResized { +// if([self.delegate respondsToSelector:@selector(glViewResized)]) { +// [self.delegate glViewResized]; +// } +//} +// +// +//@end diff --git a/libs/openFrameworksCompiled/project/ios/CoreOF.xcconfig b/libs/openFrameworksCompiled/project/ios/CoreOF.xcconfig index bb7e43171da..5faa2c7df43 100644 --- a/libs/openFrameworksCompiled/project/ios/CoreOF.xcconfig +++ b/libs/openFrameworksCompiled/project/ios/CoreOF.xcconfig @@ -8,23 +8,27 @@ HEADER_GLEW = "$(OF_PATH)/libs/glew/include" HEADER_FREEIMAGE = "$(OF_PATH)/libs/FreeImage/include" HEADER_TESS2 = "$(OF_PATH)/libs/tess2/include" HEADER_RTAUDIO = "$(OF_PATH)/libs/rtaudio/include" -HEADER_BOOST = "$(OF_PATH)/libs/boost/include" +//HEADER_BOOST = "$(OF_PATH)/libs/boost/include" HEADER_UTF8 = "$(OF_PATH)/libs/utf8/include" HEADER_JSON = "$(OF_PATH)/libs/json/include" HEADER_GLM = "$(OF_PATH)/libs/glm/include" HEADER_CURL = "$(OF_PATH)/libs/curl/include" HEADER_URIPARSER = "$(OF_PATH)/libs/uriparser/include" HEADER_PUGIXML = "$(OF_PATH)/libs/pugixml/include" +HEADER_UNICODE = "$(OF_PATH)/libs/utf8/include" +HEADER_METAL = "$(OF_PATH)/libs/metal/include" +HEADER_METAL_THIRD = "$(OF_PATH)/libs/metal/include_thirdparty" + //------- Libraries LIB_OF = "$(OF_PATH)/libs/openFrameworksCompiled/lib/ios/libofxiOS_${PLATFORM_NAME}_${CONFIGURATION}.a" LIB_FREEIMAGE = "$(OF_PATH)/libs/FreeImage/lib/ios/freeimage.a" LIB_FREETYPE = "$(OF_PATH)/libs/freetype/lib/ios/freetype.a" LIB_TESS = "$(OF_PATH)/libs/tess2/lib/ios/tess2.a" -LIB_BOOST_SYSTEM = "$(OF_PATH)/libs/boost/lib/ios/boost_system.a" -LIB_BOOST_FS = "$(OF_PATH)/libs/boost/lib/ios/boost_filesystem.a" -LIB_BOOST = $(LIB_BOOST_SYSTEM) $(LIB_BOOST_FS) +//LIB_BOOST_SYSTEM = "$(OF_PATH)/libs/boost/lib/ios/boost_system.a" +//LIB_BOOST_FS = "$(OF_PATH)/libs/boost/lib/ios/boost_filesystem.a" +//LIB_BOOST = $(LIB_BOOST_SYSTEM) $(LIB_BOOST_FS) LIB_CURL = "$(OF_PATH)/libs/curl/lib/ios/curl.a" LIB_URIPARSER = "$(OF_PATH)/libs/uriparser/lib/ios/uriparser.a" LIB_PUGIXML = "$(OF_PATH)/libs/pugixml/lib/ios/pugixml.a" @@ -32,9 +36,11 @@ LIB_PUGIXML = "$(OF_PATH)/libs/pugixml/lib/ios/pugixml.a" MISC_FLAGS = "-ObjC" -OF_CORE_LIBS = $(MISC_FLAGS) $(LIB_BOOST) $(LIB_FREEIMAGE) $(LIB_FREETYPE) $(LIB_OPENSSL) $(LIB_TESS) $(LIB_CURL) $(LIB_URIPARSER) $(LIB_PUGIXML) $(LIB_OF) +OF_CORE_LIBS = $(MISC_FLAGS) $(LIB_FREEIMAGE) $(LIB_FREETYPE) $(LIB_OPENSSL) $(LIB_TESS) $(LIB_CURL) $(LIB_URIPARSER) $(LIB_PUGIXML) $(LIB_OF) +//$(LIB_BOOST) -OF_CORE_HEADERS = $(HEADER_OF) $(HEADER_OFXIOS) $(HEADER_OFXACCELEROMETER) $(HEADER_BOOST) $(HEADER_UTF8) $(HEADER_FREETYPE) $(HEADER_FREETYPE2) $(HEADER_FMOD) $(HEADER_GLEW) $(HEADER_FREEIMAGE) $(HEADER_TESS2) $(HEADER_RTAUDIO) $(HEADER_JSON) $(HEADER_GLM) $(HEADER_CURL) $(HEADER_URIPARSER) $(HEADER_PUGIXML) +OF_CORE_HEADERS = $(HEADER_OF) $(HEADER_OFXIOS) $(HEADER_OFXACCELEROMETER) $(HEADER_UTF8) $(HEADER_FREETYPE) $(HEADER_FREETYPE2) $(HEADER_FMOD) $(HEADER_GLEW) $(HEADER_FREEIMAGE) $(HEADER_TESS2) $(HEADER_RTAUDIO) $(HEADER_JSON) $(HEADER_GLM) $(HEADER_CURL) $(HEADER_URIPARSER) $(HEADER_PUGIXML) $(HEADER_UNICODE) $(HEADER_METAL) $(HEADER_METAL_THIRD) +//$(HEADER_BOOST) OF_CORE_FRAMEWORKS = -framework AudioToolbox -framework Accelerate -framework AVFoundation -framework CoreAudio -framework CoreGraphics -framework CoreLocation -framework CoreMotion -framework CoreMedia -framework CoreVideo -framework Foundation -framework GameController -framework GLKit -framework MapKit -framework OpenAL -framework OpenGLES -framework UIKit -framework Security -framework QuartzCore diff --git a/libs/openFrameworksCompiled/project/ios/iOS+OFLib.xcodeproj/project.pbxproj b/libs/openFrameworksCompiled/project/ios/iOS+OFLib.xcodeproj/project.pbxproj index 701ef407946..30020174158 100644 --- a/libs/openFrameworksCompiled/project/ios/iOS+OFLib.xcodeproj/project.pbxproj +++ b/libs/openFrameworksCompiled/project/ios/iOS+OFLib.xcodeproj/project.pbxproj @@ -1,5654 +1,1472 @@ - - - - - archiveVersion - 1 - classes - - objectVersion - 46 - objects - - 15594EFE15C55A5700727FF2 - - children - - 15594F7C15C5697C00727FF2 - 15594F7815C5697C00727FF2 - 15594F7E15C5697C00727FF2 - - isa - PBXGroup - path - app - sourceTree - <group> - - 15594EFF15C55A5700727FF2 - - children - - 15594FA915C56C9500727FF2 - 15594FA815C56C9500727FF2 - 15594FAA15C56C9500727FF2 - - isa - PBXGroup - path - events - sourceTree - <group> - - 15594F0015C55A5700727FF2 - - children - - 9008001C204EDC0F00DC786A - 9008001B204EDC0E00DC786A - 15594F0815C55AC900727FF2 - 15594F0515C55AC900727FF2 - 15594F0915C55AC900727FF2 - 15594F0615C55AC900727FF2 - 15594F0A15C55AC900727FF2 - 15594F0715C55AC900727FF2 - 15594F0B15C55AC900727FF2 - - isa - PBXGroup - path - gl - sourceTree - <group> - - 15594F0115C55A5700727FF2 - - children - - 671C0AF01770246200DF03B3 - 671C0AF11770246200DF03B3 - 671C0AF21770246200DF03B3 - 671C0AF31770246200DF03B3 - 678C3D19176F04F800D1CC68 - 678C3D1A176F04F800D1CC68 - 678C3D1B176F04F800D1CC68 - 678C3D1C176F04F800D1CC68 - 66EA462717A6D396009BB12A - 66EA462817A6D396009BB12A - 66EA462917A6D396009BB12A - 66EA462A17A6D396009BB12A - 678C3D1D176F04F800D1CC68 - 678C3D1E176F04F800D1CC68 - 678C3D1F176F04F800D1CC68 - 678C3D20176F04F800D1CC68 - 678C3D21176F04F800D1CC68 - 678C3D22176F04F800D1CC68 - - isa - PBXGroup - path - sound - sourceTree - <group> - - 15594F0215C55A5700727FF2 - - children - - 15594FB615C56D1E00727FF2 - 15594FAF15C56D1E00727FF2 - 67D48ED11C103BAE00F719BC - 67D48ED21C103BAE00F719BC - 9252B7EF1CDA2A6100A8032B - 9252B7F01CDA2A6100A8032B - 15594FB715C56D1E00727FF2 - 15594FB015C56D1E00727FF2 - 15594FB815C56D1E00727FF2 - 15594FB115C56D1E00727FF2 - 15594FB915C56D1E00727FF2 - 15594FB215C56D1E00727FF2 - 15594FBA15C56D1E00727FF2 - 15594FB315C56D1E00727FF2 - 15594FBB15C56D1E00727FF2 - 15594FB415C56D1E00727FF2 - 15594FBC15C56D1E00727FF2 - 15594FB515C56D1E00727FF2 - 15594FBD15C56D1E00727FF2 - - isa - PBXGroup - path - utils - sourceTree - <group> - - 15594F0315C55A5700727FF2 - - children - - 15594FA215C56BB700727FF2 - 15594FA015C56BB700727FF2 - 15594FA115C56BB700727FF2 - 15594F9F15C56BB700727FF2 - 1594366315CF5F420087B684 - 1594366115CF5F420087B684 - 1594366215CF5F420087B684 - 1594366015CF5F420087B684 - - isa - PBXGroup - path - video - sourceTree - <group> - - 15594F0515C55AC900727FF2 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - EAGLView.m - sourceTree - <group> - - 15594F0615C55AC900727FF2 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - ES1Renderer.m - sourceTree - <group> - - 15594F0715C55AC900727FF2 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - ES2Renderer.m - sourceTree - <group> - - 15594F0815C55AC900727FF2 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - EAGLView.h - sourceTree - <group> - - 15594F0915C55AC900727FF2 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ES1Renderer.h - sourceTree - <group> - - 15594F0A15C55AC900727FF2 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ES2Renderer.h - sourceTree - <group> - - 15594F0B15C55AC900727FF2 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ESRenderer.h - sourceTree - <group> - - 15594F0C15C55AC900727FF2 - - fileRef - 15594F0515C55AC900727FF2 - isa - PBXBuildFile - - 15594F0D15C55AC900727FF2 - - fileRef - 15594F0615C55AC900727FF2 - isa - PBXBuildFile - - 15594F0E15C55AC900727FF2 - - fileRef - 15594F0715C55AC900727FF2 - isa - PBXBuildFile - - 15594F0F15C55AC900727FF2 - - fileRef - 15594F0815C55AC900727FF2 - isa - PBXBuildFile - - 15594F1015C55AC900727FF2 - - fileRef - 15594F0915C55AC900727FF2 - isa - PBXBuildFile - - 15594F1115C55AC900727FF2 - - fileRef - 15594F0A15C55AC900727FF2 - isa - PBXBuildFile - - 15594F1215C55AC900727FF2 - - fileRef - 15594F0B15C55AC900727FF2 - isa - PBXBuildFile - - 15594F7815C5697C00727FF2 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.objcpp - path - ofAppiOSWindow.mm - sourceTree - <group> - - 15594F7C15C5697C00727FF2 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofAppiOSWindow.h - sourceTree - <group> - - 15594F7E15C5697C00727FF2 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofxiOSApp.h - sourceTree - <group> - - 15594F8115C5697C00727FF2 - - fileRef - 15594F7815C5697C00727FF2 - isa - PBXBuildFile - - 15594F8515C5697C00727FF2 - - fileRef - 15594F7C15C5697C00727FF2 - isa - PBXBuildFile - - 15594F8715C5697C00727FF2 - - fileRef - 15594F7E15C5697C00727FF2 - isa - PBXBuildFile - - 15594F8A15C56A4E00727FF2 - - children - - 15594F8F15C56A8A00727FF2 - 15594F8C15C56A8A00727FF2 - 15594F8E15C56A8A00727FF2 - 15594F8B15C56A8A00727FF2 - 90080017204EDB5500DC786A - 90080018204EDB5500DC786A - 90080015204EDA4600DC786A - 90080013204EDA1300DC786A - 15594F9015C56A8A00727FF2 - 15594F8D15C56A8A00727FF2 - - isa - PBXGroup - path - core - sourceTree - <group> - - 15594F8B15C56A8A00727FF2 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.objcpp - path - ofxiOSEAGLView.mm - sourceTree - <group> - - 15594F8C15C56A8A00727FF2 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.objcpp - path - ofxiOSAppDelegate.mm - sourceTree - <group> - - 15594F8D15C56A8A00727FF2 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.objcpp - path - ofxiOSViewController.mm - sourceTree - <group> - - 15594F8E15C56A8A00727FF2 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofxiOSEAGLView.h - sourceTree - <group> - - 15594F8F15C56A8A00727FF2 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofxiOSAppDelegate.h - sourceTree - <group> - - 15594F9015C56A8A00727FF2 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofxiOSViewController.h - sourceTree - <group> - - 15594F9115C56A8A00727FF2 - - fileRef - 15594F8B15C56A8A00727FF2 - isa - PBXBuildFile - - 15594F9215C56A8A00727FF2 - - fileRef - 15594F8C15C56A8A00727FF2 - isa - PBXBuildFile - - 15594F9315C56A8A00727FF2 - - fileRef - 15594F8D15C56A8A00727FF2 - isa - PBXBuildFile - - 15594F9415C56A8A00727FF2 - - fileRef - 15594F8E15C56A8A00727FF2 - isa - PBXBuildFile - - 15594F9515C56A8A00727FF2 - - fileRef - 15594F8F15C56A8A00727FF2 - isa - PBXBuildFile - - 15594F9615C56A8A00727FF2 - - fileRef - 15594F9015C56A8A00727FF2 - isa - PBXBuildFile - - 15594F9F15C56BB700727FF2 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.objcpp - path - AVFoundationVideoGrabber.mm - sourceTree - <group> - - 15594FA015C56BB700727FF2 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - AVFoundationVideoPlayer.m - sourceTree - <group> - - 15594FA115C56BB700727FF2 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - AVFoundationVideoGrabber.h - sourceTree - <group> - - 15594FA215C56BB700727FF2 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - AVFoundationVideoPlayer.h - sourceTree - <group> - - 15594FA315C56BB700727FF2 - - fileRef - 15594F9F15C56BB700727FF2 - isa - PBXBuildFile - - 15594FA415C56BB700727FF2 - - fileRef - 15594FA015C56BB700727FF2 - isa - PBXBuildFile - - 15594FA515C56BB700727FF2 - - fileRef - 15594FA115C56BB700727FF2 - isa - PBXBuildFile - - 15594FA615C56BB700727FF2 - - fileRef - 15594FA215C56BB700727FF2 - isa - PBXBuildFile - - 15594FA815C56C9500727FF2 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.objcpp - path - ofxiOSAlerts.mm - sourceTree - <group> - - 15594FA915C56C9500727FF2 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofxiOSAlerts.h - sourceTree - <group> - - 15594FAA15C56C9500727FF2 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofxiOSAlertsListener.h - sourceTree - <group> - - 15594FAC15C56C9500727FF2 - - fileRef - 15594FA815C56C9500727FF2 - isa - PBXBuildFile - - 15594FAD15C56C9500727FF2 - - fileRef - 15594FA915C56C9500727FF2 - isa - PBXBuildFile - - 15594FAE15C56C9500727FF2 - - fileRef - 15594FAA15C56C9500727FF2 - isa - PBXBuildFile - - 15594FAF15C56D1E00727FF2 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.objcpp - path - ofxiOSCoreLocation.mm - sourceTree - <group> - - 15594FB015C56D1E00727FF2 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.objcpp - path - ofxiOSExternalDisplay.mm - sourceTree - <group> - - 15594FB115C56D1E00727FF2 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.objcpp - path - ofxiOSExtras.mm - sourceTree - <group> - - 15594FB215C56D1E00727FF2 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.objcpp - path - ofxiOSImagePicker.mm - sourceTree - <group> - - 15594FB315C56D1E00727FF2 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.objcpp - path - ofxiOSKeyboard.mm - sourceTree - <group> - - 15594FB415C56D1E00727FF2 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.objcpp - path - ofxiOSMapKit.mm - sourceTree - <group> - - 15594FB515C56D1E00727FF2 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.objcpp - path - ofxiOSMapKitDelegate.mm - sourceTree - <group> - - 15594FB615C56D1E00727FF2 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofxiOSCoreLocation.h - sourceTree - <group> - - 15594FB715C56D1E00727FF2 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofxiOSExternalDisplay.h - sourceTree - <group> - - 15594FB815C56D1E00727FF2 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofxiOSExtras.h - sourceTree - <group> - - 15594FB915C56D1E00727FF2 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofxiOSImagePicker.h - sourceTree - <group> - - 15594FBA15C56D1E00727FF2 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofxiOSKeyboard.h - sourceTree - <group> - - 15594FBB15C56D1E00727FF2 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofxiOSMapKit.h - sourceTree - <group> - - 15594FBC15C56D1E00727FF2 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofxiOSMapKitDelegate.h - sourceTree - <group> - - 15594FBD15C56D1E00727FF2 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofxiOSMapKitListener.h - sourceTree - <group> - - 15594FBE15C56D1E00727FF2 - - fileRef - 15594FAF15C56D1E00727FF2 - isa - PBXBuildFile - - 15594FBF15C56D1E00727FF2 - - fileRef - 15594FB015C56D1E00727FF2 - isa - PBXBuildFile - - 15594FC015C56D1E00727FF2 - - fileRef - 15594FB115C56D1E00727FF2 - isa - PBXBuildFile - - 15594FC115C56D1E00727FF2 - - fileRef - 15594FB215C56D1E00727FF2 - isa - PBXBuildFile - - 15594FC215C56D1E00727FF2 - - fileRef - 15594FB315C56D1E00727FF2 - isa - PBXBuildFile - - 15594FC315C56D1E00727FF2 - - fileRef - 15594FB415C56D1E00727FF2 - isa - PBXBuildFile - - 15594FC415C56D1E00727FF2 - - fileRef - 15594FB515C56D1E00727FF2 - isa - PBXBuildFile - - 15594FC515C56D1E00727FF2 - - fileRef - 15594FB615C56D1E00727FF2 - isa - PBXBuildFile - - 15594FC615C56D1E00727FF2 - - fileRef - 15594FB715C56D1E00727FF2 - isa - PBXBuildFile - - 15594FC715C56D1E00727FF2 - - fileRef - 15594FB815C56D1E00727FF2 - isa - PBXBuildFile - - 15594FC815C56D1E00727FF2 - - fileRef - 15594FB915C56D1E00727FF2 - isa - PBXBuildFile - - 15594FC915C56D1E00727FF2 - - fileRef - 15594FBA15C56D1E00727FF2 - isa - PBXBuildFile - - 15594FCA15C56D1E00727FF2 - - fileRef - 15594FBB15C56D1E00727FF2 - isa - PBXBuildFile - - 15594FCB15C56D1E00727FF2 - - fileRef - 15594FBC15C56D1E00727FF2 - isa - PBXBuildFile - - 15594FCC15C56D1E00727FF2 - - fileRef - 15594FBD15C56D1E00727FF2 - isa - PBXBuildFile - - 1594366015CF5F420087B684 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.objcpp - path - ofxiOSVideoGrabber.mm - sourceTree - <group> - - 1594366115CF5F420087B684 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.objcpp - path - ofxiOSVideoPlayer.mm - sourceTree - <group> - - 1594366215CF5F420087B684 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofxiOSVideoGrabber.h - sourceTree - <group> - - 1594366315CF5F420087B684 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofxiOSVideoPlayer.h - sourceTree - <group> - - 1594366415CF5F420087B684 - - fileRef - 1594366015CF5F420087B684 - isa - PBXBuildFile - - 1594366515CF5F420087B684 - - fileRef - 1594366115CF5F420087B684 - isa - PBXBuildFile - - 1594366615CF5F420087B684 - - fileRef - 1594366215CF5F420087B684 - isa - PBXBuildFile - - 1594366715CF5F420087B684 - - fileRef - 1594366315CF5F420087B684 - isa - PBXBuildFile - - 15BC775215A5C31F00772525 - - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofxiOSExtensions.h - sourceTree - <group> - - 19C28FACFE9D520D11CA2CBB - - children - - BB24DED610DA7A3F00E9C588 - - isa - PBXGroup - name - Products - sourceTree - <group> - - 1D30AB110D05D00D00671497 - - isa - PBXFileReference - lastKnownFileType - wrapper.framework - name - Foundation.framework - path - System/Library/Frameworks/Foundation.framework - sourceTree - SDKROOT - - 1DF5F4DF0D08C38300B7A737 - - isa - PBXFileReference - lastKnownFileType - wrapper.framework - name - UIKit.framework - path - System/Library/Frameworks/UIKit.framework - sourceTree - SDKROOT - - 288765FC0DF74451002DB57D - - isa - PBXFileReference - lastKnownFileType - wrapper.framework - name - CoreGraphics.framework - path - System/Library/Frameworks/CoreGraphics.framework - sourceTree - SDKROOT - - 29B97313FDCFA39411CA2CEA - - attributes - - LastUpgradeCheck - 0920 - - buildConfigurationList - C01FCF4E08A954540054247B - compatibilityVersion - Xcode 3.2 - developmentRegion - English - hasScannedForEncodings - 1 - isa - PBXProject - knownRegions - - English - Japanese - French - German - - mainGroup - 29B97314FDCFA39411CA2CEA - projectDirPath - - projectRoot - - targets - - BB24DE5C10DA7A3F00E9C588 - - - 29B97314FDCFA39411CA2CEA - - children - - E41D3E9013B38BE900A75A5D - E41D3E9113B38BE900A75A5D - E41D3E9213B38BE900A75A5D - E41D3E9313B38BE900A75A5D - BB16F26B0F2B646B00518274 - E4F76D69176CB27200798745 - BB16E9930F2B1E5900518274 - 19C28FACFE9D520D11CA2CBB - - indentWidth - 4 - isa - PBXGroup - name - CustomTemplate - sourceTree - <group> - tabWidth - 4 - usesTabs - 0 - - 29B97323FDCFA39411CA2CEA - - children - - 99752D321BF21EEE0026316A - 5E2E99DC10ED147800587639 - 901808B8205362D7004A7774 - BBE5EAB70F49AD8400F28951 - BB16EBD80F2B2AB500518274 - BB16EBD10F2B2A9500518274 - 1DF5F4DF0D08C38300B7A737 - 1D30AB110D05D00D00671497 - 288765FC0DF74451002DB57D - 53F323EA10A20EDB00E0DAE4 - 5326AEA710A23A0500278DE6 - 53DA338912DF8F4500C622CE - 53DA338D12DF8F5000C622CE - 53DA338F12DF8F5000C622CE - 53DA339112DF8F5000C622CE - 67D48ECF1C10399900F719BC - - isa - PBXGroup - name - core frameworks - sourceTree - <group> - - 5326AEA710A23A0500278DE6 - - isa - PBXFileReference - lastKnownFileType - wrapper.framework - name - CoreLocation.framework - path - System/Library/Frameworks/CoreLocation.framework - sourceTree - SDKROOT - - 53DA338912DF8F4500C622CE - - isa - PBXFileReference - lastKnownFileType - wrapper.framework - name - AVFoundation.framework - path - System/Library/Frameworks/AVFoundation.framework - sourceTree - SDKROOT - - 53DA338A12DF8F4500C622CE - - fileRef - 53DA338912DF8F4500C622CE - isa - PBXBuildFile - - 53DA338D12DF8F5000C622CE - - isa - PBXFileReference - lastKnownFileType - wrapper.framework - name - CoreAudio.framework - path - System/Library/Frameworks/CoreAudio.framework - sourceTree - SDKROOT - - 53DA338E12DF8F5000C622CE - - fileRef - 53DA338D12DF8F5000C622CE - isa - PBXBuildFile - - 53DA338F12DF8F5000C622CE - - isa - PBXFileReference - lastKnownFileType - wrapper.framework - name - CoreMedia.framework - path - System/Library/Frameworks/CoreMedia.framework - sourceTree - SDKROOT - - 53DA339012DF8F5000C622CE - - fileRef - 53DA338F12DF8F5000C622CE - isa - PBXBuildFile - - 53DA339112DF8F5000C622CE - - isa - PBXFileReference - lastKnownFileType - wrapper.framework - name - CoreVideo.framework - path - System/Library/Frameworks/CoreVideo.framework - sourceTree - SDKROOT - - 53DA339212DF8F5000C622CE - - fileRef - 53DA339112DF8F5000C622CE - isa - PBXBuildFile - - 53F323EA10A20EDB00E0DAE4 - - isa - PBXFileReference - lastKnownFileType - wrapper.framework - name - OpenAL.framework - path - System/Library/Frameworks/OpenAL.framework - sourceTree - SDKROOT - - 5E2E99DC10ED147800587639 - - isa - PBXFileReference - lastKnownFileType - wrapper.framework - name - MapKit.framework - path - System/Library/Frameworks/MapKit.framework - sourceTree - SDKROOT - - 5E2E99DD10ED147800587639 - - fileRef - 5E2E99DC10ED147800587639 - isa - PBXBuildFile - - 6678E97219FEB2DF00C00581 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - ofSoundBuffer.cpp - sourceTree - <group> - - 6678E97319FEB2DF00C00581 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofSoundBuffer.h - sourceTree - <group> - - 6678E97419FEB2DF00C00581 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofSoundUtils.h - sourceTree - <group> - - 6678E97619FEB2DF00C00581 - - fileRef - 6678E97219FEB2DF00C00581 - isa - PBXBuildFile - - 6678E97719FEB2DF00C00581 - - fileRef - 6678E97319FEB2DF00C00581 - isa - PBXBuildFile - - 6678E97819FEB2DF00C00581 - - fileRef - 6678E97419FEB2DF00C00581 - isa - PBXBuildFile - - 66EA462717A6D396009BB12A - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - ofxOpenALSoundPlayer.cpp - sourceTree - <group> - - 66EA462817A6D396009BB12A - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofxOpenALSoundPlayer.h - sourceTree - <group> - - 66EA462917A6D396009BB12A - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - SoundEngine.cpp - sourceTree - <group> - - 66EA462A17A6D396009BB12A - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - SoundEngine.h - sourceTree - <group> - - 66EA462B17A6D396009BB12A - - fileRef - 66EA462717A6D396009BB12A - isa - PBXBuildFile - - 66EA462C17A6D396009BB12A - - fileRef - 66EA462817A6D396009BB12A - isa - PBXBuildFile - - 66EA462D17A6D396009BB12A - - fileRef - 66EA462917A6D396009BB12A - isa - PBXBuildFile - - 66EA462E17A6D396009BB12A - - fileRef - 66EA462A17A6D396009BB12A - isa - PBXBuildFile - - 6711091F19D3EAC6005D095F - - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofxiOSConstants.h - sourceTree - <group> - - 671C0AF01770246200DF03B3 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - AVSoundPlayer.h - sourceTree - <group> - - 671C0AF11770246200DF03B3 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - AVSoundPlayer.m - sourceTree - <group> - - 671C0AF21770246200DF03B3 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofxiOSSoundPlayer.h - sourceTree - <group> - - 671C0AF31770246200DF03B3 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.objcpp - path - ofxiOSSoundPlayer.mm - sourceTree - <group> - - 671C0AF41770246200DF03B3 - - fileRef - 671C0AF01770246200DF03B3 - isa - PBXBuildFile - - 671C0AF51770246200DF03B3 - - fileRef - 671C0AF11770246200DF03B3 - isa - PBXBuildFile - - 671C0AF61770246200DF03B3 - - fileRef - 671C0AF21770246200DF03B3 - isa - PBXBuildFile - - 671C0AF71770246200DF03B3 - - fileRef - 671C0AF31770246200DF03B3 - isa - PBXBuildFile - - 67509ABA17979781003A3A29 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - ofXml.cpp - sourceTree - <group> - - 67509ABB17979781003A3A29 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofXml.h - sourceTree - <group> - - 67509ABC17979781003A3A29 - - fileRef - 67509ABA17979781003A3A29 - isa - PBXBuildFile - - 67509ABD17979781003A3A29 - - fileRef - 67509ABB17979781003A3A29 - isa - PBXBuildFile - - 67833F7E19F8990D00DBE7AA - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - ofFpsCounter.cpp - sourceTree - <group> - - 67833F7F19F8990D00DBE7AA - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofFpsCounter.h - sourceTree - <group> - - 67833F8019F8990D00DBE7AA - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofThreadChannel.h - sourceTree - <group> - - 67833F8119F8990D00DBE7AA - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - ofTimer.cpp - sourceTree - <group> - - 67833F8219F8990D00DBE7AA - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofTimer.h - sourceTree - <group> - - 67833F8319F8990D00DBE7AA - - fileRef - 67833F7E19F8990D00DBE7AA - isa - PBXBuildFile - - 67833F8419F8990D00DBE7AA - - fileRef - 67833F7F19F8990D00DBE7AA - isa - PBXBuildFile - - 67833F8519F8990D00DBE7AA - - fileRef - 67833F8019F8990D00DBE7AA - isa - PBXBuildFile - - 67833F8619F8990D00DBE7AA - - fileRef - 67833F8119F8990D00DBE7AA - isa - PBXBuildFile - - 67833F8719F8990D00DBE7AA - - fileRef - 67833F8219F8990D00DBE7AA - isa - PBXBuildFile - - 67833F8819F8996300DBE7AA - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - ofBufferObject.cpp - sourceTree - <group> - - 67833F8919F8996300DBE7AA - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofBufferObject.h - sourceTree - <group> - - 67833F8A19F8996300DBE7AA - - fileRef - 67833F8819F8996300DBE7AA - isa - PBXBuildFile - - 67833F8B19F8996300DBE7AA - - fileRef - 67833F8919F8996300DBE7AA - isa - PBXBuildFile - - 678C3D19176F04F800D1CC68 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofxiOSSoundStream.h - sourceTree - <group> - - 678C3D1A176F04F800D1CC68 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.objcpp - path - ofxiOSSoundStream.mm - sourceTree - <group> - - 678C3D1B176F04F800D1CC68 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofxiOSSoundStreamDelegate.h - sourceTree - <group> - - 678C3D1C176F04F800D1CC68 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.objcpp - path - ofxiOSSoundStreamDelegate.mm - sourceTree - <group> - - 678C3D1D176F04F800D1CC68 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - SoundInputStream.h - sourceTree - <group> - - 678C3D1E176F04F800D1CC68 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - SoundInputStream.m - sourceTree - <group> - - 678C3D1F176F04F800D1CC68 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - SoundOutputStream.h - sourceTree - <group> - - 678C3D20176F04F800D1CC68 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - SoundOutputStream.m - sourceTree - <group> - - 678C3D21176F04F800D1CC68 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - SoundStream.h - sourceTree - <group> - - 678C3D22176F04F800D1CC68 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - SoundStream.m - sourceTree - <group> - - 678C3D23176F04F800D1CC68 - - fileRef - 678C3D19176F04F800D1CC68 - isa - PBXBuildFile - - 678C3D24176F04F800D1CC68 - - fileRef - 678C3D1A176F04F800D1CC68 - isa - PBXBuildFile - - 678C3D25176F04F800D1CC68 - - fileRef - 678C3D1B176F04F800D1CC68 - isa - PBXBuildFile - - 678C3D26176F04F800D1CC68 - - fileRef - 678C3D1C176F04F800D1CC68 - isa - PBXBuildFile - - 678C3D27176F04F800D1CC68 - - fileRef - 678C3D1D176F04F800D1CC68 - isa - PBXBuildFile - - 678C3D28176F04F800D1CC68 - - fileRef - 678C3D1E176F04F800D1CC68 - isa - PBXBuildFile - - 678C3D29176F04F800D1CC68 - - fileRef - 678C3D1F176F04F800D1CC68 - isa - PBXBuildFile - - 678C3D2A176F04F800D1CC68 - - fileRef - 678C3D20176F04F800D1CC68 - isa - PBXBuildFile - - 678C3D2B176F04F800D1CC68 - - fileRef - 678C3D21176F04F800D1CC68 - isa - PBXBuildFile - - 678C3D2C176F04F800D1CC68 - - fileRef - 678C3D22176F04F800D1CC68 - isa - PBXBuildFile - - 67D48ECF1C10399900F719BC - - isa - PBXFileReference - lastKnownFileType - wrapper.framework - name - CoreMotion.framework - path - System/Library/Frameworks/CoreMotion.framework - sourceTree - SDKROOT - - 67D48ED01C10399900F719BC - - fileRef - 67D48ECF1C10399900F719BC - isa - PBXBuildFile - - 67D48ED11C103BAE00F719BC - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofxiOSCoreMotion.h - sourceTree - <group> - - 67D48ED21C103BAE00F719BC - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.objcpp - path - ofxiOSCoreMotion.mm - sourceTree - <group> - - 67D48ED31C103BAE00F719BC - - fileRef - 67D48ED11C103BAE00F719BC - isa - PBXBuildFile - - 67D48ED41C103BAE00F719BC - - fileRef - 67D48ED21C103BAE00F719BC - isa - PBXBuildFile - - 69433CC21FE45BAC004D5B73 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - ofBaseApp.cpp - sourceTree - <group> - - 69433CC31FE45BAC004D5B73 - - fileRef - 69433CC21FE45BAC004D5B73 - isa - PBXBuildFile - - 69433CC41FE45BB7004D5B73 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofGLBaseTypes.h - sourceTree - <group> - - 69433CC51FE45BB7004D5B73 - - fileRef - 69433CC41FE45BB7004D5B73 - isa - PBXBuildFile - - 69433CC61FE45BCD004D5B73 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - ofGraphicsBaseTypes.cpp - sourceTree - <group> - - 69433CC71FE45BCD004D5B73 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofGraphicsBaseTypes.h - sourceTree - <group> - - 69433CC81FE45BCD004D5B73 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofGraphicsConstants.h - sourceTree - <group> - - 69433CC91FE45BCD004D5B73 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - text - path - ofPolyline.inl - sourceTree - <group> - - 69433CCA1FE45BCD004D5B73 - - fileRef - 69433CC61FE45BCD004D5B73 - isa - PBXBuildFile - - 69433CCB1FE45BCD004D5B73 - - fileRef - 69433CC71FE45BCD004D5B73 - isa - PBXBuildFile - - 69433CCC1FE45BCD004D5B73 - - fileRef - 69433CC81FE45BCD004D5B73 - isa - PBXBuildFile - - 69433CCD1FE45BD9004D5B73 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - text - path - ofMesh.inl - sourceTree - <group> - - 69433CCE1FE45BF2004D5B73 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - ofSoundBaseTypes.cpp - sourceTree - <group> - - 69433CCF1FE45BF2004D5B73 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofSoundBaseTypes.h - sourceTree - <group> - - 69433CD01FE45BF2004D5B73 - - fileRef - 69433CCE1FE45BF2004D5B73 - isa - PBXBuildFile - - 69433CD11FE45BF2004D5B73 - - fileRef - 69433CCF1FE45BF2004D5B73 - isa - PBXBuildFile - - 69433CD21FE45E41004D5B73 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofMathConstants.h - sourceTree - <group> - - 69433CD31FE45E41004D5B73 - - fileRef - 69433CD21FE45E41004D5B73 - isa - PBXBuildFile - - 860B024C17A96D840032B827 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofxiOS.h - sourceTree - <group> - - 860B024D17A96D840032B827 - - fileRef - 860B024C17A96D840032B827 - isa - PBXBuildFile - - 90080013204EDA1300DC786A - - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.objcpp - path - ofxiOSGLKViewController.mm - sourceTree - <group> - - 90080014204EDA1300DC786A - - fileRef - 90080013204EDA1300DC786A - isa - PBXBuildFile - - 90080015204EDA4600DC786A - - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofxiOSGLKViewController.h - sourceTree - <group> - - 90080016204EDA4B00DC786A - - fileRef - 90080015204EDA4600DC786A - isa - PBXBuildFile - - 90080017204EDB5500DC786A - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofxiOSGLKView.h - sourceTree - <group> - - 90080018204EDB5500DC786A - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.objcpp - path - ofxiOSGLKView.mm - sourceTree - <group> - - 90080019204EDB5500DC786A - - fileRef - 90080017204EDB5500DC786A - isa - PBXBuildFile - - 9008001A204EDB5500DC786A - - fileRef - 90080018204EDB5500DC786A - isa - PBXBuildFile - - 9008001B204EDC0E00DC786A - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - EAGLKView.m - sourceTree - <group> - - 9008001C204EDC0F00DC786A - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - EAGLKView.h - sourceTree - <group> - - 9008001D204EDC0F00DC786A - - fileRef - 9008001B204EDC0E00DC786A - isa - PBXBuildFile - - 9008001E204EDC0F00DC786A - - fileRef - 9008001C204EDC0F00DC786A - isa - PBXBuildFile - - 901808B8205362D7004A7774 - - isa - PBXFileReference - lastKnownFileType - wrapper.framework - name - GLKit.framework - path - System/Library/Frameworks/GLKit.framework - sourceTree - SDKROOT - - 901808B9205362D7004A7774 - - fileRef - 901808B8205362D7004A7774 - isa - PBXBuildFile - - 9252B7EF1CDA2A6100A8032B - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofxiOSEventAdapter.h - sourceTree - <group> - - 9252B7F01CDA2A6100A8032B - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.objcpp - path - ofxiOSEventAdapter.mm - sourceTree - <group> - - 9252B7F11CDA2A6100A8032B - - fileRef - 9252B7EF1CDA2A6100A8032B - isa - PBXBuildFile - - 9252B7F21CDA2A6100A8032B - - fileRef - 9252B7F01CDA2A6100A8032B - isa - PBXBuildFile - - 9957D86F1BDDCD440002D53C - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofEvent.h - sourceTree - <group> - - 9957D8701BDDCD440002D53C - - fileRef - 9957D86F1BDDCD440002D53C - isa - PBXBuildFile - - 99752D321BF21EEE0026316A - - isa - PBXFileReference - lastKnownFileType - wrapper.framework - name - GameController.framework - path - System/Library/Frameworks/GameController.framework - sourceTree - SDKROOT - - 99752D331BF21EEE0026316A - - fileRef - 99752D321BF21EEE0026316A - isa - PBXBuildFile - - 9979E8171A1B9883007E55D1 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofWindowSettings.h - sourceTree - <group> - - 9979E8181A1B9883007E55D1 - - fileRef - 9979E8171A1B9883007E55D1 - isa - PBXBuildFile - - 9979E8261A1CDBD4007E55D1 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - ofMainLoop.cpp - sourceTree - <group> - - 9979E8271A1CDBD4007E55D1 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofMainLoop.h - sourceTree - <group> - - 9979E8281A1CDBD4007E55D1 - - fileRef - 9979E8261A1CDBD4007E55D1 - isa - PBXBuildFile - - 9979E8291A1CDBD4007E55D1 - - fileRef - 9979E8271A1CDBD4007E55D1 - isa - PBXBuildFile - - BB16E9930F2B1E5900518274 - - children - - BBE5E94E0F497BD800F28951 - - isa - PBXGroup - name - libs - sourceTree - <group> - - BB16EBD10F2B2A9500518274 - - isa - PBXFileReference - lastKnownFileType - wrapper.framework - name - OpenGLES.framework - path - System/Library/Frameworks/OpenGLES.framework - sourceTree - SDKROOT - - BB16EBD80F2B2AB500518274 - - isa - PBXFileReference - lastKnownFileType - wrapper.framework - name - QuartzCore.framework - path - System/Library/Frameworks/QuartzCore.framework - sourceTree - SDKROOT - - BB16F26B0F2B646B00518274 - - children - - BB24E02310DA7C6100E9C588 - - isa - PBXGroup - name - addons - sourceTree - <group> - - BB24DE5C10DA7A3F00E9C588 - - buildConfigurationList - BB24DED210DA7A3F00E9C588 - buildPhases - - BB24DE5D10DA7A3F00E9C588 - BB24DEB110DA7A3F00E9C588 - BB24DEC910DA7A3F00E9C588 - - buildRules - - dependencies - - isa - PBXNativeTarget - name - iPhone+OF Static Library - productName - Static Library - productReference - BB24DED610DA7A3F00E9C588 - productType - com.apple.product-type.library.static - - BB24DE5D10DA7A3F00E9C588 - - buildActionMask - 2147483647 - files - - E4F76E1A176CB27200798745 - E4F76E1C176CB27200798745 - E4F76E1E176CB27200798745 - E4F76E20176CB27200798745 - E4F76E22176CB27200798745 - E4F76E24176CB27200798745 - 67833F8419F8990D00DBE7AA - E4F76E25176CB27200798745 - 90080019204EDB5500DC786A - E4F76E2F176CB27200798745 - E4F76E30176CB27200798745 - E4F76E37176CB27200798745 - E4F76E38176CB27200798745 - 67D48ED31C103BAE00F719BC - E4F76E3A176CB27200798745 - E4F76E3C176CB27200798745 - E4F76E3E176CB27200798745 - 69433CD31FE45E41004D5B73 - E4F76E40176CB27200798745 - E4F76E42176CB27200798745 - E4F76E44176CB27200798745 - 9252B7F11CDA2A6100A8032B - E4F76E46176CB27200798745 - E4F76E4A176CB27200798745 - E4F76E4C176CB27200798745 - E4F76E4E176CB27200798745 - E4F76E50176CB27200798745 - E4F76E52176CB27200798745 - E4F76E56176CB27200798745 - E4F76E58176CB27200798745 - E4F76E5A176CB27200798745 - E4F76E5C176CB27200798745 - 69433CCB1FE45BCD004D5B73 - E4F76E5E176CB27200798745 - E4F76E60176CB27200798745 - E4F76E62176CB27200798745 - E4F76E64176CB27200798745 - E4F76E66176CB27200798745 - E4F76E68176CB27200798745 - E4F76E6A176CB27200798745 - 69433CC51FE45BB7004D5B73 - E4F76E6C176CB27200798745 - 69433CCC1FE45BCD004D5B73 - E4F76E6E176CB27200798745 - 9979E8291A1CDBD4007E55D1 - E4F76E6F176CB27200798745 - E4F76E71176CB27200798745 - E4F76E72176CB27200798745 - 9008001E204EDC0F00DC786A - 67833F8519F8990D00DBE7AA - E4F76E73176CB27200798745 - E4F76E81176CB27200798745 - E4F76E83176CB27200798745 - 9957D8701BDDCD440002D53C - E4F76E87176CB27200798745 - E4F76E89176CB27200798745 - E4F76E8B176CB27200798745 - E4F76E8D176CB27200798745 - 6678E97819FEB2DF00C00581 - E4F76E8F176CB27200798745 - E4F76E90176CB27200798745 - E4F76E91176CB27200798745 - 9979E8181A1B9883007E55D1 - E4F76E93176CB27200798745 - E4F76E95176CB27200798745 - E4F76E97176CB27200798745 - E4F76E98176CB27200798745 - E4F76E9A176CB27200798745 - E4F76E9C176CB27200798745 - E4F76E9E176CB27200798745 - E4F76EA0176CB27200798745 - E4F76EB6176CB27200798745 - 67833F8B19F8996300DBE7AA - E4F76EB8176CB27200798745 - 15594F0F15C55AC900727FF2 - 15594F1015C55AC900727FF2 - 15594F1115C55AC900727FF2 - 15594F1215C55AC900727FF2 - 15594F8515C5697C00727FF2 - 15594F8715C5697C00727FF2 - 15594F9415C56A8A00727FF2 - 15594F9515C56A8A00727FF2 - 15594F9615C56A8A00727FF2 - 6678E97719FEB2DF00C00581 - 15594FA515C56BB700727FF2 - 15594FA615C56BB700727FF2 - 15594FAD15C56C9500727FF2 - 15594FAE15C56C9500727FF2 - 15594FC515C56D1E00727FF2 - 15594FC615C56D1E00727FF2 - 15594FC715C56D1E00727FF2 - 15594FC815C56D1E00727FF2 - 15594FC915C56D1E00727FF2 - 15594FCA15C56D1E00727FF2 - 69433CD11FE45BF2004D5B73 - 15594FCB15C56D1E00727FF2 - 90080016204EDA4B00DC786A - 15594FCC15C56D1E00727FF2 - 1594366615CF5F420087B684 - 1594366715CF5F420087B684 - 678C3D23176F04F800D1CC68 - 678C3D25176F04F800D1CC68 - 678C3D27176F04F800D1CC68 - 678C3D29176F04F800D1CC68 - 678C3D2B176F04F800D1CC68 - 671C0AF41770246200DF03B3 - 671C0AF61770246200DF03B3 - 67833F8719F8990D00DBE7AA - 67509ABD17979781003A3A29 - 66EA462C17A6D396009BB12A - 66EA462E17A6D396009BB12A - 860B024D17A96D840032B827 - - isa - PBXHeadersBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - BB24DEB110DA7A3F00E9C588 - - buildActionMask - 2147483647 - files - - E4F76E19176CB27200798745 - E4F76E1B176CB27200798745 - E4F76E1D176CB27200798745 - E4F76E1F176CB27200798745 - E4F76E23176CB27200798745 - E4F76E2E176CB27200798745 - 67833F8319F8990D00DBE7AA - E4F76E36176CB27200798745 - E4F76E39176CB27200798745 - E4F76E3B176CB27200798745 - E4F76E3D176CB27200798745 - E4F76E3F176CB27200798745 - E4F76E41176CB27200798745 - E4F76E43176CB27200798745 - E4F76E45176CB27200798745 - E4F76E49176CB27200798745 - E4F76E4B176CB27200798745 - 90080014204EDA1300DC786A - E4F76E4D176CB27200798745 - E4F76E4F176CB27200798745 - E4F76E51176CB27200798745 - E4F76E55176CB27200798745 - E4F76E57176CB27200798745 - E4F76E59176CB27200798745 - E4F76E5B176CB27200798745 - E4F76E5F176CB27200798745 - E4F76E61176CB27200798745 - E4F76E63176CB27200798745 - E4F76E65176CB27200798745 - 67833F8619F8990D00DBE7AA - E4F76E67176CB27200798745 - E4F76E69176CB27200798745 - E4F76E6B176CB27200798745 - E4F76E6D176CB27200798745 - E4F76E70176CB27200798745 - 69433CD01FE45BF2004D5B73 - E4F76E80176CB27200798745 - E4F76E82176CB27200798745 - E4F76E84176CB27200798745 - E4F76E86176CB27200798745 - 6678E97619FEB2DF00C00581 - E4F76E88176CB27200798745 - E4F76E8A176CB27200798745 - E4F76E8E176CB27200798745 - E4F76E92176CB27200798745 - E4F76E94176CB27200798745 - E4F76E96176CB27200798745 - E4F76E99176CB27200798745 - E4F76E9B176CB27200798745 - E4F76E9D176CB27200798745 - E4F76E9F176CB27200798745 - E4F76EB5176CB27200798745 - E4F76EB7176CB27200798745 - 15594F0C15C55AC900727FF2 - 9252B7F21CDA2A6100A8032B - 9979E8281A1CDBD4007E55D1 - 15594F0D15C55AC900727FF2 - 15594F0E15C55AC900727FF2 - 15594F8115C5697C00727FF2 - 15594F9115C56A8A00727FF2 - 15594F9215C56A8A00727FF2 - 69433CCA1FE45BCD004D5B73 - 15594F9315C56A8A00727FF2 - 9008001D204EDC0F00DC786A - 15594FA315C56BB700727FF2 - 15594FA415C56BB700727FF2 - 15594FAC15C56C9500727FF2 - 15594FBE15C56D1E00727FF2 - 15594FBF15C56D1E00727FF2 - 15594FC015C56D1E00727FF2 - 15594FC115C56D1E00727FF2 - 15594FC215C56D1E00727FF2 - 15594FC315C56D1E00727FF2 - 15594FC415C56D1E00727FF2 - 69433CC31FE45BAC004D5B73 - 67833F8A19F8996300DBE7AA - 1594366415CF5F420087B684 - 1594366515CF5F420087B684 - 678C3D24176F04F800D1CC68 - 678C3D26176F04F800D1CC68 - 678C3D28176F04F800D1CC68 - 678C3D2A176F04F800D1CC68 - 678C3D2C176F04F800D1CC68 - 671C0AF51770246200DF03B3 - 671C0AF71770246200DF03B3 - 67509ABC17979781003A3A29 - 66EA462B17A6D396009BB12A - 67D48ED41C103BAE00F719BC - 9008001A204EDB5500DC786A - 66EA462D17A6D396009BB12A - - isa - PBXSourcesBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - BB24DEC910DA7A3F00E9C588 - - buildActionMask - 2147483647 - files - - 99752D331BF21EEE0026316A - 67D48ED01C10399900F719BC - BB24DECA10DA7A3F00E9C588 - BB24DECB10DA7A3F00E9C588 - BB24DECC10DA7A3F00E9C588 - BB24DECD10DA7A3F00E9C588 - 901808B9205362D7004A7774 - BB24DECE10DA7A3F00E9C588 - BB24DECF10DA7A3F00E9C588 - BB24DED010DA7A3F00E9C588 - BB24DED110DA7A3F00E9C588 - 5E2E99DD10ED147800587639 - 53DA338A12DF8F4500C622CE - 53DA338E12DF8F5000C622CE - 53DA339012DF8F5000C622CE - 53DA339212DF8F5000C622CE - - isa - PBXFrameworksBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - BB24DECA10DA7A3F00E9C588 - - fileRef - BBE5EAB70F49AD8400F28951 - isa - PBXBuildFile - - BB24DECB10DA7A3F00E9C588 - - fileRef - BB16EBD10F2B2A9500518274 - isa - PBXBuildFile - - BB24DECC10DA7A3F00E9C588 - - fileRef - 1DF5F4DF0D08C38300B7A737 - isa - PBXBuildFile - - BB24DECD10DA7A3F00E9C588 - - fileRef - 53F323EA10A20EDB00E0DAE4 - isa - PBXBuildFile - - BB24DECE10DA7A3F00E9C588 - - fileRef - 1D30AB110D05D00D00671497 - isa - PBXBuildFile - - BB24DECF10DA7A3F00E9C588 - - fileRef - 288765FC0DF74451002DB57D - isa - PBXBuildFile - - BB24DED010DA7A3F00E9C588 - - fileRef - 5326AEA710A23A0500278DE6 - isa - PBXBuildFile - - BB24DED110DA7A3F00E9C588 - - fileRef - BB16EBD80F2B2AB500518274 - isa - PBXBuildFile - - BB24DED210DA7A3F00E9C588 - - buildConfigurations - - BB24DED310DA7A3F00E9C588 - BB24DED410DA7A3F00E9C588 - - defaultConfigurationIsVisible - 0 - defaultConfigurationName - Debug - isa - XCConfigurationList - - BB24DED310DA7A3F00E9C588 - - buildSettings - - CONFIGURATION_BUILD_DIR - $(SRCROOT)/../../lib/ios/ - COPY_PHASE_STRIP - NO - DEAD_CODE_STRIPPING - NO - EXECUTABLE_PREFIX - lib - GCC_DYNAMIC_NO_PIC - NO - GCC_OPTIMIZATION_LEVEL - 0 - GCC_WARN_64_TO_32_BIT_CONVERSION - NO - GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS - YES - GCC_WARN_NON_VIRTUAL_DESTRUCTOR - YES - LIBRARY_SEARCH_PATHS - - $(inherited) - "$(SRCROOT)/kiss/lib/linux" - "$(SRCROOT)/kiss/lib/linux64" - "$(SRCROOT)/../../../tess2/lib/ios" - "$(SRCROOT)/../../../poco/lib/ios" - - PRODUCT_NAME - ofxiOS_${PLATFORM_NAME}_Debug - SDKROOT - iphoneos - SKIP_INSTALL - YES - - isa - XCBuildConfiguration - name - Debug - - BB24DED410DA7A3F00E9C588 - - buildSettings - - ARCHS - $(ARCHS_STANDARD) - CONFIGURATION_BUILD_DIR - $(SRCROOT)/../../lib/ios/ - COPY_PHASE_STRIP - YES - DEAD_CODE_STRIPPING - NO - DEBUG_INFORMATION_FORMAT - dwarf-with-dsym - EXECUTABLE_PREFIX - lib - GCC_WARN_64_TO_32_BIT_CONVERSION - NO - GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS - YES - GCC_WARN_NON_VIRTUAL_DESTRUCTOR - YES - LIBRARY_SEARCH_PATHS - - $(inherited) - "$(SRCROOT)/kiss/lib/linux" - "$(SRCROOT)/kiss/lib/linux64" - "$(SRCROOT)/../../../tess2/lib/ios" - "$(SRCROOT)/../../../poco/lib/ios" - - PRODUCT_NAME - ofxiOS_${PLATFORM_NAME}_Release - SDKROOT - iphoneos - SKIP_INSTALL - YES - ZERO_LINK - NO - - isa - XCBuildConfiguration - name - Release - - BB24DED610DA7A3F00E9C588 - - explicitFileType - archive.ar - includeInIndex - 0 - isa - PBXFileReference - path - libofxiOS_iphoneos_Debug.a - sourceTree - BUILT_PRODUCTS_DIR - - BB24E02310DA7C6100E9C588 - - children - - BB24E02810DA7C6100E9C588 - - isa - PBXGroup - name - ofxiOS - path - ../../../../addons/ofxiOS - sourceTree - SOURCE_ROOT - - BB24E02810DA7C6100E9C588 - - children - - 860B024C17A96D840032B827 - 6711091F19D3EAC6005D095F - 15BC775215A5C31F00772525 - 15594EFE15C55A5700727FF2 - 15594F8A15C56A4E00727FF2 - 15594F0015C55A5700727FF2 - 15594F0115C55A5700727FF2 - 15594F0315C55A5700727FF2 - 15594EFF15C55A5700727FF2 - 15594F0215C55A5700727FF2 - - isa - PBXGroup - path - src - sourceTree - <group> - - BBE5E94E0F497BD800F28951 - - children - - 29B97323FDCFA39411CA2CEA - - isa - PBXGroup - name - core - sourceTree - <group> - - BBE5EAB70F49AD8400F28951 - - isa - PBXFileReference - lastKnownFileType - wrapper.framework - name - AudioToolbox.framework - path - System/Library/Frameworks/AudioToolbox.framework - sourceTree - SDKROOT - - C01FCF4E08A954540054247B - - buildConfigurations - - C01FCF4F08A954540054247B - C01FCF5008A954540054247B - - defaultConfigurationIsVisible - 0 - defaultConfigurationName - Debug - isa - XCConfigurationList - - C01FCF4F08A954540054247B - - baseConfigurationReference - E41D3E9113B38BE900A75A5D - buildSettings - - ARCHS - $(ARCHS_STANDARD) - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING - YES - CLANG_WARN_BOOL_CONVERSION - YES - CLANG_WARN_COMMA - YES - CLANG_WARN_CONSTANT_CONVERSION - YES - CLANG_WARN_EMPTY_BODY - YES - CLANG_WARN_ENUM_CONVERSION - YES - CLANG_WARN_INFINITE_RECURSION - YES - CLANG_WARN_INT_CONVERSION - YES - CLANG_WARN_NON_LITERAL_NULL_CONVERSION - YES - CLANG_WARN_OBJC_LITERAL_CONVERSION - YES - CLANG_WARN_RANGE_LOOP_ANALYSIS - YES - CLANG_WARN_STRICT_PROTOTYPES - YES - CLANG_WARN_SUSPICIOUS_MOVE - YES - CLANG_WARN_UNREACHABLE_CODE - YES - CLANG_WARN__DUPLICATE_METHOD_MATCH - YES - CONFIGURATION_BUILD_DIR - $(SRCROOT)/../../lib/ios/ - CONFIGURATION_TEMP_DIR - $(SRCROOT)/../../lib/ios/build/debug/ - ENABLE_STRICT_OBJC_MSGSEND - YES - GCC_NO_COMMON_BLOCKS - YES - GCC_WARN_64_TO_32_BIT_CONVERSION - YES - GCC_WARN_CHECK_SWITCH_STATEMENTS - NO - GCC_WARN_UNDECLARED_SELECTOR - YES - GCC_WARN_UNUSED_FUNCTION - YES - OBJROOT - $(SRCROOT)/../../lib/ios/build/debug - ONLY_ACTIVE_ARCH - YES - SDKROOT - iphoneos - SUPPORTED_PLATFORMS - iphonesimulator iphoneos - SYMROOT - $(SRCROOT)/../../lib/ios/ - VALID_ARCHS - $(ARCHS_STANDARD) - WARNING_CFLAGS - - -Wno-non-virtual-dtor - -Wno-overloaded-virtual - - - isa - XCBuildConfiguration - name - Debug - - C01FCF5008A954540054247B - - baseConfigurationReference - E41D3E9213B38BE900A75A5D - buildSettings - - ARCHS - $(ARCHS_STANDARD) - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING - YES - CLANG_WARN_BOOL_CONVERSION - YES - CLANG_WARN_COMMA - YES - CLANG_WARN_CONSTANT_CONVERSION - YES - CLANG_WARN_EMPTY_BODY - YES - CLANG_WARN_ENUM_CONVERSION - YES - CLANG_WARN_INFINITE_RECURSION - YES - CLANG_WARN_INT_CONVERSION - YES - CLANG_WARN_NON_LITERAL_NULL_CONVERSION - YES - CLANG_WARN_OBJC_LITERAL_CONVERSION - YES - CLANG_WARN_RANGE_LOOP_ANALYSIS - YES - CLANG_WARN_STRICT_PROTOTYPES - YES - CLANG_WARN_SUSPICIOUS_MOVE - YES - CLANG_WARN_UNREACHABLE_CODE - YES - CLANG_WARN__DUPLICATE_METHOD_MATCH - YES - CONFIGURATION_BUILD_DIR - $(SRCROOT)/../../lib/ios/ - CONFIGURATION_TEMP_DIR - $(SRCROOT)/../../lib/ios/build/release/ - ENABLE_STRICT_OBJC_MSGSEND - YES - GCC_NO_COMMON_BLOCKS - YES - GCC_WARN_64_TO_32_BIT_CONVERSION - YES - GCC_WARN_CHECK_SWITCH_STATEMENTS - NO - GCC_WARN_UNDECLARED_SELECTOR - YES - GCC_WARN_UNUSED_FUNCTION - YES - OBJROOT - $(SRCROOT)/../../lib/ios/build/release - ONLY_ACTIVE_ARCH - NO - SDKROOT - iphoneos - SUPPORTED_PLATFORMS - iphonesimulator iphoneos - SYMROOT - $(SRCROOT)/../../lib/ios/ - VALID_ARCHS - $(ARCHS_STANDARD) - WARNING_CFLAGS - - -Wno-non-virtual-dtor - -Wno-overloaded-virtual - - - isa - XCBuildConfiguration - name - Release - - E41D3E9013B38BE900A75A5D - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - text.xcconfig - path - CoreOF.xcconfig - sourceTree - SOURCE_ROOT - - E41D3E9113B38BE900A75A5D - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - text.xcconfig - path - Debug.xcconfig - sourceTree - SOURCE_ROOT - - E41D3E9213B38BE900A75A5D - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - text.xcconfig - path - Release.xcconfig - sourceTree - SOURCE_ROOT - - E41D3E9313B38BE900A75A5D - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - text.xcconfig - path - Shared.xcconfig - sourceTree - SOURCE_ROOT - - E4F76D69176CB27200798745 - - children - - E4F76DCF176CB27200798745 - E4F76D6E176CB27200798745 - E4F76D7B176CB27200798745 - E4F76D89176CB27200798745 - E4F76D8E176CB27200798745 - E4F76D92176CB27200798745 - E4F76DA9176CB27200798745 - E4F76DC0176CB27200798745 - E4F76DD0176CB27200798745 - E4F76DE1176CB27200798745 - E4F76DEF176CB27200798745 - E4F76E00176CB27200798745 - - isa - PBXGroup - name - openFrameworks - path - ../../../openFrameworks - sourceTree - <group> - - E4F76D6E176CB27200798745 - - children - - 69433CCD1FE45BD9004D5B73 - E4F76D6F176CB27200798745 - E4F76D70176CB27200798745 - E4F76D71176CB27200798745 - E4F76D72176CB27200798745 - E4F76D73176CB27200798745 - E4F76D74176CB27200798745 - E4F76D75176CB27200798745 - E4F76D76176CB27200798745 - E4F76D78176CB27200798745 - E4F76D79176CB27200798745 - E4F76D7A176CB27200798745 - - isa - PBXGroup - path - 3d - sourceTree - <group> - - E4F76D6F176CB27200798745 - - explicitFileType - sourcecode.cpp.objcpp.preprocessed - fileEncoding - 4 - isa - PBXFileReference - path - of3dPrimitives.cpp - sourceTree - <group> - - E4F76D70176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - of3dPrimitives.h - sourceTree - <group> - - E4F76D71176CB27200798745 - - explicitFileType - sourcecode.cpp.objcpp.preprocessed - fileEncoding - 4 - isa - PBXFileReference - path - of3dUtils.cpp - sourceTree - <group> - - E4F76D72176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - of3dUtils.h - sourceTree - <group> - - E4F76D73176CB27200798745 - - explicitFileType - sourcecode.cpp.objcpp.preprocessed - fileEncoding - 4 - isa - PBXFileReference - path - ofCamera.cpp - sourceTree - <group> - - E4F76D74176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofCamera.h - sourceTree - <group> - - E4F76D75176CB27200798745 - - explicitFileType - sourcecode.cpp.objcpp.preprocessed - fileEncoding - 4 - isa - PBXFileReference - path - ofEasyCam.cpp - sourceTree - <group> - - E4F76D76176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofEasyCam.h - sourceTree - <group> - - E4F76D78176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofMesh.h - sourceTree - <group> - - E4F76D79176CB27200798745 - - explicitFileType - sourcecode.cpp.objcpp.preprocessed - fileEncoding - 4 - isa - PBXFileReference - path - ofNode.cpp - sourceTree - <group> - - E4F76D7A176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofNode.h - sourceTree - <group> - - E4F76D7B176CB27200798745 - - children - - 69433CC21FE45BAC004D5B73 - E4F76D7C176CB27200798745 - E4F76D85176CB27200798745 - E4F76D86176CB27200798745 - E4F76D87176CB27200798745 - 9979E8261A1CDBD4007E55D1 - 9979E8271A1CDBD4007E55D1 - 9979E8171A1B9883007E55D1 - - isa - PBXGroup - path - app - sourceTree - <group> - - E4F76D7C176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofAppBaseWindow.h - sourceTree - <group> - - E4F76D85176CB27200798745 - - explicitFileType - sourcecode.cpp.objcpp.preprocessed - fileEncoding - 4 - isa - PBXFileReference - path - ofAppRunner.cpp - sourceTree - <group> - - E4F76D86176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofAppRunner.h - sourceTree - <group> - - E4F76D87176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofBaseApp.h - sourceTree - <group> - - E4F76D89176CB27200798745 - - children - - isa - PBXGroup - path - communication - sourceTree - <group> - - E4F76D8E176CB27200798745 - - children - - 9957D86F1BDDCD440002D53C - E4F76D8F176CB27200798745 - E4F76D90176CB27200798745 - E4F76D91176CB27200798745 - - isa - PBXGroup - path - events - sourceTree - <group> - - E4F76D8F176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - ofEvents.cpp - sourceTree - <group> - - E4F76D90176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofEvents.h - sourceTree - <group> - - E4F76D91176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofEventUtils.h - sourceTree - <group> - - E4F76D92176CB27200798745 - - children - - 69433CC41FE45BB7004D5B73 - 67833F8819F8996300DBE7AA - 67833F8919F8996300DBE7AA - E4F76D93176CB27200798745 - E4F76D94176CB27200798745 - E4F76D95176CB27200798745 - E4F76D96176CB27200798745 - E4F76D97176CB27200798745 - E4F76D98176CB27200798745 - E4F76D99176CB27200798745 - E4F76D9A176CB27200798745 - E4F76D9B176CB27200798745 - E4F76D9C176CB27200798745 - E4F76D9D176CB27200798745 - E4F76D9E176CB27200798745 - E4F76D9F176CB27200798745 - E4F76DA0176CB27200798745 - E4F76DA3176CB27200798745 - E4F76DA4176CB27200798745 - E4F76DA5176CB27200798745 - E4F76DA6176CB27200798745 - E4F76DA7176CB27200798745 - E4F76DA8176CB27200798745 - - isa - PBXGroup - path - gl - sourceTree - <group> - - E4F76D93176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - ofFbo.cpp - sourceTree - <group> - - E4F76D94176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofFbo.h - sourceTree - <group> - - E4F76D95176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - ofGLProgrammableRenderer.cpp - sourceTree - <group> - - E4F76D96176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofGLProgrammableRenderer.h - sourceTree - <group> - - E4F76D97176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - ofGLRenderer.cpp - sourceTree - <group> - - E4F76D98176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofGLRenderer.h - sourceTree - <group> - - E4F76D99176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - ofGLUtils.cpp - sourceTree - <group> - - E4F76D9A176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofGLUtils.h - sourceTree - <group> - - E4F76D9B176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - ofLight.cpp - sourceTree - <group> - - E4F76D9C176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofLight.h - sourceTree - <group> - - E4F76D9D176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - ofMaterial.cpp - sourceTree - <group> - - E4F76D9E176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofMaterial.h - sourceTree - <group> - - E4F76D9F176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - ofShader.cpp - sourceTree - <group> - - E4F76DA0176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofShader.h - sourceTree - <group> - - E4F76DA3176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - ofTexture.cpp - sourceTree - <group> - - E4F76DA4176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofTexture.h - sourceTree - <group> - - E4F76DA5176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - ofVbo.cpp - sourceTree - <group> - - E4F76DA6176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofVbo.h - sourceTree - <group> - - E4F76DA7176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - ofVboMesh.cpp - sourceTree - <group> - - E4F76DA8176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofVboMesh.h - sourceTree - <group> - - E4F76DA9176CB27200798745 - - children - - 69433CC61FE45BCD004D5B73 - 69433CC71FE45BCD004D5B73 - 69433CC81FE45BCD004D5B73 - 69433CC91FE45BCD004D5B73 - E4F76DAA176CB27200798745 - E4F76DAB176CB27200798745 - E4F76DAC176CB27200798745 - E4F76DAD176CB27200798745 - E4F76DB0176CB27200798745 - E4F76DB1176CB27200798745 - E4F76DB2176CB27200798745 - E4F76DB3176CB27200798745 - E4F76DB4176CB27200798745 - E4F76DB5176CB27200798745 - E4F76DB6176CB27200798745 - E4F76DB7176CB27200798745 - E4F76DB9176CB27200798745 - E4F76DBA176CB27200798745 - E4F76DBB176CB27200798745 - E4F76DBC176CB27200798745 - E4F76DBD176CB27200798745 - E4F76DBE176CB27200798745 - E4F76DBF176CB27200798745 - - isa - PBXGroup - path - graphics - sourceTree - <group> - - E4F76DAA176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - of3dGraphics.cpp - sourceTree - <group> - - E4F76DAB176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - of3dGraphics.h - sourceTree - <group> - - E4F76DAC176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - ofBitmapFont.cpp - sourceTree - <group> - - E4F76DAD176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofBitmapFont.h - sourceTree - <group> - - E4F76DB0176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - ofGraphics.cpp - sourceTree - <group> - - E4F76DB1176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofGraphics.h - sourceTree - <group> - - E4F76DB2176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - ofImage.cpp - sourceTree - <group> - - E4F76DB3176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofImage.h - sourceTree - <group> - - E4F76DB4176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - ofPath.cpp - sourceTree - <group> - - E4F76DB5176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofPath.h - sourceTree - <group> - - E4F76DB6176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - ofPixels.cpp - sourceTree - <group> - - E4F76DB7176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofPixels.h - sourceTree - <group> - - E4F76DB9176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofPolyline.h - sourceTree - <group> - - E4F76DBA176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - ofRendererCollection.cpp - sourceTree - <group> - - E4F76DBB176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofRendererCollection.h - sourceTree - <group> - - E4F76DBC176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - ofTessellator.cpp - sourceTree - <group> - - E4F76DBD176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofTessellator.h - sourceTree - <group> - - E4F76DBE176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - ofTrueTypeFont.cpp - sourceTree - <group> - - E4F76DBF176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofTrueTypeFont.h - sourceTree - <group> - - E4F76DC0176CB27200798745 - - children - - 69433CD21FE45E41004D5B73 - E4F76DC1176CB27200798745 - E4F76DC2176CB27200798745 - E4F76DC3176CB27200798745 - E4F76DC4176CB27200798745 - E4F76DC5176CB27200798745 - E4F76DC6176CB27200798745 - E4F76DC7176CB27200798745 - E4F76DC8176CB27200798745 - E4F76DC9176CB27200798745 - E4F76DCA176CB27200798745 - E4F76DCB176CB27200798745 - E4F76DCC176CB27200798745 - E4F76DCD176CB27200798745 - E4F76DCE176CB27200798745 - - isa - PBXGroup - path - math - sourceTree - <group> - - E4F76DC1176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - ofMath.cpp - sourceTree - <group> - - E4F76DC2176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofMath.h - sourceTree - <group> - - E4F76DC3176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - ofMatrix3x3.cpp - sourceTree - <group> - - E4F76DC4176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofMatrix3x3.h - sourceTree - <group> - - E4F76DC5176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - ofMatrix4x4.cpp - sourceTree - <group> - - E4F76DC6176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofMatrix4x4.h - sourceTree - <group> - - E4F76DC7176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - ofQuaternion.cpp - sourceTree - <group> - - E4F76DC8176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofQuaternion.h - sourceTree - <group> - - E4F76DC9176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - ofVec2f.cpp - sourceTree - <group> - - E4F76DCA176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofVec2f.h - sourceTree - <group> - - E4F76DCB176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofVec3f.h - sourceTree - <group> - - E4F76DCC176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - ofVec4f.cpp - sourceTree - <group> - - E4F76DCD176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofVec4f.h - sourceTree - <group> - - E4F76DCE176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofVectorMath.h - sourceTree - <group> - - E4F76DCF176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofMain.h - sourceTree - <group> - - E4F76DD0176CB27200798745 - - children - - 69433CCE1FE45BF2004D5B73 - 69433CCF1FE45BF2004D5B73 - 6678E97219FEB2DF00C00581 - 6678E97319FEB2DF00C00581 - E4F76DDD176CB27200798745 - E4F76DDE176CB27200798745 - E4F76DDF176CB27200798745 - E4F76DE0176CB27200798745 - 6678E97419FEB2DF00C00581 - - isa - PBXGroup - path - sound - sourceTree - <group> - - E4F76DDD176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - ofSoundPlayer.cpp - sourceTree - <group> - - E4F76DDE176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofSoundPlayer.h - sourceTree - <group> - - E4F76DDF176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - ofSoundStream.cpp - sourceTree - <group> - - E4F76DE0176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofSoundStream.h - sourceTree - <group> - - E4F76DE1176CB27200798745 - - children - - E4F76DE2176CB27200798745 - E4F76DE4176CB27200798745 - E4F76DE5176CB27200798745 - E4F76DE6176CB27200798745 - E4F76DE7176CB27200798745 - E4F76DE8176CB27200798745 - E4F76DE9176CB27200798745 - E4F76DEB176CB27200798745 - E4F76DEC176CB27200798745 - E4F76DED176CB27200798745 - E4F76DEE176CB27200798745 - - isa - PBXGroup - path - types - sourceTree - <group> - - E4F76DE2176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - ofBaseTypes.cpp - sourceTree - <group> - - E4F76DE4176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - ofColor.cpp - sourceTree - <group> - - E4F76DE5176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofColor.h - sourceTree - <group> - - E4F76DE6176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - ofParameter.cpp - sourceTree - <group> - - E4F76DE7176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofParameter.h - sourceTree - <group> - - E4F76DE8176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - ofParameterGroup.cpp - sourceTree - <group> - - E4F76DE9176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofParameterGroup.h - sourceTree - <group> - - E4F76DEB176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofPoint.h - sourceTree - <group> - - E4F76DEC176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - ofRectangle.cpp - sourceTree - <group> - - E4F76DED176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofRectangle.h - sourceTree - <group> - - E4F76DEE176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofTypes.h - sourceTree - <group> - - E4F76DEF176CB27200798745 - - children - - E4F76DF0176CB27200798745 - E4F76DF1176CB27200798745 - E4F76DF2176CB27200798745 - 67833F7E19F8990D00DBE7AA - 67833F7F19F8990D00DBE7AA - E4F76DF3176CB27200798745 - E4F76DF4176CB27200798745 - E4F76DF5176CB27200798745 - E4F76DF6176CB27200798745 - E4F76DF7176CB27200798745 - E4F76DF8176CB27200798745 - E4F76DF9176CB27200798745 - E4F76DFA176CB27200798745 - E4F76DFB176CB27200798745 - 67833F8019F8990D00DBE7AA - 67833F8119F8990D00DBE7AA - 67833F8219F8990D00DBE7AA - E4F76DFC176CB27200798745 - E4F76DFD176CB27200798745 - E4F76DFE176CB27200798745 - E4F76DFF176CB27200798745 - 67509ABA17979781003A3A29 - 67509ABB17979781003A3A29 - - isa - PBXGroup - path - utils - sourceTree - <group> - - E4F76DF0176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofConstants.h - sourceTree - <group> - - E4F76DF1176CB27200798745 - - explicitFileType - sourcecode.cpp.objcpp.preprocessed - fileEncoding - 4 - isa - PBXFileReference - path - ofFileUtils.cpp - sourceTree - <group> - - E4F76DF2176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofFileUtils.h - sourceTree - <group> - - E4F76DF3176CB27200798745 - - explicitFileType - sourcecode.cpp.objcpp.preprocessed - fileEncoding - 4 - isa - PBXFileReference - path - ofLog.cpp - sourceTree - <group> - - E4F76DF4176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofLog.h - sourceTree - <group> - - E4F76DF5176CB27200798745 - - explicitFileType - sourcecode.cpp.objcpp.preprocessed - fileEncoding - 4 - isa - PBXFileReference - path - ofMatrixStack.cpp - sourceTree - <group> - - E4F76DF6176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofMatrixStack.h - sourceTree - <group> - - E4F76DF7176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofNoise.h - sourceTree - <group> - - E4F76DF8176CB27200798745 - - explicitFileType - sourcecode.cpp.objcpp.preprocessed - fileEncoding - 4 - isa - PBXFileReference - path - ofSystemUtils.cpp - sourceTree - <group> - - E4F76DF9176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofSystemUtils.h - sourceTree - <group> - - E4F76DFA176CB27200798745 - - explicitFileType - sourcecode.cpp.objcpp.preprocessed - fileEncoding - 4 - isa - PBXFileReference - path - ofThread.cpp - sourceTree - <group> - - E4F76DFB176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofThread.h - sourceTree - <group> - - E4F76DFC176CB27200798745 - - explicitFileType - sourcecode.cpp.objcpp.preprocessed - fileEncoding - 4 - isa - PBXFileReference - path - ofURLFileLoader.cpp - sourceTree - <group> - - E4F76DFD176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofURLFileLoader.h - sourceTree - <group> - - E4F76DFE176CB27200798745 - - explicitFileType - sourcecode.cpp.objcpp.preprocessed - fileEncoding - 4 - isa - PBXFileReference - path - ofUtils.cpp - sourceTree - <group> - - E4F76DFF176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofUtils.h - sourceTree - <group> - - E4F76E00176CB27200798745 - - children - - E4F76E15176CB27200798745 - E4F76E16176CB27200798745 - E4F76E17176CB27200798745 - E4F76E18176CB27200798745 - - isa - PBXGroup - path - video - sourceTree - <group> - - E4F76E15176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - ofVideoGrabber.cpp - sourceTree - <group> - - E4F76E16176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofVideoGrabber.h - sourceTree - <group> - - E4F76E17176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.cpp - path - ofVideoPlayer.cpp - sourceTree - <group> - - E4F76E18176CB27200798745 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ofVideoPlayer.h - sourceTree - <group> - - E4F76E19176CB27200798745 - - fileRef - E4F76D6F176CB27200798745 - isa - PBXBuildFile - - E4F76E1A176CB27200798745 - - fileRef - E4F76D70176CB27200798745 - isa - PBXBuildFile - - E4F76E1B176CB27200798745 - - fileRef - E4F76D71176CB27200798745 - isa - PBXBuildFile - - E4F76E1C176CB27200798745 - - fileRef - E4F76D72176CB27200798745 - isa - PBXBuildFile - - E4F76E1D176CB27200798745 - - fileRef - E4F76D73176CB27200798745 - isa - PBXBuildFile - - E4F76E1E176CB27200798745 - - fileRef - E4F76D74176CB27200798745 - isa - PBXBuildFile - - E4F76E1F176CB27200798745 - - fileRef - E4F76D75176CB27200798745 - isa - PBXBuildFile - - E4F76E20176CB27200798745 - - fileRef - E4F76D76176CB27200798745 - isa - PBXBuildFile - - E4F76E22176CB27200798745 - - fileRef - E4F76D78176CB27200798745 - isa - PBXBuildFile - - E4F76E23176CB27200798745 - - fileRef - E4F76D79176CB27200798745 - isa - PBXBuildFile - - E4F76E24176CB27200798745 - - fileRef - E4F76D7A176CB27200798745 - isa - PBXBuildFile - - E4F76E25176CB27200798745 - - fileRef - E4F76D7C176CB27200798745 - isa - PBXBuildFile - - E4F76E2E176CB27200798745 - - fileRef - E4F76D85176CB27200798745 - isa - PBXBuildFile - - E4F76E2F176CB27200798745 - - fileRef - E4F76D86176CB27200798745 - isa - PBXBuildFile - - E4F76E30176CB27200798745 - - fileRef - E4F76D87176CB27200798745 - isa - PBXBuildFile - - E4F76E36176CB27200798745 - - fileRef - E4F76D8F176CB27200798745 - isa - PBXBuildFile - - E4F76E37176CB27200798745 - - fileRef - E4F76D90176CB27200798745 - isa - PBXBuildFile - - E4F76E38176CB27200798745 - - fileRef - E4F76D91176CB27200798745 - isa - PBXBuildFile - - E4F76E39176CB27200798745 - - fileRef - E4F76D93176CB27200798745 - isa - PBXBuildFile - - E4F76E3A176CB27200798745 - - fileRef - E4F76D94176CB27200798745 - isa - PBXBuildFile - - E4F76E3B176CB27200798745 - - fileRef - E4F76D95176CB27200798745 - isa - PBXBuildFile - - E4F76E3C176CB27200798745 - - fileRef - E4F76D96176CB27200798745 - isa - PBXBuildFile - - E4F76E3D176CB27200798745 - - fileRef - E4F76D97176CB27200798745 - isa - PBXBuildFile - - E4F76E3E176CB27200798745 - - fileRef - E4F76D98176CB27200798745 - isa - PBXBuildFile - - E4F76E3F176CB27200798745 - - fileRef - E4F76D99176CB27200798745 - isa - PBXBuildFile - - E4F76E40176CB27200798745 - - fileRef - E4F76D9A176CB27200798745 - isa - PBXBuildFile - - E4F76E41176CB27200798745 - - fileRef - E4F76D9B176CB27200798745 - isa - PBXBuildFile - - E4F76E42176CB27200798745 - - fileRef - E4F76D9C176CB27200798745 - isa - PBXBuildFile - - E4F76E43176CB27200798745 - - fileRef - E4F76D9D176CB27200798745 - isa - PBXBuildFile - - E4F76E44176CB27200798745 - - fileRef - E4F76D9E176CB27200798745 - isa - PBXBuildFile - - E4F76E45176CB27200798745 - - fileRef - E4F76D9F176CB27200798745 - isa - PBXBuildFile - - E4F76E46176CB27200798745 - - fileRef - E4F76DA0176CB27200798745 - isa - PBXBuildFile - - E4F76E49176CB27200798745 - - fileRef - E4F76DA3176CB27200798745 - isa - PBXBuildFile - - E4F76E4A176CB27200798745 - - fileRef - E4F76DA4176CB27200798745 - isa - PBXBuildFile - - E4F76E4B176CB27200798745 - - fileRef - E4F76DA5176CB27200798745 - isa - PBXBuildFile - - E4F76E4C176CB27200798745 - - fileRef - E4F76DA6176CB27200798745 - isa - PBXBuildFile - - E4F76E4D176CB27200798745 - - fileRef - E4F76DA7176CB27200798745 - isa - PBXBuildFile - - E4F76E4E176CB27200798745 - - fileRef - E4F76DA8176CB27200798745 - isa - PBXBuildFile - - E4F76E4F176CB27200798745 - - fileRef - E4F76DAA176CB27200798745 - isa - PBXBuildFile - - E4F76E50176CB27200798745 - - fileRef - E4F76DAB176CB27200798745 - isa - PBXBuildFile - - E4F76E51176CB27200798745 - - fileRef - E4F76DAC176CB27200798745 - isa - PBXBuildFile - - E4F76E52176CB27200798745 - - fileRef - E4F76DAD176CB27200798745 - isa - PBXBuildFile - - E4F76E55176CB27200798745 - - fileRef - E4F76DB0176CB27200798745 - isa - PBXBuildFile - - E4F76E56176CB27200798745 - - fileRef - E4F76DB1176CB27200798745 - isa - PBXBuildFile - - E4F76E57176CB27200798745 - - fileRef - E4F76DB2176CB27200798745 - isa - PBXBuildFile - - E4F76E58176CB27200798745 - - fileRef - E4F76DB3176CB27200798745 - isa - PBXBuildFile - - E4F76E59176CB27200798745 - - fileRef - E4F76DB4176CB27200798745 - isa - PBXBuildFile - - E4F76E5A176CB27200798745 - - fileRef - E4F76DB5176CB27200798745 - isa - PBXBuildFile - - E4F76E5B176CB27200798745 - - fileRef - E4F76DB6176CB27200798745 - isa - PBXBuildFile - - E4F76E5C176CB27200798745 - - fileRef - E4F76DB7176CB27200798745 - isa - PBXBuildFile - - E4F76E5E176CB27200798745 - - fileRef - E4F76DB9176CB27200798745 - isa - PBXBuildFile - - E4F76E5F176CB27200798745 - - fileRef - E4F76DBA176CB27200798745 - isa - PBXBuildFile - - E4F76E60176CB27200798745 - - fileRef - E4F76DBB176CB27200798745 - isa - PBXBuildFile - - E4F76E61176CB27200798745 - - fileRef - E4F76DBC176CB27200798745 - isa - PBXBuildFile - - E4F76E62176CB27200798745 - - fileRef - E4F76DBD176CB27200798745 - isa - PBXBuildFile - - E4F76E63176CB27200798745 - - fileRef - E4F76DBE176CB27200798745 - isa - PBXBuildFile - - E4F76E64176CB27200798745 - - fileRef - E4F76DBF176CB27200798745 - isa - PBXBuildFile - - E4F76E65176CB27200798745 - - fileRef - E4F76DC1176CB27200798745 - isa - PBXBuildFile - - E4F76E66176CB27200798745 - - fileRef - E4F76DC2176CB27200798745 - isa - PBXBuildFile - - E4F76E67176CB27200798745 - - fileRef - E4F76DC3176CB27200798745 - isa - PBXBuildFile - - E4F76E68176CB27200798745 - - fileRef - E4F76DC4176CB27200798745 - isa - PBXBuildFile - - E4F76E69176CB27200798745 - - fileRef - E4F76DC5176CB27200798745 - isa - PBXBuildFile - - E4F76E6A176CB27200798745 - - fileRef - E4F76DC6176CB27200798745 - isa - PBXBuildFile - - E4F76E6B176CB27200798745 - - fileRef - E4F76DC7176CB27200798745 - isa - PBXBuildFile - - E4F76E6C176CB27200798745 - - fileRef - E4F76DC8176CB27200798745 - isa - PBXBuildFile - - E4F76E6D176CB27200798745 - - fileRef - E4F76DC9176CB27200798745 - isa - PBXBuildFile - - E4F76E6E176CB27200798745 - - fileRef - E4F76DCA176CB27200798745 - isa - PBXBuildFile - - E4F76E6F176CB27200798745 - - fileRef - E4F76DCB176CB27200798745 - isa - PBXBuildFile - - E4F76E70176CB27200798745 - - fileRef - E4F76DCC176CB27200798745 - isa - PBXBuildFile - - E4F76E71176CB27200798745 - - fileRef - E4F76DCD176CB27200798745 - isa - PBXBuildFile - - E4F76E72176CB27200798745 - - fileRef - E4F76DCE176CB27200798745 - isa - PBXBuildFile - - E4F76E73176CB27200798745 - - fileRef - E4F76DCF176CB27200798745 - isa - PBXBuildFile - - E4F76E80176CB27200798745 - - fileRef - E4F76DDD176CB27200798745 - isa - PBXBuildFile - - E4F76E81176CB27200798745 - - fileRef - E4F76DDE176CB27200798745 - isa - PBXBuildFile - - E4F76E82176CB27200798745 - - fileRef - E4F76DDF176CB27200798745 - isa - PBXBuildFile - - E4F76E83176CB27200798745 - - fileRef - E4F76DE0176CB27200798745 - isa - PBXBuildFile - - E4F76E84176CB27200798745 - - fileRef - E4F76DE2176CB27200798745 - isa - PBXBuildFile - - E4F76E86176CB27200798745 - - fileRef - E4F76DE4176CB27200798745 - isa - PBXBuildFile - - E4F76E87176CB27200798745 - - fileRef - E4F76DE5176CB27200798745 - isa - PBXBuildFile - - E4F76E88176CB27200798745 - - fileRef - E4F76DE6176CB27200798745 - isa - PBXBuildFile - - E4F76E89176CB27200798745 - - fileRef - E4F76DE7176CB27200798745 - isa - PBXBuildFile - - E4F76E8A176CB27200798745 - - fileRef - E4F76DE8176CB27200798745 - isa - PBXBuildFile - - E4F76E8B176CB27200798745 - - fileRef - E4F76DE9176CB27200798745 - isa - PBXBuildFile - - E4F76E8D176CB27200798745 - - fileRef - E4F76DEB176CB27200798745 - isa - PBXBuildFile - - E4F76E8E176CB27200798745 - - fileRef - E4F76DEC176CB27200798745 - isa - PBXBuildFile - - E4F76E8F176CB27200798745 - - fileRef - E4F76DED176CB27200798745 - isa - PBXBuildFile - - E4F76E90176CB27200798745 - - fileRef - E4F76DEE176CB27200798745 - isa - PBXBuildFile - - E4F76E91176CB27200798745 - - fileRef - E4F76DF0176CB27200798745 - isa - PBXBuildFile - - E4F76E92176CB27200798745 - - fileRef - E4F76DF1176CB27200798745 - isa - PBXBuildFile - - E4F76E93176CB27200798745 - - fileRef - E4F76DF2176CB27200798745 - isa - PBXBuildFile - - E4F76E94176CB27200798745 - - fileRef - E4F76DF3176CB27200798745 - isa - PBXBuildFile - - E4F76E95176CB27200798745 - - fileRef - E4F76DF4176CB27200798745 - isa - PBXBuildFile - - E4F76E96176CB27200798745 - - fileRef - E4F76DF5176CB27200798745 - isa - PBXBuildFile - - E4F76E97176CB27200798745 - - fileRef - E4F76DF6176CB27200798745 - isa - PBXBuildFile - - E4F76E98176CB27200798745 - - fileRef - E4F76DF7176CB27200798745 - isa - PBXBuildFile - - E4F76E99176CB27200798745 - - fileRef - E4F76DF8176CB27200798745 - isa - PBXBuildFile - - E4F76E9A176CB27200798745 - - fileRef - E4F76DF9176CB27200798745 - isa - PBXBuildFile - - E4F76E9B176CB27200798745 - - fileRef - E4F76DFA176CB27200798745 - isa - PBXBuildFile - - E4F76E9C176CB27200798745 - - fileRef - E4F76DFB176CB27200798745 - isa - PBXBuildFile - - E4F76E9D176CB27200798745 - - fileRef - E4F76DFC176CB27200798745 - isa - PBXBuildFile - - E4F76E9E176CB27200798745 - - fileRef - E4F76DFD176CB27200798745 - isa - PBXBuildFile - - E4F76E9F176CB27200798745 - - fileRef - E4F76DFE176CB27200798745 - isa - PBXBuildFile - - E4F76EA0176CB27200798745 - - fileRef - E4F76DFF176CB27200798745 - isa - PBXBuildFile - - E4F76EB5176CB27200798745 - - fileRef - E4F76E15176CB27200798745 - isa - PBXBuildFile - - E4F76EB6176CB27200798745 - - fileRef - E4F76E16176CB27200798745 - isa - PBXBuildFile - - E4F76EB7176CB27200798745 - - fileRef - E4F76E17176CB27200798745 - isa - PBXBuildFile - - E4F76EB8176CB27200798745 - - fileRef - E4F76E18176CB27200798745 - isa - PBXBuildFile - - - rootObject - 29B97313FDCFA39411CA2CEA - - +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 52; + objects = { + +/* Begin PBXBuildFile section */ + 15594F0C15C55AC900727FF2 /* EAGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = 15594F0515C55AC900727FF2 /* EAGLView.m */; }; + 15594F0D15C55AC900727FF2 /* ES1Renderer.m in Sources */ = {isa = PBXBuildFile; fileRef = 15594F0615C55AC900727FF2 /* ES1Renderer.m */; }; + 15594F0E15C55AC900727FF2 /* ES2Renderer.m in Sources */ = {isa = PBXBuildFile; fileRef = 15594F0715C55AC900727FF2 /* ES2Renderer.m */; }; + 15594F0F15C55AC900727FF2 /* EAGLView.h in Headers */ = {isa = PBXBuildFile; fileRef = 15594F0815C55AC900727FF2 /* EAGLView.h */; }; + 15594F1015C55AC900727FF2 /* ES1Renderer.h in Headers */ = {isa = PBXBuildFile; fileRef = 15594F0915C55AC900727FF2 /* ES1Renderer.h */; }; + 15594F1115C55AC900727FF2 /* ES2Renderer.h in Headers */ = {isa = PBXBuildFile; fileRef = 15594F0A15C55AC900727FF2 /* ES2Renderer.h */; }; + 15594F1215C55AC900727FF2 /* ESRenderer.h in Headers */ = {isa = PBXBuildFile; fileRef = 15594F0B15C55AC900727FF2 /* ESRenderer.h */; }; + 15594F8115C5697C00727FF2 /* ofAppiOSWindow.mm in Sources */ = {isa = PBXBuildFile; fileRef = 15594F7815C5697C00727FF2 /* ofAppiOSWindow.mm */; }; + 15594F8515C5697C00727FF2 /* ofAppiOSWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = 15594F7C15C5697C00727FF2 /* ofAppiOSWindow.h */; }; + 15594F8715C5697C00727FF2 /* ofxiOSApp.h in Headers */ = {isa = PBXBuildFile; fileRef = 15594F7E15C5697C00727FF2 /* ofxiOSApp.h */; }; + 15594F9115C56A8A00727FF2 /* ofxiOSEAGLView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 15594F8B15C56A8A00727FF2 /* ofxiOSEAGLView.mm */; }; + 15594F9215C56A8A00727FF2 /* ofxiOSAppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 15594F8C15C56A8A00727FF2 /* ofxiOSAppDelegate.mm */; }; + 15594F9315C56A8A00727FF2 /* ofxiOSViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 15594F8D15C56A8A00727FF2 /* ofxiOSViewController.mm */; }; + 15594F9415C56A8A00727FF2 /* ofxiOSEAGLView.h in Headers */ = {isa = PBXBuildFile; fileRef = 15594F8E15C56A8A00727FF2 /* ofxiOSEAGLView.h */; }; + 15594F9515C56A8A00727FF2 /* ofxiOSAppDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 15594F8F15C56A8A00727FF2 /* ofxiOSAppDelegate.h */; }; + 15594F9615C56A8A00727FF2 /* ofxiOSViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 15594F9015C56A8A00727FF2 /* ofxiOSViewController.h */; }; + 15594FA315C56BB700727FF2 /* AVFoundationVideoGrabber.mm in Sources */ = {isa = PBXBuildFile; fileRef = 15594F9F15C56BB700727FF2 /* AVFoundationVideoGrabber.mm */; }; + 15594FA415C56BB700727FF2 /* AVFoundationVideoPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 15594FA015C56BB700727FF2 /* AVFoundationVideoPlayer.m */; }; + 15594FA515C56BB700727FF2 /* AVFoundationVideoGrabber.h in Headers */ = {isa = PBXBuildFile; fileRef = 15594FA115C56BB700727FF2 /* AVFoundationVideoGrabber.h */; }; + 15594FA615C56BB700727FF2 /* AVFoundationVideoPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 15594FA215C56BB700727FF2 /* AVFoundationVideoPlayer.h */; }; + 15594FAC15C56C9500727FF2 /* ofxiOSAlerts.mm in Sources */ = {isa = PBXBuildFile; fileRef = 15594FA815C56C9500727FF2 /* ofxiOSAlerts.mm */; }; + 15594FAD15C56C9500727FF2 /* ofxiOSAlerts.h in Headers */ = {isa = PBXBuildFile; fileRef = 15594FA915C56C9500727FF2 /* ofxiOSAlerts.h */; }; + 15594FAE15C56C9500727FF2 /* ofxiOSAlertsListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 15594FAA15C56C9500727FF2 /* ofxiOSAlertsListener.h */; }; + 15594FBE15C56D1E00727FF2 /* ofxiOSCoreLocation.mm in Sources */ = {isa = PBXBuildFile; fileRef = 15594FAF15C56D1E00727FF2 /* ofxiOSCoreLocation.mm */; }; + 15594FBF15C56D1E00727FF2 /* ofxiOSExternalDisplay.mm in Sources */ = {isa = PBXBuildFile; fileRef = 15594FB015C56D1E00727FF2 /* ofxiOSExternalDisplay.mm */; }; + 15594FC015C56D1E00727FF2 /* ofxiOSExtras.mm in Sources */ = {isa = PBXBuildFile; fileRef = 15594FB115C56D1E00727FF2 /* ofxiOSExtras.mm */; }; + 15594FC115C56D1E00727FF2 /* ofxiOSImagePicker.mm in Sources */ = {isa = PBXBuildFile; fileRef = 15594FB215C56D1E00727FF2 /* ofxiOSImagePicker.mm */; }; + 15594FC215C56D1E00727FF2 /* ofxiOSKeyboard.mm in Sources */ = {isa = PBXBuildFile; fileRef = 15594FB315C56D1E00727FF2 /* ofxiOSKeyboard.mm */; }; + 15594FC315C56D1E00727FF2 /* ofxiOSMapKit.mm in Sources */ = {isa = PBXBuildFile; fileRef = 15594FB415C56D1E00727FF2 /* ofxiOSMapKit.mm */; }; + 15594FC415C56D1E00727FF2 /* ofxiOSMapKitDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 15594FB515C56D1E00727FF2 /* ofxiOSMapKitDelegate.mm */; }; + 15594FC515C56D1E00727FF2 /* ofxiOSCoreLocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 15594FB615C56D1E00727FF2 /* ofxiOSCoreLocation.h */; }; + 15594FC615C56D1E00727FF2 /* ofxiOSExternalDisplay.h in Headers */ = {isa = PBXBuildFile; fileRef = 15594FB715C56D1E00727FF2 /* ofxiOSExternalDisplay.h */; }; + 15594FC715C56D1E00727FF2 /* ofxiOSExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 15594FB815C56D1E00727FF2 /* ofxiOSExtras.h */; }; + 15594FC815C56D1E00727FF2 /* ofxiOSImagePicker.h in Headers */ = {isa = PBXBuildFile; fileRef = 15594FB915C56D1E00727FF2 /* ofxiOSImagePicker.h */; }; + 15594FC915C56D1E00727FF2 /* ofxiOSKeyboard.h in Headers */ = {isa = PBXBuildFile; fileRef = 15594FBA15C56D1E00727FF2 /* ofxiOSKeyboard.h */; }; + 15594FCA15C56D1E00727FF2 /* ofxiOSMapKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 15594FBB15C56D1E00727FF2 /* ofxiOSMapKit.h */; }; + 15594FCB15C56D1E00727FF2 /* ofxiOSMapKitDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 15594FBC15C56D1E00727FF2 /* ofxiOSMapKitDelegate.h */; }; + 15594FCC15C56D1E00727FF2 /* ofxiOSMapKitListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 15594FBD15C56D1E00727FF2 /* ofxiOSMapKitListener.h */; }; + 1594366415CF5F420087B684 /* ofxiOSVideoGrabber.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1594366015CF5F420087B684 /* ofxiOSVideoGrabber.mm */; }; + 1594366515CF5F420087B684 /* ofxiOSVideoPlayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1594366115CF5F420087B684 /* ofxiOSVideoPlayer.mm */; }; + 1594366615CF5F420087B684 /* ofxiOSVideoGrabber.h in Headers */ = {isa = PBXBuildFile; fileRef = 1594366215CF5F420087B684 /* ofxiOSVideoGrabber.h */; }; + 1594366715CF5F420087B684 /* ofxiOSVideoPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1594366315CF5F420087B684 /* ofxiOSVideoPlayer.h */; }; + 53DA338A12DF8F4500C622CE /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 53DA338912DF8F4500C622CE /* AVFoundation.framework */; }; + 53DA338E12DF8F5000C622CE /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 53DA338D12DF8F5000C622CE /* CoreAudio.framework */; }; + 53DA339012DF8F5000C622CE /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 53DA338F12DF8F5000C622CE /* CoreMedia.framework */; }; + 53DA339212DF8F5000C622CE /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 53DA339112DF8F5000C622CE /* CoreVideo.framework */; }; + 5E2E99DD10ED147800587639 /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E2E99DC10ED147800587639 /* MapKit.framework */; }; + 6678E97619FEB2DF00C00581 /* ofSoundBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6678E97219FEB2DF00C00581 /* ofSoundBuffer.cpp */; }; + 6678E97719FEB2DF00C00581 /* ofSoundBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 6678E97319FEB2DF00C00581 /* ofSoundBuffer.h */; }; + 6678E97819FEB2DF00C00581 /* ofSoundUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 6678E97419FEB2DF00C00581 /* ofSoundUtils.h */; }; + 66EA462B17A6D396009BB12A /* ofxOpenALSoundPlayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 66EA462717A6D396009BB12A /* ofxOpenALSoundPlayer.cpp */; }; + 66EA462C17A6D396009BB12A /* ofxOpenALSoundPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 66EA462817A6D396009BB12A /* ofxOpenALSoundPlayer.h */; }; + 66EA462D17A6D396009BB12A /* SoundEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 66EA462917A6D396009BB12A /* SoundEngine.cpp */; }; + 66EA462E17A6D396009BB12A /* SoundEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 66EA462A17A6D396009BB12A /* SoundEngine.h */; }; + 671C0AF41770246200DF03B3 /* AVSoundPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 671C0AF01770246200DF03B3 /* AVSoundPlayer.h */; }; + 671C0AF51770246200DF03B3 /* AVSoundPlayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 671C0AF11770246200DF03B3 /* AVSoundPlayer.m */; }; + 671C0AF61770246200DF03B3 /* ofxiOSSoundPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 671C0AF21770246200DF03B3 /* ofxiOSSoundPlayer.h */; }; + 671C0AF71770246200DF03B3 /* ofxiOSSoundPlayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 671C0AF31770246200DF03B3 /* ofxiOSSoundPlayer.mm */; }; + 67509ABC17979781003A3A29 /* ofXml.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 67509ABA17979781003A3A29 /* ofXml.cpp */; }; + 67509ABD17979781003A3A29 /* ofXml.h in Headers */ = {isa = PBXBuildFile; fileRef = 67509ABB17979781003A3A29 /* ofXml.h */; }; + 67833F8319F8990D00DBE7AA /* ofFpsCounter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 67833F7E19F8990D00DBE7AA /* ofFpsCounter.cpp */; }; + 67833F8419F8990D00DBE7AA /* ofFpsCounter.h in Headers */ = {isa = PBXBuildFile; fileRef = 67833F7F19F8990D00DBE7AA /* ofFpsCounter.h */; }; + 67833F8519F8990D00DBE7AA /* ofThreadChannel.h in Headers */ = {isa = PBXBuildFile; fileRef = 67833F8019F8990D00DBE7AA /* ofThreadChannel.h */; }; + 67833F8619F8990D00DBE7AA /* ofTimer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 67833F8119F8990D00DBE7AA /* ofTimer.cpp */; }; + 67833F8719F8990D00DBE7AA /* ofTimer.h in Headers */ = {isa = PBXBuildFile; fileRef = 67833F8219F8990D00DBE7AA /* ofTimer.h */; }; + 67833F8A19F8996300DBE7AA /* ofBufferObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 67833F8819F8996300DBE7AA /* ofBufferObject.cpp */; }; + 67833F8B19F8996300DBE7AA /* ofBufferObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 67833F8919F8996300DBE7AA /* ofBufferObject.h */; }; + 678C3D23176F04F800D1CC68 /* ofxiOSSoundStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 678C3D19176F04F800D1CC68 /* ofxiOSSoundStream.h */; }; + 678C3D24176F04F800D1CC68 /* ofxiOSSoundStream.mm in Sources */ = {isa = PBXBuildFile; fileRef = 678C3D1A176F04F800D1CC68 /* ofxiOSSoundStream.mm */; }; + 678C3D25176F04F800D1CC68 /* ofxiOSSoundStreamDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 678C3D1B176F04F800D1CC68 /* ofxiOSSoundStreamDelegate.h */; }; + 678C3D26176F04F800D1CC68 /* ofxiOSSoundStreamDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 678C3D1C176F04F800D1CC68 /* ofxiOSSoundStreamDelegate.mm */; }; + 678C3D27176F04F800D1CC68 /* SoundInputStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 678C3D1D176F04F800D1CC68 /* SoundInputStream.h */; }; + 678C3D28176F04F800D1CC68 /* SoundInputStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 678C3D1E176F04F800D1CC68 /* SoundInputStream.m */; }; + 678C3D29176F04F800D1CC68 /* SoundOutputStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 678C3D1F176F04F800D1CC68 /* SoundOutputStream.h */; }; + 678C3D2A176F04F800D1CC68 /* SoundOutputStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 678C3D20176F04F800D1CC68 /* SoundOutputStream.m */; }; + 678C3D2B176F04F800D1CC68 /* SoundStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 678C3D21176F04F800D1CC68 /* SoundStream.h */; }; + 678C3D2C176F04F800D1CC68 /* SoundStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 678C3D22176F04F800D1CC68 /* SoundStream.m */; }; + 67D48ED01C10399900F719BC /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 67D48ECF1C10399900F719BC /* CoreMotion.framework */; }; + 67D48ED31C103BAE00F719BC /* ofxiOSCoreMotion.h in Headers */ = {isa = PBXBuildFile; fileRef = 67D48ED11C103BAE00F719BC /* ofxiOSCoreMotion.h */; }; + 67D48ED41C103BAE00F719BC /* ofxiOSCoreMotion.mm in Sources */ = {isa = PBXBuildFile; fileRef = 67D48ED21C103BAE00F719BC /* ofxiOSCoreMotion.mm */; }; + 69433CC31FE45BAC004D5B73 /* ofBaseApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 69433CC21FE45BAC004D5B73 /* ofBaseApp.cpp */; }; + 69433CC51FE45BB7004D5B73 /* ofGLBaseTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 69433CC41FE45BB7004D5B73 /* ofGLBaseTypes.h */; }; + 69433CCA1FE45BCD004D5B73 /* ofGraphicsBaseTypes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 69433CC61FE45BCD004D5B73 /* ofGraphicsBaseTypes.cpp */; }; + 69433CCB1FE45BCD004D5B73 /* ofGraphicsBaseTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 69433CC71FE45BCD004D5B73 /* ofGraphicsBaseTypes.h */; }; + 69433CCC1FE45BCD004D5B73 /* ofGraphicsConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 69433CC81FE45BCD004D5B73 /* ofGraphicsConstants.h */; }; + 69433CD01FE45BF2004D5B73 /* ofSoundBaseTypes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 69433CCE1FE45BF2004D5B73 /* ofSoundBaseTypes.cpp */; }; + 69433CD11FE45BF2004D5B73 /* ofSoundBaseTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 69433CCF1FE45BF2004D5B73 /* ofSoundBaseTypes.h */; }; + 69433CD31FE45E41004D5B73 /* ofMathConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = 69433CD21FE45E41004D5B73 /* ofMathConstants.h */; }; + 860B024D17A96D840032B827 /* ofxiOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 860B024C17A96D840032B827 /* ofxiOS.h */; }; + 90080014204EDA1300DC786A /* ofxiOSGLKViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 90080013204EDA1300DC786A /* ofxiOSGLKViewController.mm */; }; + 90080016204EDA4B00DC786A /* ofxiOSGLKViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 90080015204EDA4600DC786A /* ofxiOSGLKViewController.h */; }; + 90080019204EDB5500DC786A /* ofxiOSGLKView.h in Headers */ = {isa = PBXBuildFile; fileRef = 90080017204EDB5500DC786A /* ofxiOSGLKView.h */; }; + 9008001A204EDB5500DC786A /* ofxiOSGLKView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 90080018204EDB5500DC786A /* ofxiOSGLKView.mm */; }; + 9008001D204EDC0F00DC786A /* EAGLKView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9008001B204EDC0E00DC786A /* EAGLKView.m */; }; + 9008001E204EDC0F00DC786A /* EAGLKView.h in Headers */ = {isa = PBXBuildFile; fileRef = 9008001C204EDC0F00DC786A /* EAGLKView.h */; }; + 901808B9205362D7004A7774 /* GLKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 901808B8205362D7004A7774 /* GLKit.framework */; }; + 9252B7F11CDA2A6100A8032B /* ofxiOSEventAdapter.h in Headers */ = {isa = PBXBuildFile; fileRef = 9252B7EF1CDA2A6100A8032B /* ofxiOSEventAdapter.h */; }; + 9252B7F21CDA2A6100A8032B /* ofxiOSEventAdapter.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9252B7F01CDA2A6100A8032B /* ofxiOSEventAdapter.mm */; }; + 9957D8701BDDCD440002D53C /* ofEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 9957D86F1BDDCD440002D53C /* ofEvent.h */; }; + 99752D331BF21EEE0026316A /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 99752D321BF21EEE0026316A /* GameController.framework */; }; + 9979E8181A1B9883007E55D1 /* ofWindowSettings.h in Headers */ = {isa = PBXBuildFile; fileRef = 9979E8171A1B9883007E55D1 /* ofWindowSettings.h */; }; + 9979E8281A1CDBD4007E55D1 /* ofMainLoop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9979E8261A1CDBD4007E55D1 /* ofMainLoop.cpp */; }; + 9979E8291A1CDBD4007E55D1 /* ofMainLoop.h in Headers */ = {isa = PBXBuildFile; fileRef = 9979E8271A1CDBD4007E55D1 /* ofMainLoop.h */; }; + BB24DECA10DA7A3F00E9C588 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBE5EAB70F49AD8400F28951 /* AudioToolbox.framework */; }; + BB24DECB10DA7A3F00E9C588 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BB16EBD10F2B2A9500518274 /* OpenGLES.framework */; }; + BB24DECC10DA7A3F00E9C588 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; + BB24DECD10DA7A3F00E9C588 /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 53F323EA10A20EDB00E0DAE4 /* OpenAL.framework */; }; + BB24DECE10DA7A3F00E9C588 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; + BB24DECF10DA7A3F00E9C588 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765FC0DF74451002DB57D /* CoreGraphics.framework */; }; + BB24DED010DA7A3F00E9C588 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5326AEA710A23A0500278DE6 /* CoreLocation.framework */; }; + BB24DED110DA7A3F00E9C588 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BB16EBD80F2B2AB500518274 /* QuartzCore.framework */; }; + BF3679A4282B97EF004FD612 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF3679A3282B97EF004FD612 /* Metal.framework */; }; + BF3679AE282BB806004FD612 /* MetalANGLE.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF3679AD282BB806004FD612 /* MetalANGLE.framework */; platformFilter = ios; }; + BF3679B9282BBBB9004FD612 /* ofxiOSMLKView.h in Headers */ = {isa = PBXBuildFile; fileRef = BF3679B3282BBBB9004FD612 /* ofxiOSMLKView.h */; }; + BF3679BA282BBBB9004FD612 /* ofxiOSMLKView.mm in Sources */ = {isa = PBXBuildFile; fileRef = BF3679B4282BBBB9004FD612 /* ofxiOSMLKView.mm */; }; + BF3679BB282BBBB9004FD612 /* ofxiOSViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = BF3679B5282BBBB9004FD612 /* ofxiOSViewController.mm */; }; + BF3679BC282BBBB9004FD612 /* ofxiOSMLKViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = BF3679B6282BBBB9004FD612 /* ofxiOSMLKViewController.h */; }; + BF3679BD282BBBB9004FD612 /* ofxiOSViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = BF3679B7282BBBB9004FD612 /* ofxiOSViewController.h */; }; + BF3679BE282BBBB9004FD612 /* ofxiOSMLKViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = BF3679B8282BBBB9004FD612 /* ofxiOSMLKViewController.mm */; }; + BF3679C2282BBCC4004FD612 /* EAMLKView.h in Headers */ = {isa = PBXBuildFile; fileRef = BF3679C1282BBCB3004FD612 /* EAMLKView.h */; }; + BF3679C3282BBCC4004FD612 /* EAMLKView.m in Sources */ = {isa = PBXBuildFile; fileRef = BF3679C0282BBCB3004FD612 /* EAMLKView.m */; }; + BF41D521282B95D200608DA9 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF41D520282B95D200608DA9 /* Accelerate.framework */; }; + E4F76E19176CB27200798745 /* of3dPrimitives.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76D6F176CB27200798745 /* of3dPrimitives.cpp */; }; + E4F76E1A176CB27200798745 /* of3dPrimitives.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76D70176CB27200798745 /* of3dPrimitives.h */; }; + E4F76E1B176CB27200798745 /* of3dUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76D71176CB27200798745 /* of3dUtils.cpp */; }; + E4F76E1C176CB27200798745 /* of3dUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76D72176CB27200798745 /* of3dUtils.h */; }; + E4F76E1D176CB27200798745 /* ofCamera.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76D73176CB27200798745 /* ofCamera.cpp */; }; + E4F76E1E176CB27200798745 /* ofCamera.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76D74176CB27200798745 /* ofCamera.h */; }; + E4F76E1F176CB27200798745 /* ofEasyCam.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76D75176CB27200798745 /* ofEasyCam.cpp */; }; + E4F76E20176CB27200798745 /* ofEasyCam.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76D76176CB27200798745 /* ofEasyCam.h */; }; + E4F76E22176CB27200798745 /* ofMesh.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76D78176CB27200798745 /* ofMesh.h */; }; + E4F76E23176CB27200798745 /* ofNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76D79176CB27200798745 /* ofNode.cpp */; }; + E4F76E24176CB27200798745 /* ofNode.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76D7A176CB27200798745 /* ofNode.h */; }; + E4F76E25176CB27200798745 /* ofAppBaseWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76D7C176CB27200798745 /* ofAppBaseWindow.h */; }; + E4F76E2E176CB27200798745 /* ofAppRunner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76D85176CB27200798745 /* ofAppRunner.cpp */; }; + E4F76E2F176CB27200798745 /* ofAppRunner.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76D86176CB27200798745 /* ofAppRunner.h */; }; + E4F76E30176CB27200798745 /* ofBaseApp.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76D87176CB27200798745 /* ofBaseApp.h */; }; + E4F76E36176CB27200798745 /* ofEvents.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76D8F176CB27200798745 /* ofEvents.cpp */; }; + E4F76E37176CB27200798745 /* ofEvents.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76D90176CB27200798745 /* ofEvents.h */; }; + E4F76E38176CB27200798745 /* ofEventUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76D91176CB27200798745 /* ofEventUtils.h */; }; + E4F76E39176CB27200798745 /* ofFbo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76D93176CB27200798745 /* ofFbo.cpp */; }; + E4F76E3A176CB27200798745 /* ofFbo.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76D94176CB27200798745 /* ofFbo.h */; }; + E4F76E3B176CB27200798745 /* ofGLProgrammableRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76D95176CB27200798745 /* ofGLProgrammableRenderer.cpp */; }; + E4F76E3C176CB27200798745 /* ofGLProgrammableRenderer.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76D96176CB27200798745 /* ofGLProgrammableRenderer.h */; }; + E4F76E3D176CB27200798745 /* ofGLRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76D97176CB27200798745 /* ofGLRenderer.cpp */; }; + E4F76E3E176CB27200798745 /* ofGLRenderer.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76D98176CB27200798745 /* ofGLRenderer.h */; }; + E4F76E3F176CB27200798745 /* ofGLUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76D99176CB27200798745 /* ofGLUtils.cpp */; }; + E4F76E40176CB27200798745 /* ofGLUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76D9A176CB27200798745 /* ofGLUtils.h */; }; + E4F76E41176CB27200798745 /* ofLight.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76D9B176CB27200798745 /* ofLight.cpp */; }; + E4F76E42176CB27200798745 /* ofLight.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76D9C176CB27200798745 /* ofLight.h */; }; + E4F76E43176CB27200798745 /* ofMaterial.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76D9D176CB27200798745 /* ofMaterial.cpp */; }; + E4F76E44176CB27200798745 /* ofMaterial.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76D9E176CB27200798745 /* ofMaterial.h */; }; + E4F76E45176CB27200798745 /* ofShader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76D9F176CB27200798745 /* ofShader.cpp */; }; + E4F76E46176CB27200798745 /* ofShader.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76DA0176CB27200798745 /* ofShader.h */; }; + E4F76E49176CB27200798745 /* ofTexture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76DA3176CB27200798745 /* ofTexture.cpp */; }; + E4F76E4A176CB27200798745 /* ofTexture.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76DA4176CB27200798745 /* ofTexture.h */; }; + E4F76E4B176CB27200798745 /* ofVbo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76DA5176CB27200798745 /* ofVbo.cpp */; }; + E4F76E4C176CB27200798745 /* ofVbo.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76DA6176CB27200798745 /* ofVbo.h */; }; + E4F76E4D176CB27200798745 /* ofVboMesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76DA7176CB27200798745 /* ofVboMesh.cpp */; }; + E4F76E4E176CB27200798745 /* ofVboMesh.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76DA8176CB27200798745 /* ofVboMesh.h */; }; + E4F76E4F176CB27200798745 /* of3dGraphics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76DAA176CB27200798745 /* of3dGraphics.cpp */; }; + E4F76E50176CB27200798745 /* of3dGraphics.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76DAB176CB27200798745 /* of3dGraphics.h */; }; + E4F76E51176CB27200798745 /* ofBitmapFont.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76DAC176CB27200798745 /* ofBitmapFont.cpp */; }; + E4F76E52176CB27200798745 /* ofBitmapFont.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76DAD176CB27200798745 /* ofBitmapFont.h */; }; + E4F76E55176CB27200798745 /* ofGraphics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76DB0176CB27200798745 /* ofGraphics.cpp */; }; + E4F76E56176CB27200798745 /* ofGraphics.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76DB1176CB27200798745 /* ofGraphics.h */; }; + E4F76E57176CB27200798745 /* ofImage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76DB2176CB27200798745 /* ofImage.cpp */; }; + E4F76E58176CB27200798745 /* ofImage.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76DB3176CB27200798745 /* ofImage.h */; }; + E4F76E59176CB27200798745 /* ofPath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76DB4176CB27200798745 /* ofPath.cpp */; }; + E4F76E5A176CB27200798745 /* ofPath.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76DB5176CB27200798745 /* ofPath.h */; }; + E4F76E5B176CB27200798745 /* ofPixels.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76DB6176CB27200798745 /* ofPixels.cpp */; }; + E4F76E5C176CB27200798745 /* ofPixels.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76DB7176CB27200798745 /* ofPixels.h */; }; + E4F76E5E176CB27200798745 /* ofPolyline.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76DB9176CB27200798745 /* ofPolyline.h */; }; + E4F76E5F176CB27200798745 /* ofRendererCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76DBA176CB27200798745 /* ofRendererCollection.cpp */; }; + E4F76E60176CB27200798745 /* ofRendererCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76DBB176CB27200798745 /* ofRendererCollection.h */; }; + E4F76E61176CB27200798745 /* ofTessellator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76DBC176CB27200798745 /* ofTessellator.cpp */; }; + E4F76E62176CB27200798745 /* ofTessellator.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76DBD176CB27200798745 /* ofTessellator.h */; }; + E4F76E63176CB27200798745 /* ofTrueTypeFont.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76DBE176CB27200798745 /* ofTrueTypeFont.cpp */; }; + E4F76E64176CB27200798745 /* ofTrueTypeFont.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76DBF176CB27200798745 /* ofTrueTypeFont.h */; }; + E4F76E65176CB27200798745 /* ofMath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76DC1176CB27200798745 /* ofMath.cpp */; }; + E4F76E66176CB27200798745 /* ofMath.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76DC2176CB27200798745 /* ofMath.h */; }; + E4F76E67176CB27200798745 /* ofMatrix3x3.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76DC3176CB27200798745 /* ofMatrix3x3.cpp */; }; + E4F76E68176CB27200798745 /* ofMatrix3x3.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76DC4176CB27200798745 /* ofMatrix3x3.h */; }; + E4F76E69176CB27200798745 /* ofMatrix4x4.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76DC5176CB27200798745 /* ofMatrix4x4.cpp */; }; + E4F76E6A176CB27200798745 /* ofMatrix4x4.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76DC6176CB27200798745 /* ofMatrix4x4.h */; }; + E4F76E6B176CB27200798745 /* ofQuaternion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76DC7176CB27200798745 /* ofQuaternion.cpp */; }; + E4F76E6C176CB27200798745 /* ofQuaternion.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76DC8176CB27200798745 /* ofQuaternion.h */; }; + E4F76E6D176CB27200798745 /* ofVec2f.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76DC9176CB27200798745 /* ofVec2f.cpp */; }; + E4F76E6E176CB27200798745 /* ofVec2f.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76DCA176CB27200798745 /* ofVec2f.h */; }; + E4F76E6F176CB27200798745 /* ofVec3f.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76DCB176CB27200798745 /* ofVec3f.h */; }; + E4F76E70176CB27200798745 /* ofVec4f.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76DCC176CB27200798745 /* ofVec4f.cpp */; }; + E4F76E71176CB27200798745 /* ofVec4f.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76DCD176CB27200798745 /* ofVec4f.h */; }; + E4F76E72176CB27200798745 /* ofVectorMath.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76DCE176CB27200798745 /* ofVectorMath.h */; }; + E4F76E73176CB27200798745 /* ofMain.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76DCF176CB27200798745 /* ofMain.h */; }; + E4F76E80176CB27200798745 /* ofSoundPlayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76DDD176CB27200798745 /* ofSoundPlayer.cpp */; }; + E4F76E81176CB27200798745 /* ofSoundPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76DDE176CB27200798745 /* ofSoundPlayer.h */; }; + E4F76E82176CB27200798745 /* ofSoundStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76DDF176CB27200798745 /* ofSoundStream.cpp */; }; + E4F76E83176CB27200798745 /* ofSoundStream.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76DE0176CB27200798745 /* ofSoundStream.h */; }; + E4F76E84176CB27200798745 /* ofBaseTypes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76DE2176CB27200798745 /* ofBaseTypes.cpp */; }; + E4F76E86176CB27200798745 /* ofColor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76DE4176CB27200798745 /* ofColor.cpp */; }; + E4F76E87176CB27200798745 /* ofColor.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76DE5176CB27200798745 /* ofColor.h */; }; + E4F76E88176CB27200798745 /* ofParameter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76DE6176CB27200798745 /* ofParameter.cpp */; }; + E4F76E89176CB27200798745 /* ofParameter.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76DE7176CB27200798745 /* ofParameter.h */; }; + E4F76E8A176CB27200798745 /* ofParameterGroup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76DE8176CB27200798745 /* ofParameterGroup.cpp */; }; + E4F76E8B176CB27200798745 /* ofParameterGroup.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76DE9176CB27200798745 /* ofParameterGroup.h */; }; + E4F76E8D176CB27200798745 /* ofPoint.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76DEB176CB27200798745 /* ofPoint.h */; }; + E4F76E8E176CB27200798745 /* ofRectangle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76DEC176CB27200798745 /* ofRectangle.cpp */; }; + E4F76E8F176CB27200798745 /* ofRectangle.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76DED176CB27200798745 /* ofRectangle.h */; }; + E4F76E90176CB27200798745 /* ofTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76DEE176CB27200798745 /* ofTypes.h */; }; + E4F76E91176CB27200798745 /* ofConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76DF0176CB27200798745 /* ofConstants.h */; }; + E4F76E92176CB27200798745 /* ofFileUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76DF1176CB27200798745 /* ofFileUtils.cpp */; }; + E4F76E93176CB27200798745 /* ofFileUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76DF2176CB27200798745 /* ofFileUtils.h */; }; + E4F76E94176CB27200798745 /* ofLog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76DF3176CB27200798745 /* ofLog.cpp */; }; + E4F76E95176CB27200798745 /* ofLog.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76DF4176CB27200798745 /* ofLog.h */; }; + E4F76E96176CB27200798745 /* ofMatrixStack.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76DF5176CB27200798745 /* ofMatrixStack.cpp */; }; + E4F76E97176CB27200798745 /* ofMatrixStack.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76DF6176CB27200798745 /* ofMatrixStack.h */; }; + E4F76E98176CB27200798745 /* ofNoise.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76DF7176CB27200798745 /* ofNoise.h */; }; + E4F76E99176CB27200798745 /* ofSystemUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76DF8176CB27200798745 /* ofSystemUtils.cpp */; }; + E4F76E9A176CB27200798745 /* ofSystemUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76DF9176CB27200798745 /* ofSystemUtils.h */; }; + E4F76E9B176CB27200798745 /* ofThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76DFA176CB27200798745 /* ofThread.cpp */; }; + E4F76E9C176CB27200798745 /* ofThread.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76DFB176CB27200798745 /* ofThread.h */; }; + E4F76E9D176CB27200798745 /* ofURLFileLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76DFC176CB27200798745 /* ofURLFileLoader.cpp */; }; + E4F76E9E176CB27200798745 /* ofURLFileLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76DFD176CB27200798745 /* ofURLFileLoader.h */; }; + E4F76E9F176CB27200798745 /* ofUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76DFE176CB27200798745 /* ofUtils.cpp */; }; + E4F76EA0176CB27200798745 /* ofUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76DFF176CB27200798745 /* ofUtils.h */; }; + E4F76EB5176CB27200798745 /* ofVideoGrabber.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76E15176CB27200798745 /* ofVideoGrabber.cpp */; }; + E4F76EB6176CB27200798745 /* ofVideoGrabber.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76E16176CB27200798745 /* ofVideoGrabber.h */; }; + E4F76EB7176CB27200798745 /* ofVideoPlayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76E17176CB27200798745 /* ofVideoPlayer.cpp */; }; + E4F76EB8176CB27200798745 /* ofVideoPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76E18176CB27200798745 /* ofVideoPlayer.h */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 15594F0515C55AC900727FF2 /* EAGLView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EAGLView.m; sourceTree = ""; }; + 15594F0615C55AC900727FF2 /* ES1Renderer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ES1Renderer.m; sourceTree = ""; }; + 15594F0715C55AC900727FF2 /* ES2Renderer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ES2Renderer.m; sourceTree = ""; }; + 15594F0815C55AC900727FF2 /* EAGLView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EAGLView.h; sourceTree = ""; }; + 15594F0915C55AC900727FF2 /* ES1Renderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ES1Renderer.h; sourceTree = ""; }; + 15594F0A15C55AC900727FF2 /* ES2Renderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ES2Renderer.h; sourceTree = ""; }; + 15594F0B15C55AC900727FF2 /* ESRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ESRenderer.h; sourceTree = ""; }; + 15594F7815C5697C00727FF2 /* ofAppiOSWindow.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ofAppiOSWindow.mm; sourceTree = ""; }; + 15594F7C15C5697C00727FF2 /* ofAppiOSWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofAppiOSWindow.h; sourceTree = ""; }; + 15594F7E15C5697C00727FF2 /* ofxiOSApp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxiOSApp.h; sourceTree = ""; }; + 15594F8B15C56A8A00727FF2 /* ofxiOSEAGLView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ofxiOSEAGLView.mm; sourceTree = ""; }; + 15594F8C15C56A8A00727FF2 /* ofxiOSAppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ofxiOSAppDelegate.mm; sourceTree = ""; }; + 15594F8D15C56A8A00727FF2 /* ofxiOSViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ofxiOSViewController.mm; sourceTree = ""; }; + 15594F8E15C56A8A00727FF2 /* ofxiOSEAGLView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxiOSEAGLView.h; sourceTree = ""; }; + 15594F8F15C56A8A00727FF2 /* ofxiOSAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxiOSAppDelegate.h; sourceTree = ""; }; + 15594F9015C56A8A00727FF2 /* ofxiOSViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxiOSViewController.h; sourceTree = ""; }; + 15594F9F15C56BB700727FF2 /* AVFoundationVideoGrabber.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AVFoundationVideoGrabber.mm; sourceTree = ""; }; + 15594FA015C56BB700727FF2 /* AVFoundationVideoPlayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AVFoundationVideoPlayer.m; sourceTree = ""; }; + 15594FA115C56BB700727FF2 /* AVFoundationVideoGrabber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AVFoundationVideoGrabber.h; sourceTree = ""; }; + 15594FA215C56BB700727FF2 /* AVFoundationVideoPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AVFoundationVideoPlayer.h; sourceTree = ""; }; + 15594FA815C56C9500727FF2 /* ofxiOSAlerts.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ofxiOSAlerts.mm; sourceTree = ""; }; + 15594FA915C56C9500727FF2 /* ofxiOSAlerts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxiOSAlerts.h; sourceTree = ""; }; + 15594FAA15C56C9500727FF2 /* ofxiOSAlertsListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxiOSAlertsListener.h; sourceTree = ""; }; + 15594FAF15C56D1E00727FF2 /* ofxiOSCoreLocation.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ofxiOSCoreLocation.mm; sourceTree = ""; }; + 15594FB015C56D1E00727FF2 /* ofxiOSExternalDisplay.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ofxiOSExternalDisplay.mm; sourceTree = ""; }; + 15594FB115C56D1E00727FF2 /* ofxiOSExtras.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ofxiOSExtras.mm; sourceTree = ""; }; + 15594FB215C56D1E00727FF2 /* ofxiOSImagePicker.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ofxiOSImagePicker.mm; sourceTree = ""; }; + 15594FB315C56D1E00727FF2 /* ofxiOSKeyboard.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ofxiOSKeyboard.mm; sourceTree = ""; }; + 15594FB415C56D1E00727FF2 /* ofxiOSMapKit.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ofxiOSMapKit.mm; sourceTree = ""; }; + 15594FB515C56D1E00727FF2 /* ofxiOSMapKitDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ofxiOSMapKitDelegate.mm; sourceTree = ""; }; + 15594FB615C56D1E00727FF2 /* ofxiOSCoreLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxiOSCoreLocation.h; sourceTree = ""; }; + 15594FB715C56D1E00727FF2 /* ofxiOSExternalDisplay.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxiOSExternalDisplay.h; sourceTree = ""; }; + 15594FB815C56D1E00727FF2 /* ofxiOSExtras.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxiOSExtras.h; sourceTree = ""; }; + 15594FB915C56D1E00727FF2 /* ofxiOSImagePicker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxiOSImagePicker.h; sourceTree = ""; }; + 15594FBA15C56D1E00727FF2 /* ofxiOSKeyboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxiOSKeyboard.h; sourceTree = ""; }; + 15594FBB15C56D1E00727FF2 /* ofxiOSMapKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxiOSMapKit.h; sourceTree = ""; }; + 15594FBC15C56D1E00727FF2 /* ofxiOSMapKitDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxiOSMapKitDelegate.h; sourceTree = ""; }; + 15594FBD15C56D1E00727FF2 /* ofxiOSMapKitListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxiOSMapKitListener.h; sourceTree = ""; }; + 1594366015CF5F420087B684 /* ofxiOSVideoGrabber.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ofxiOSVideoGrabber.mm; sourceTree = ""; }; + 1594366115CF5F420087B684 /* ofxiOSVideoPlayer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ofxiOSVideoPlayer.mm; sourceTree = ""; }; + 1594366215CF5F420087B684 /* ofxiOSVideoGrabber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxiOSVideoGrabber.h; sourceTree = ""; }; + 1594366315CF5F420087B684 /* ofxiOSVideoPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxiOSVideoPlayer.h; sourceTree = ""; }; + 15BC775215A5C31F00772525 /* ofxiOSExtensions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ofxiOSExtensions.h; sourceTree = ""; }; + 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 288765FC0DF74451002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + 5326AEA710A23A0500278DE6 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; }; + 53DA338912DF8F4500C622CE /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; + 53DA338D12DF8F5000C622CE /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; }; + 53DA338F12DF8F5000C622CE /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; + 53DA339112DF8F5000C622CE /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = System/Library/Frameworks/CoreVideo.framework; sourceTree = SDKROOT; }; + 53F323EA10A20EDB00E0DAE4 /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; }; + 5E2E99DC10ED147800587639 /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; }; + 6678E97219FEB2DF00C00581 /* ofSoundBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofSoundBuffer.cpp; sourceTree = ""; }; + 6678E97319FEB2DF00C00581 /* ofSoundBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofSoundBuffer.h; sourceTree = ""; }; + 6678E97419FEB2DF00C00581 /* ofSoundUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofSoundUtils.h; sourceTree = ""; }; + 66EA462717A6D396009BB12A /* ofxOpenALSoundPlayer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofxOpenALSoundPlayer.cpp; sourceTree = ""; }; + 66EA462817A6D396009BB12A /* ofxOpenALSoundPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxOpenALSoundPlayer.h; sourceTree = ""; }; + 66EA462917A6D396009BB12A /* SoundEngine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SoundEngine.cpp; sourceTree = ""; }; + 66EA462A17A6D396009BB12A /* SoundEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SoundEngine.h; sourceTree = ""; }; + 6711091F19D3EAC6005D095F /* ofxiOSConstants.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ofxiOSConstants.h; sourceTree = ""; }; + 671C0AF01770246200DF03B3 /* AVSoundPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AVSoundPlayer.h; sourceTree = ""; }; + 671C0AF11770246200DF03B3 /* AVSoundPlayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AVSoundPlayer.m; sourceTree = ""; }; + 671C0AF21770246200DF03B3 /* ofxiOSSoundPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxiOSSoundPlayer.h; sourceTree = ""; }; + 671C0AF31770246200DF03B3 /* ofxiOSSoundPlayer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ofxiOSSoundPlayer.mm; sourceTree = ""; }; + 67509ABA17979781003A3A29 /* ofXml.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofXml.cpp; sourceTree = ""; }; + 67509ABB17979781003A3A29 /* ofXml.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofXml.h; sourceTree = ""; }; + 67833F7E19F8990D00DBE7AA /* ofFpsCounter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofFpsCounter.cpp; sourceTree = ""; }; + 67833F7F19F8990D00DBE7AA /* ofFpsCounter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofFpsCounter.h; sourceTree = ""; }; + 67833F8019F8990D00DBE7AA /* ofThreadChannel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofThreadChannel.h; sourceTree = ""; }; + 67833F8119F8990D00DBE7AA /* ofTimer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofTimer.cpp; sourceTree = ""; }; + 67833F8219F8990D00DBE7AA /* ofTimer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofTimer.h; sourceTree = ""; }; + 67833F8819F8996300DBE7AA /* ofBufferObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofBufferObject.cpp; sourceTree = ""; }; + 67833F8919F8996300DBE7AA /* ofBufferObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofBufferObject.h; sourceTree = ""; }; + 678C3D19176F04F800D1CC68 /* ofxiOSSoundStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxiOSSoundStream.h; sourceTree = ""; }; + 678C3D1A176F04F800D1CC68 /* ofxiOSSoundStream.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ofxiOSSoundStream.mm; sourceTree = ""; }; + 678C3D1B176F04F800D1CC68 /* ofxiOSSoundStreamDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxiOSSoundStreamDelegate.h; sourceTree = ""; }; + 678C3D1C176F04F800D1CC68 /* ofxiOSSoundStreamDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ofxiOSSoundStreamDelegate.mm; sourceTree = ""; }; + 678C3D1D176F04F800D1CC68 /* SoundInputStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SoundInputStream.h; sourceTree = ""; }; + 678C3D1E176F04F800D1CC68 /* SoundInputStream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SoundInputStream.m; sourceTree = ""; }; + 678C3D1F176F04F800D1CC68 /* SoundOutputStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SoundOutputStream.h; sourceTree = ""; }; + 678C3D20176F04F800D1CC68 /* SoundOutputStream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SoundOutputStream.m; sourceTree = ""; }; + 678C3D21176F04F800D1CC68 /* SoundStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SoundStream.h; sourceTree = ""; }; + 678C3D22176F04F800D1CC68 /* SoundStream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SoundStream.m; sourceTree = ""; }; + 67D48ECF1C10399900F719BC /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; }; + 67D48ED11C103BAE00F719BC /* ofxiOSCoreMotion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxiOSCoreMotion.h; sourceTree = ""; }; + 67D48ED21C103BAE00F719BC /* ofxiOSCoreMotion.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ofxiOSCoreMotion.mm; sourceTree = ""; }; + 69433CC21FE45BAC004D5B73 /* ofBaseApp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofBaseApp.cpp; sourceTree = ""; }; + 69433CC41FE45BB7004D5B73 /* ofGLBaseTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofGLBaseTypes.h; sourceTree = ""; }; + 69433CC61FE45BCD004D5B73 /* ofGraphicsBaseTypes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofGraphicsBaseTypes.cpp; sourceTree = ""; }; + 69433CC71FE45BCD004D5B73 /* ofGraphicsBaseTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofGraphicsBaseTypes.h; sourceTree = ""; }; + 69433CC81FE45BCD004D5B73 /* ofGraphicsConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofGraphicsConstants.h; sourceTree = ""; }; + 69433CC91FE45BCD004D5B73 /* ofPolyline.inl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ofPolyline.inl; sourceTree = ""; }; + 69433CCD1FE45BD9004D5B73 /* ofMesh.inl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ofMesh.inl; sourceTree = ""; }; + 69433CCE1FE45BF2004D5B73 /* ofSoundBaseTypes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofSoundBaseTypes.cpp; sourceTree = ""; }; + 69433CCF1FE45BF2004D5B73 /* ofSoundBaseTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofSoundBaseTypes.h; sourceTree = ""; }; + 69433CD21FE45E41004D5B73 /* ofMathConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofMathConstants.h; sourceTree = ""; }; + 860B024C17A96D840032B827 /* ofxiOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxiOS.h; sourceTree = ""; }; + 90080013204EDA1300DC786A /* ofxiOSGLKViewController.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = ofxiOSGLKViewController.mm; sourceTree = ""; }; + 90080015204EDA4600DC786A /* ofxiOSGLKViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ofxiOSGLKViewController.h; sourceTree = ""; }; + 90080017204EDB5500DC786A /* ofxiOSGLKView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxiOSGLKView.h; sourceTree = ""; }; + 90080018204EDB5500DC786A /* ofxiOSGLKView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ofxiOSGLKView.mm; sourceTree = ""; }; + 9008001B204EDC0E00DC786A /* EAGLKView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EAGLKView.m; sourceTree = ""; }; + 9008001C204EDC0F00DC786A /* EAGLKView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EAGLKView.h; sourceTree = ""; }; + 901808B8205362D7004A7774 /* GLKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLKit.framework; path = System/Library/Frameworks/GLKit.framework; sourceTree = SDKROOT; }; + 9252B7EF1CDA2A6100A8032B /* ofxiOSEventAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxiOSEventAdapter.h; sourceTree = ""; }; + 9252B7F01CDA2A6100A8032B /* ofxiOSEventAdapter.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ofxiOSEventAdapter.mm; sourceTree = ""; }; + 9957D86F1BDDCD440002D53C /* ofEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofEvent.h; sourceTree = ""; }; + 99752D321BF21EEE0026316A /* GameController.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameController.framework; path = System/Library/Frameworks/GameController.framework; sourceTree = SDKROOT; }; + 9979E8171A1B9883007E55D1 /* ofWindowSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofWindowSettings.h; sourceTree = ""; }; + 9979E8261A1CDBD4007E55D1 /* ofMainLoop.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofMainLoop.cpp; sourceTree = ""; }; + 9979E8271A1CDBD4007E55D1 /* ofMainLoop.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofMainLoop.h; sourceTree = ""; }; + BB16EBD10F2B2A9500518274 /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; + BB16EBD80F2B2AB500518274 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; + BB24DED610DA7A3F00E9C588 /* libofxiOS_iphoneos_Debug.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libofxiOS_iphoneos_Debug.a; sourceTree = BUILT_PRODUCTS_DIR; }; + BBE5EAB70F49AD8400F28951 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; + BF3679A3282B97EF004FD612 /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/Metal.framework; sourceTree = DEVELOPER_DIR; }; + BF3679AD282BB806004FD612 /* MetalANGLE.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MetalANGLE.framework; path = ../../../metal/lib/ios/MetalANGLE.framework; sourceTree = ""; }; + BF3679AF282BB82B004FD612 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/Accelerate.framework; sourceTree = DEVELOPER_DIR; }; + BF3679B0282BB833004FD612 /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/Metal.framework; sourceTree = DEVELOPER_DIR; }; + BF3679B3282BBBB9004FD612 /* ofxiOSMLKView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxiOSMLKView.h; sourceTree = ""; }; + BF3679B4282BBBB9004FD612 /* ofxiOSMLKView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ofxiOSMLKView.mm; sourceTree = ""; }; + BF3679B5282BBBB9004FD612 /* ofxiOSViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ofxiOSViewController.mm; sourceTree = ""; }; + BF3679B6282BBBB9004FD612 /* ofxiOSMLKViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxiOSMLKViewController.h; sourceTree = ""; }; + BF3679B7282BBBB9004FD612 /* ofxiOSViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxiOSViewController.h; sourceTree = ""; }; + BF3679B8282BBBB9004FD612 /* ofxiOSMLKViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ofxiOSMLKViewController.mm; sourceTree = ""; }; + BF3679C0282BBCB3004FD612 /* EAMLKView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EAMLKView.m; sourceTree = ""; }; + BF3679C1282BBCB3004FD612 /* EAMLKView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EAMLKView.h; sourceTree = ""; }; + BF41D520282B95D200608DA9 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/Accelerate.framework; sourceTree = DEVELOPER_DIR; }; + E41D3E9013B38BE900A75A5D /* CoreOF.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = CoreOF.xcconfig; sourceTree = SOURCE_ROOT; }; + E41D3E9113B38BE900A75A5D /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = SOURCE_ROOT; }; + E41D3E9213B38BE900A75A5D /* Release.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = SOURCE_ROOT; }; + E41D3E9313B38BE900A75A5D /* Shared.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Shared.xcconfig; sourceTree = SOURCE_ROOT; }; + E4F76D6F176CB27200798745 /* of3dPrimitives.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp.preprocessed; fileEncoding = 4; path = of3dPrimitives.cpp; sourceTree = ""; }; + E4F76D70176CB27200798745 /* of3dPrimitives.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = of3dPrimitives.h; sourceTree = ""; }; + E4F76D71176CB27200798745 /* of3dUtils.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp.preprocessed; fileEncoding = 4; path = of3dUtils.cpp; sourceTree = ""; }; + E4F76D72176CB27200798745 /* of3dUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = of3dUtils.h; sourceTree = ""; }; + E4F76D73176CB27200798745 /* ofCamera.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp.preprocessed; fileEncoding = 4; path = ofCamera.cpp; sourceTree = ""; }; + E4F76D74176CB27200798745 /* ofCamera.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofCamera.h; sourceTree = ""; }; + E4F76D75176CB27200798745 /* ofEasyCam.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp.preprocessed; fileEncoding = 4; path = ofEasyCam.cpp; sourceTree = ""; }; + E4F76D76176CB27200798745 /* ofEasyCam.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofEasyCam.h; sourceTree = ""; }; + E4F76D78176CB27200798745 /* ofMesh.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofMesh.h; sourceTree = ""; }; + E4F76D79176CB27200798745 /* ofNode.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp.preprocessed; fileEncoding = 4; path = ofNode.cpp; sourceTree = ""; }; + E4F76D7A176CB27200798745 /* ofNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofNode.h; sourceTree = ""; }; + E4F76D7C176CB27200798745 /* ofAppBaseWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofAppBaseWindow.h; sourceTree = ""; }; + E4F76D85176CB27200798745 /* ofAppRunner.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp.preprocessed; fileEncoding = 4; path = ofAppRunner.cpp; sourceTree = ""; }; + E4F76D86176CB27200798745 /* ofAppRunner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofAppRunner.h; sourceTree = ""; }; + E4F76D87176CB27200798745 /* ofBaseApp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofBaseApp.h; sourceTree = ""; }; + E4F76D8F176CB27200798745 /* ofEvents.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofEvents.cpp; sourceTree = ""; }; + E4F76D90176CB27200798745 /* ofEvents.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofEvents.h; sourceTree = ""; }; + E4F76D91176CB27200798745 /* ofEventUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofEventUtils.h; sourceTree = ""; }; + E4F76D93176CB27200798745 /* ofFbo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofFbo.cpp; sourceTree = ""; }; + E4F76D94176CB27200798745 /* ofFbo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofFbo.h; sourceTree = ""; }; + E4F76D95176CB27200798745 /* ofGLProgrammableRenderer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofGLProgrammableRenderer.cpp; sourceTree = ""; }; + E4F76D96176CB27200798745 /* ofGLProgrammableRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofGLProgrammableRenderer.h; sourceTree = ""; }; + E4F76D97176CB27200798745 /* ofGLRenderer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofGLRenderer.cpp; sourceTree = ""; }; + E4F76D98176CB27200798745 /* ofGLRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofGLRenderer.h; sourceTree = ""; }; + E4F76D99176CB27200798745 /* ofGLUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofGLUtils.cpp; sourceTree = ""; }; + E4F76D9A176CB27200798745 /* ofGLUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofGLUtils.h; sourceTree = ""; }; + E4F76D9B176CB27200798745 /* ofLight.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofLight.cpp; sourceTree = ""; }; + E4F76D9C176CB27200798745 /* ofLight.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofLight.h; sourceTree = ""; }; + E4F76D9D176CB27200798745 /* ofMaterial.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofMaterial.cpp; sourceTree = ""; }; + E4F76D9E176CB27200798745 /* ofMaterial.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofMaterial.h; sourceTree = ""; }; + E4F76D9F176CB27200798745 /* ofShader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofShader.cpp; sourceTree = ""; }; + E4F76DA0176CB27200798745 /* ofShader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofShader.h; sourceTree = ""; }; + E4F76DA3176CB27200798745 /* ofTexture.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofTexture.cpp; sourceTree = ""; }; + E4F76DA4176CB27200798745 /* ofTexture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofTexture.h; sourceTree = ""; }; + E4F76DA5176CB27200798745 /* ofVbo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofVbo.cpp; sourceTree = ""; }; + E4F76DA6176CB27200798745 /* ofVbo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofVbo.h; sourceTree = ""; }; + E4F76DA7176CB27200798745 /* ofVboMesh.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofVboMesh.cpp; sourceTree = ""; }; + E4F76DA8176CB27200798745 /* ofVboMesh.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofVboMesh.h; sourceTree = ""; }; + E4F76DAA176CB27200798745 /* of3dGraphics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = of3dGraphics.cpp; sourceTree = ""; }; + E4F76DAB176CB27200798745 /* of3dGraphics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = of3dGraphics.h; sourceTree = ""; }; + E4F76DAC176CB27200798745 /* ofBitmapFont.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofBitmapFont.cpp; sourceTree = ""; }; + E4F76DAD176CB27200798745 /* ofBitmapFont.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofBitmapFont.h; sourceTree = ""; }; + E4F76DB0176CB27200798745 /* ofGraphics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofGraphics.cpp; sourceTree = ""; }; + E4F76DB1176CB27200798745 /* ofGraphics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofGraphics.h; sourceTree = ""; }; + E4F76DB2176CB27200798745 /* ofImage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofImage.cpp; sourceTree = ""; }; + E4F76DB3176CB27200798745 /* ofImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofImage.h; sourceTree = ""; }; + E4F76DB4176CB27200798745 /* ofPath.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofPath.cpp; sourceTree = ""; }; + E4F76DB5176CB27200798745 /* ofPath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofPath.h; sourceTree = ""; }; + E4F76DB6176CB27200798745 /* ofPixels.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofPixels.cpp; sourceTree = ""; }; + E4F76DB7176CB27200798745 /* ofPixels.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofPixels.h; sourceTree = ""; }; + E4F76DB9176CB27200798745 /* ofPolyline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofPolyline.h; sourceTree = ""; }; + E4F76DBA176CB27200798745 /* ofRendererCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofRendererCollection.cpp; sourceTree = ""; }; + E4F76DBB176CB27200798745 /* ofRendererCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofRendererCollection.h; sourceTree = ""; }; + E4F76DBC176CB27200798745 /* ofTessellator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofTessellator.cpp; sourceTree = ""; }; + E4F76DBD176CB27200798745 /* ofTessellator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofTessellator.h; sourceTree = ""; }; + E4F76DBE176CB27200798745 /* ofTrueTypeFont.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofTrueTypeFont.cpp; sourceTree = ""; }; + E4F76DBF176CB27200798745 /* ofTrueTypeFont.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofTrueTypeFont.h; sourceTree = ""; }; + E4F76DC1176CB27200798745 /* ofMath.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofMath.cpp; sourceTree = ""; }; + E4F76DC2176CB27200798745 /* ofMath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofMath.h; sourceTree = ""; }; + E4F76DC3176CB27200798745 /* ofMatrix3x3.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofMatrix3x3.cpp; sourceTree = ""; }; + E4F76DC4176CB27200798745 /* ofMatrix3x3.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofMatrix3x3.h; sourceTree = ""; }; + E4F76DC5176CB27200798745 /* ofMatrix4x4.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofMatrix4x4.cpp; sourceTree = ""; }; + E4F76DC6176CB27200798745 /* ofMatrix4x4.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofMatrix4x4.h; sourceTree = ""; }; + E4F76DC7176CB27200798745 /* ofQuaternion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofQuaternion.cpp; sourceTree = ""; }; + E4F76DC8176CB27200798745 /* ofQuaternion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofQuaternion.h; sourceTree = ""; }; + E4F76DC9176CB27200798745 /* ofVec2f.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofVec2f.cpp; sourceTree = ""; }; + E4F76DCA176CB27200798745 /* ofVec2f.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofVec2f.h; sourceTree = ""; }; + E4F76DCB176CB27200798745 /* ofVec3f.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofVec3f.h; sourceTree = ""; }; + E4F76DCC176CB27200798745 /* ofVec4f.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofVec4f.cpp; sourceTree = ""; }; + E4F76DCD176CB27200798745 /* ofVec4f.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofVec4f.h; sourceTree = ""; }; + E4F76DCE176CB27200798745 /* ofVectorMath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofVectorMath.h; sourceTree = ""; }; + E4F76DCF176CB27200798745 /* ofMain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofMain.h; sourceTree = ""; }; + E4F76DDD176CB27200798745 /* ofSoundPlayer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofSoundPlayer.cpp; sourceTree = ""; }; + E4F76DDE176CB27200798745 /* ofSoundPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofSoundPlayer.h; sourceTree = ""; }; + E4F76DDF176CB27200798745 /* ofSoundStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofSoundStream.cpp; sourceTree = ""; }; + E4F76DE0176CB27200798745 /* ofSoundStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofSoundStream.h; sourceTree = ""; }; + E4F76DE2176CB27200798745 /* ofBaseTypes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofBaseTypes.cpp; sourceTree = ""; }; + E4F76DE4176CB27200798745 /* ofColor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofColor.cpp; sourceTree = ""; }; + E4F76DE5176CB27200798745 /* ofColor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofColor.h; sourceTree = ""; }; + E4F76DE6176CB27200798745 /* ofParameter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofParameter.cpp; sourceTree = ""; }; + E4F76DE7176CB27200798745 /* ofParameter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofParameter.h; sourceTree = ""; }; + E4F76DE8176CB27200798745 /* ofParameterGroup.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofParameterGroup.cpp; sourceTree = ""; }; + E4F76DE9176CB27200798745 /* ofParameterGroup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofParameterGroup.h; sourceTree = ""; }; + E4F76DEB176CB27200798745 /* ofPoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofPoint.h; sourceTree = ""; }; + E4F76DEC176CB27200798745 /* ofRectangle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofRectangle.cpp; sourceTree = ""; }; + E4F76DED176CB27200798745 /* ofRectangle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofRectangle.h; sourceTree = ""; }; + E4F76DEE176CB27200798745 /* ofTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofTypes.h; sourceTree = ""; }; + E4F76DF0176CB27200798745 /* ofConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofConstants.h; sourceTree = ""; }; + E4F76DF1176CB27200798745 /* ofFileUtils.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp.preprocessed; fileEncoding = 4; path = ofFileUtils.cpp; sourceTree = ""; }; + E4F76DF2176CB27200798745 /* ofFileUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofFileUtils.h; sourceTree = ""; }; + E4F76DF3176CB27200798745 /* ofLog.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp.preprocessed; fileEncoding = 4; path = ofLog.cpp; sourceTree = ""; }; + E4F76DF4176CB27200798745 /* ofLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofLog.h; sourceTree = ""; }; + E4F76DF5176CB27200798745 /* ofMatrixStack.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp.preprocessed; fileEncoding = 4; path = ofMatrixStack.cpp; sourceTree = ""; }; + E4F76DF6176CB27200798745 /* ofMatrixStack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofMatrixStack.h; sourceTree = ""; }; + E4F76DF7176CB27200798745 /* ofNoise.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofNoise.h; sourceTree = ""; }; + E4F76DF8176CB27200798745 /* ofSystemUtils.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp.preprocessed; fileEncoding = 4; path = ofSystemUtils.cpp; sourceTree = ""; }; + E4F76DF9176CB27200798745 /* ofSystemUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofSystemUtils.h; sourceTree = ""; }; + E4F76DFA176CB27200798745 /* ofThread.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp.preprocessed; fileEncoding = 4; path = ofThread.cpp; sourceTree = ""; }; + E4F76DFB176CB27200798745 /* ofThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofThread.h; sourceTree = ""; }; + E4F76DFC176CB27200798745 /* ofURLFileLoader.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp.preprocessed; fileEncoding = 4; path = ofURLFileLoader.cpp; sourceTree = ""; }; + E4F76DFD176CB27200798745 /* ofURLFileLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofURLFileLoader.h; sourceTree = ""; }; + E4F76DFE176CB27200798745 /* ofUtils.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp.preprocessed; fileEncoding = 4; path = ofUtils.cpp; sourceTree = ""; }; + E4F76DFF176CB27200798745 /* ofUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofUtils.h; sourceTree = ""; }; + E4F76E15176CB27200798745 /* ofVideoGrabber.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofVideoGrabber.cpp; sourceTree = ""; }; + E4F76E16176CB27200798745 /* ofVideoGrabber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofVideoGrabber.h; sourceTree = ""; }; + E4F76E17176CB27200798745 /* ofVideoPlayer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofVideoPlayer.cpp; sourceTree = ""; }; + E4F76E18176CB27200798745 /* ofVideoPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofVideoPlayer.h; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + BB24DEC910DA7A3F00E9C588 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + BF3679A4282B97EF004FD612 /* Metal.framework in Frameworks */, + BF41D521282B95D200608DA9 /* Accelerate.framework in Frameworks */, + 99752D331BF21EEE0026316A /* GameController.framework in Frameworks */, + 67D48ED01C10399900F719BC /* CoreMotion.framework in Frameworks */, + BB24DECA10DA7A3F00E9C588 /* AudioToolbox.framework in Frameworks */, + BB24DECB10DA7A3F00E9C588 /* OpenGLES.framework in Frameworks */, + BB24DECC10DA7A3F00E9C588 /* UIKit.framework in Frameworks */, + BB24DECD10DA7A3F00E9C588 /* OpenAL.framework in Frameworks */, + 901808B9205362D7004A7774 /* GLKit.framework in Frameworks */, + BB24DECE10DA7A3F00E9C588 /* Foundation.framework in Frameworks */, + BF3679AE282BB806004FD612 /* MetalANGLE.framework in Frameworks */, + BB24DECF10DA7A3F00E9C588 /* CoreGraphics.framework in Frameworks */, + BB24DED010DA7A3F00E9C588 /* CoreLocation.framework in Frameworks */, + BB24DED110DA7A3F00E9C588 /* QuartzCore.framework in Frameworks */, + 5E2E99DD10ED147800587639 /* MapKit.framework in Frameworks */, + 53DA338A12DF8F4500C622CE /* AVFoundation.framework in Frameworks */, + 53DA338E12DF8F5000C622CE /* CoreAudio.framework in Frameworks */, + 53DA339012DF8F5000C622CE /* CoreMedia.framework in Frameworks */, + 53DA339212DF8F5000C622CE /* CoreVideo.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 15594EFE15C55A5700727FF2 /* app */ = { + isa = PBXGroup; + children = ( + 15594F7C15C5697C00727FF2 /* ofAppiOSWindow.h */, + 15594F7815C5697C00727FF2 /* ofAppiOSWindow.mm */, + 15594F7E15C5697C00727FF2 /* ofxiOSApp.h */, + ); + path = app; + sourceTree = ""; + }; + 15594EFF15C55A5700727FF2 /* events */ = { + isa = PBXGroup; + children = ( + 15594FA915C56C9500727FF2 /* ofxiOSAlerts.h */, + 15594FA815C56C9500727FF2 /* ofxiOSAlerts.mm */, + 15594FAA15C56C9500727FF2 /* ofxiOSAlertsListener.h */, + ); + path = events; + sourceTree = ""; + }; + 15594F0015C55A5700727FF2 /* gl */ = { + isa = PBXGroup; + children = ( + 9008001C204EDC0F00DC786A /* EAGLKView.h */, + 9008001B204EDC0E00DC786A /* EAGLKView.m */, + 15594F0815C55AC900727FF2 /* EAGLView.h */, + 15594F0515C55AC900727FF2 /* EAGLView.m */, + 15594F0915C55AC900727FF2 /* ES1Renderer.h */, + 15594F0615C55AC900727FF2 /* ES1Renderer.m */, + 15594F0A15C55AC900727FF2 /* ES2Renderer.h */, + 15594F0715C55AC900727FF2 /* ES2Renderer.m */, + 15594F0B15C55AC900727FF2 /* ESRenderer.h */, + ); + path = gl; + sourceTree = ""; + }; + 15594F0115C55A5700727FF2 /* sound */ = { + isa = PBXGroup; + children = ( + 671C0AF01770246200DF03B3 /* AVSoundPlayer.h */, + 671C0AF11770246200DF03B3 /* AVSoundPlayer.m */, + 671C0AF21770246200DF03B3 /* ofxiOSSoundPlayer.h */, + 671C0AF31770246200DF03B3 /* ofxiOSSoundPlayer.mm */, + 678C3D19176F04F800D1CC68 /* ofxiOSSoundStream.h */, + 678C3D1A176F04F800D1CC68 /* ofxiOSSoundStream.mm */, + 678C3D1B176F04F800D1CC68 /* ofxiOSSoundStreamDelegate.h */, + 678C3D1C176F04F800D1CC68 /* ofxiOSSoundStreamDelegate.mm */, + 66EA462717A6D396009BB12A /* ofxOpenALSoundPlayer.cpp */, + 66EA462817A6D396009BB12A /* ofxOpenALSoundPlayer.h */, + 66EA462917A6D396009BB12A /* SoundEngine.cpp */, + 66EA462A17A6D396009BB12A /* SoundEngine.h */, + 678C3D1D176F04F800D1CC68 /* SoundInputStream.h */, + 678C3D1E176F04F800D1CC68 /* SoundInputStream.m */, + 678C3D1F176F04F800D1CC68 /* SoundOutputStream.h */, + 678C3D20176F04F800D1CC68 /* SoundOutputStream.m */, + 678C3D21176F04F800D1CC68 /* SoundStream.h */, + 678C3D22176F04F800D1CC68 /* SoundStream.m */, + ); + path = sound; + sourceTree = ""; + }; + 15594F0215C55A5700727FF2 /* utils */ = { + isa = PBXGroup; + children = ( + 15594FB615C56D1E00727FF2 /* ofxiOSCoreLocation.h */, + 15594FAF15C56D1E00727FF2 /* ofxiOSCoreLocation.mm */, + 67D48ED11C103BAE00F719BC /* ofxiOSCoreMotion.h */, + 67D48ED21C103BAE00F719BC /* ofxiOSCoreMotion.mm */, + 9252B7EF1CDA2A6100A8032B /* ofxiOSEventAdapter.h */, + 9252B7F01CDA2A6100A8032B /* ofxiOSEventAdapter.mm */, + 15594FB715C56D1E00727FF2 /* ofxiOSExternalDisplay.h */, + 15594FB015C56D1E00727FF2 /* ofxiOSExternalDisplay.mm */, + 15594FB815C56D1E00727FF2 /* ofxiOSExtras.h */, + 15594FB115C56D1E00727FF2 /* ofxiOSExtras.mm */, + 15594FB915C56D1E00727FF2 /* ofxiOSImagePicker.h */, + 15594FB215C56D1E00727FF2 /* ofxiOSImagePicker.mm */, + 15594FBA15C56D1E00727FF2 /* ofxiOSKeyboard.h */, + 15594FB315C56D1E00727FF2 /* ofxiOSKeyboard.mm */, + 15594FBB15C56D1E00727FF2 /* ofxiOSMapKit.h */, + 15594FB415C56D1E00727FF2 /* ofxiOSMapKit.mm */, + 15594FBC15C56D1E00727FF2 /* ofxiOSMapKitDelegate.h */, + 15594FB515C56D1E00727FF2 /* ofxiOSMapKitDelegate.mm */, + 15594FBD15C56D1E00727FF2 /* ofxiOSMapKitListener.h */, + ); + path = utils; + sourceTree = ""; + }; + 15594F0315C55A5700727FF2 /* video */ = { + isa = PBXGroup; + children = ( + 15594FA215C56BB700727FF2 /* AVFoundationVideoPlayer.h */, + 15594FA015C56BB700727FF2 /* AVFoundationVideoPlayer.m */, + 15594FA115C56BB700727FF2 /* AVFoundationVideoGrabber.h */, + 15594F9F15C56BB700727FF2 /* AVFoundationVideoGrabber.mm */, + 1594366315CF5F420087B684 /* ofxiOSVideoPlayer.h */, + 1594366115CF5F420087B684 /* ofxiOSVideoPlayer.mm */, + 1594366215CF5F420087B684 /* ofxiOSVideoGrabber.h */, + 1594366015CF5F420087B684 /* ofxiOSVideoGrabber.mm */, + ); + path = video; + sourceTree = ""; + }; + 15594F8A15C56A4E00727FF2 /* core */ = { + isa = PBXGroup; + children = ( + BF3679B3282BBBB9004FD612 /* ofxiOSMLKView.h */, + BF3679B4282BBBB9004FD612 /* ofxiOSMLKView.mm */, + BF3679B6282BBBB9004FD612 /* ofxiOSMLKViewController.h */, + BF3679B8282BBBB9004FD612 /* ofxiOSMLKViewController.mm */, + BF3679B7282BBBB9004FD612 /* ofxiOSViewController.h */, + BF3679B5282BBBB9004FD612 /* ofxiOSViewController.mm */, + 15594F8F15C56A8A00727FF2 /* ofxiOSAppDelegate.h */, + 15594F8C15C56A8A00727FF2 /* ofxiOSAppDelegate.mm */, + 15594F8E15C56A8A00727FF2 /* ofxiOSEAGLView.h */, + 15594F8B15C56A8A00727FF2 /* ofxiOSEAGLView.mm */, + 90080017204EDB5500DC786A /* ofxiOSGLKView.h */, + 90080018204EDB5500DC786A /* ofxiOSGLKView.mm */, + 90080015204EDA4600DC786A /* ofxiOSGLKViewController.h */, + 90080013204EDA1300DC786A /* ofxiOSGLKViewController.mm */, + 15594F9015C56A8A00727FF2 /* ofxiOSViewController.h */, + 15594F8D15C56A8A00727FF2 /* ofxiOSViewController.mm */, + ); + path = core; + sourceTree = ""; + }; + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + BB24DED610DA7A3F00E9C588 /* libofxiOS_iphoneos_Debug.a */, + ); + name = Products; + sourceTree = ""; + }; + 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { + isa = PBXGroup; + children = ( + E41D3E9013B38BE900A75A5D /* CoreOF.xcconfig */, + E41D3E9113B38BE900A75A5D /* Debug.xcconfig */, + E41D3E9213B38BE900A75A5D /* Release.xcconfig */, + E41D3E9313B38BE900A75A5D /* Shared.xcconfig */, + BB16F26B0F2B646B00518274 /* addons */, + E4F76D69176CB27200798745 /* openFrameworks */, + BB16E9930F2B1E5900518274 /* libs */, + 19C28FACFE9D520D11CA2CBB /* Products */, + BF41D517282B7A7700608DA9 /* Frameworks */, + ); + indentWidth = 4; + name = CustomTemplate; + sourceTree = ""; + tabWidth = 4; + usesTabs = 0; + }; + 29B97323FDCFA39411CA2CEA /* core frameworks */ = { + isa = PBXGroup; + children = ( + 99752D321BF21EEE0026316A /* GameController.framework */, + 5E2E99DC10ED147800587639 /* MapKit.framework */, + 901808B8205362D7004A7774 /* GLKit.framework */, + BBE5EAB70F49AD8400F28951 /* AudioToolbox.framework */, + BB16EBD80F2B2AB500518274 /* QuartzCore.framework */, + BB16EBD10F2B2A9500518274 /* OpenGLES.framework */, + 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, + 1D30AB110D05D00D00671497 /* Foundation.framework */, + 288765FC0DF74451002DB57D /* CoreGraphics.framework */, + 53F323EA10A20EDB00E0DAE4 /* OpenAL.framework */, + 5326AEA710A23A0500278DE6 /* CoreLocation.framework */, + 53DA338912DF8F4500C622CE /* AVFoundation.framework */, + 53DA338D12DF8F5000C622CE /* CoreAudio.framework */, + 53DA338F12DF8F5000C622CE /* CoreMedia.framework */, + 53DA339112DF8F5000C622CE /* CoreVideo.framework */, + BF3679AF282BB82B004FD612 /* Accelerate.framework */, + 67D48ECF1C10399900F719BC /* CoreMotion.framework */, + BF3679AD282BB806004FD612 /* MetalANGLE.framework */, + BF3679B0282BB833004FD612 /* Metal.framework */, + ); + name = "core frameworks"; + sourceTree = ""; + }; + BB16E9930F2B1E5900518274 /* libs */ = { + isa = PBXGroup; + children = ( + BBE5E94E0F497BD800F28951 /* core */, + ); + name = libs; + sourceTree = ""; + }; + BB16F26B0F2B646B00518274 /* addons */ = { + isa = PBXGroup; + children = ( + BB24E02310DA7C6100E9C588 /* ofxiOS */, + ); + name = addons; + sourceTree = ""; + }; + BB24E02310DA7C6100E9C588 /* ofxiOS */ = { + isa = PBXGroup; + children = ( + BB24E02810DA7C6100E9C588 /* src */, + ); + name = ofxiOS; + path = ../../../../addons/ofxiOS; + sourceTree = SOURCE_ROOT; + }; + BB24E02810DA7C6100E9C588 /* src */ = { + isa = PBXGroup; + children = ( + BF3679BF282BBCB3004FD612 /* ml */, + 860B024C17A96D840032B827 /* ofxiOS.h */, + 6711091F19D3EAC6005D095F /* ofxiOSConstants.h */, + 15BC775215A5C31F00772525 /* ofxiOSExtensions.h */, + 15594EFE15C55A5700727FF2 /* app */, + 15594F8A15C56A4E00727FF2 /* core */, + 15594F0015C55A5700727FF2 /* gl */, + 15594F0115C55A5700727FF2 /* sound */, + 15594F0315C55A5700727FF2 /* video */, + 15594EFF15C55A5700727FF2 /* events */, + 15594F0215C55A5700727FF2 /* utils */, + ); + path = src; + sourceTree = ""; + }; + BBE5E94E0F497BD800F28951 /* core */ = { + isa = PBXGroup; + children = ( + 29B97323FDCFA39411CA2CEA /* core frameworks */, + ); + name = core; + sourceTree = ""; + }; + BF3679BF282BBCB3004FD612 /* ml */ = { + isa = PBXGroup; + children = ( + BF3679C0282BBCB3004FD612 /* EAMLKView.m */, + BF3679C1282BBCB3004FD612 /* EAMLKView.h */, + ); + path = ml; + sourceTree = ""; + }; + BF41D517282B7A7700608DA9 /* Frameworks */ = { + isa = PBXGroup; + children = ( + BF3679A3282B97EF004FD612 /* Metal.framework */, + BF41D520282B95D200608DA9 /* Accelerate.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + E4F76D69176CB27200798745 /* openFrameworks */ = { + isa = PBXGroup; + children = ( + E4F76DCF176CB27200798745 /* ofMain.h */, + E4F76D6E176CB27200798745 /* 3d */, + E4F76D7B176CB27200798745 /* app */, + E4F76D89176CB27200798745 /* communication */, + E4F76D8E176CB27200798745 /* events */, + E4F76D92176CB27200798745 /* gl */, + E4F76DA9176CB27200798745 /* graphics */, + E4F76DC0176CB27200798745 /* math */, + E4F76DD0176CB27200798745 /* sound */, + E4F76DE1176CB27200798745 /* types */, + E4F76DEF176CB27200798745 /* utils */, + E4F76E00176CB27200798745 /* video */, + ); + name = openFrameworks; + path = ../../../openFrameworks; + sourceTree = ""; + }; + E4F76D6E176CB27200798745 /* 3d */ = { + isa = PBXGroup; + children = ( + 69433CCD1FE45BD9004D5B73 /* ofMesh.inl */, + E4F76D6F176CB27200798745 /* of3dPrimitives.cpp */, + E4F76D70176CB27200798745 /* of3dPrimitives.h */, + E4F76D71176CB27200798745 /* of3dUtils.cpp */, + E4F76D72176CB27200798745 /* of3dUtils.h */, + E4F76D73176CB27200798745 /* ofCamera.cpp */, + E4F76D74176CB27200798745 /* ofCamera.h */, + E4F76D75176CB27200798745 /* ofEasyCam.cpp */, + E4F76D76176CB27200798745 /* ofEasyCam.h */, + E4F76D78176CB27200798745 /* ofMesh.h */, + E4F76D79176CB27200798745 /* ofNode.cpp */, + E4F76D7A176CB27200798745 /* ofNode.h */, + ); + path = 3d; + sourceTree = ""; + }; + E4F76D7B176CB27200798745 /* app */ = { + isa = PBXGroup; + children = ( + 69433CC21FE45BAC004D5B73 /* ofBaseApp.cpp */, + E4F76D7C176CB27200798745 /* ofAppBaseWindow.h */, + E4F76D85176CB27200798745 /* ofAppRunner.cpp */, + E4F76D86176CB27200798745 /* ofAppRunner.h */, + E4F76D87176CB27200798745 /* ofBaseApp.h */, + 9979E8261A1CDBD4007E55D1 /* ofMainLoop.cpp */, + 9979E8271A1CDBD4007E55D1 /* ofMainLoop.h */, + 9979E8171A1B9883007E55D1 /* ofWindowSettings.h */, + ); + path = app; + sourceTree = ""; + }; + E4F76D89176CB27200798745 /* communication */ = { + isa = PBXGroup; + children = ( + ); + path = communication; + sourceTree = ""; + }; + E4F76D8E176CB27200798745 /* events */ = { + isa = PBXGroup; + children = ( + 9957D86F1BDDCD440002D53C /* ofEvent.h */, + E4F76D8F176CB27200798745 /* ofEvents.cpp */, + E4F76D90176CB27200798745 /* ofEvents.h */, + E4F76D91176CB27200798745 /* ofEventUtils.h */, + ); + path = events; + sourceTree = ""; + }; + E4F76D92176CB27200798745 /* gl */ = { + isa = PBXGroup; + children = ( + 69433CC41FE45BB7004D5B73 /* ofGLBaseTypes.h */, + 67833F8819F8996300DBE7AA /* ofBufferObject.cpp */, + 67833F8919F8996300DBE7AA /* ofBufferObject.h */, + E4F76D93176CB27200798745 /* ofFbo.cpp */, + E4F76D94176CB27200798745 /* ofFbo.h */, + E4F76D95176CB27200798745 /* ofGLProgrammableRenderer.cpp */, + E4F76D96176CB27200798745 /* ofGLProgrammableRenderer.h */, + E4F76D97176CB27200798745 /* ofGLRenderer.cpp */, + E4F76D98176CB27200798745 /* ofGLRenderer.h */, + E4F76D99176CB27200798745 /* ofGLUtils.cpp */, + E4F76D9A176CB27200798745 /* ofGLUtils.h */, + E4F76D9B176CB27200798745 /* ofLight.cpp */, + E4F76D9C176CB27200798745 /* ofLight.h */, + E4F76D9D176CB27200798745 /* ofMaterial.cpp */, + E4F76D9E176CB27200798745 /* ofMaterial.h */, + E4F76D9F176CB27200798745 /* ofShader.cpp */, + E4F76DA0176CB27200798745 /* ofShader.h */, + E4F76DA3176CB27200798745 /* ofTexture.cpp */, + E4F76DA4176CB27200798745 /* ofTexture.h */, + E4F76DA5176CB27200798745 /* ofVbo.cpp */, + E4F76DA6176CB27200798745 /* ofVbo.h */, + E4F76DA7176CB27200798745 /* ofVboMesh.cpp */, + E4F76DA8176CB27200798745 /* ofVboMesh.h */, + ); + path = gl; + sourceTree = ""; + }; + E4F76DA9176CB27200798745 /* graphics */ = { + isa = PBXGroup; + children = ( + 69433CC61FE45BCD004D5B73 /* ofGraphicsBaseTypes.cpp */, + 69433CC71FE45BCD004D5B73 /* ofGraphicsBaseTypes.h */, + 69433CC81FE45BCD004D5B73 /* ofGraphicsConstants.h */, + 69433CC91FE45BCD004D5B73 /* ofPolyline.inl */, + E4F76DAA176CB27200798745 /* of3dGraphics.cpp */, + E4F76DAB176CB27200798745 /* of3dGraphics.h */, + E4F76DAC176CB27200798745 /* ofBitmapFont.cpp */, + E4F76DAD176CB27200798745 /* ofBitmapFont.h */, + E4F76DB0176CB27200798745 /* ofGraphics.cpp */, + E4F76DB1176CB27200798745 /* ofGraphics.h */, + E4F76DB2176CB27200798745 /* ofImage.cpp */, + E4F76DB3176CB27200798745 /* ofImage.h */, + E4F76DB4176CB27200798745 /* ofPath.cpp */, + E4F76DB5176CB27200798745 /* ofPath.h */, + E4F76DB6176CB27200798745 /* ofPixels.cpp */, + E4F76DB7176CB27200798745 /* ofPixels.h */, + E4F76DB9176CB27200798745 /* ofPolyline.h */, + E4F76DBA176CB27200798745 /* ofRendererCollection.cpp */, + E4F76DBB176CB27200798745 /* ofRendererCollection.h */, + E4F76DBC176CB27200798745 /* ofTessellator.cpp */, + E4F76DBD176CB27200798745 /* ofTessellator.h */, + E4F76DBE176CB27200798745 /* ofTrueTypeFont.cpp */, + E4F76DBF176CB27200798745 /* ofTrueTypeFont.h */, + ); + path = graphics; + sourceTree = ""; + }; + E4F76DC0176CB27200798745 /* math */ = { + isa = PBXGroup; + children = ( + 69433CD21FE45E41004D5B73 /* ofMathConstants.h */, + E4F76DC1176CB27200798745 /* ofMath.cpp */, + E4F76DC2176CB27200798745 /* ofMath.h */, + E4F76DC3176CB27200798745 /* ofMatrix3x3.cpp */, + E4F76DC4176CB27200798745 /* ofMatrix3x3.h */, + E4F76DC5176CB27200798745 /* ofMatrix4x4.cpp */, + E4F76DC6176CB27200798745 /* ofMatrix4x4.h */, + E4F76DC7176CB27200798745 /* ofQuaternion.cpp */, + E4F76DC8176CB27200798745 /* ofQuaternion.h */, + E4F76DC9176CB27200798745 /* ofVec2f.cpp */, + E4F76DCA176CB27200798745 /* ofVec2f.h */, + E4F76DCB176CB27200798745 /* ofVec3f.h */, + E4F76DCC176CB27200798745 /* ofVec4f.cpp */, + E4F76DCD176CB27200798745 /* ofVec4f.h */, + E4F76DCE176CB27200798745 /* ofVectorMath.h */, + ); + path = math; + sourceTree = ""; + }; + E4F76DD0176CB27200798745 /* sound */ = { + isa = PBXGroup; + children = ( + 69433CCE1FE45BF2004D5B73 /* ofSoundBaseTypes.cpp */, + 69433CCF1FE45BF2004D5B73 /* ofSoundBaseTypes.h */, + 6678E97219FEB2DF00C00581 /* ofSoundBuffer.cpp */, + 6678E97319FEB2DF00C00581 /* ofSoundBuffer.h */, + E4F76DDD176CB27200798745 /* ofSoundPlayer.cpp */, + E4F76DDE176CB27200798745 /* ofSoundPlayer.h */, + E4F76DDF176CB27200798745 /* ofSoundStream.cpp */, + E4F76DE0176CB27200798745 /* ofSoundStream.h */, + 6678E97419FEB2DF00C00581 /* ofSoundUtils.h */, + ); + path = sound; + sourceTree = ""; + }; + E4F76DE1176CB27200798745 /* types */ = { + isa = PBXGroup; + children = ( + E4F76DE2176CB27200798745 /* ofBaseTypes.cpp */, + E4F76DE4176CB27200798745 /* ofColor.cpp */, + E4F76DE5176CB27200798745 /* ofColor.h */, + E4F76DE6176CB27200798745 /* ofParameter.cpp */, + E4F76DE7176CB27200798745 /* ofParameter.h */, + E4F76DE8176CB27200798745 /* ofParameterGroup.cpp */, + E4F76DE9176CB27200798745 /* ofParameterGroup.h */, + E4F76DEB176CB27200798745 /* ofPoint.h */, + E4F76DEC176CB27200798745 /* ofRectangle.cpp */, + E4F76DED176CB27200798745 /* ofRectangle.h */, + E4F76DEE176CB27200798745 /* ofTypes.h */, + ); + path = types; + sourceTree = ""; + }; + E4F76DEF176CB27200798745 /* utils */ = { + isa = PBXGroup; + children = ( + E4F76DF0176CB27200798745 /* ofConstants.h */, + E4F76DF1176CB27200798745 /* ofFileUtils.cpp */, + E4F76DF2176CB27200798745 /* ofFileUtils.h */, + 67833F7E19F8990D00DBE7AA /* ofFpsCounter.cpp */, + 67833F7F19F8990D00DBE7AA /* ofFpsCounter.h */, + E4F76DF3176CB27200798745 /* ofLog.cpp */, + E4F76DF4176CB27200798745 /* ofLog.h */, + E4F76DF5176CB27200798745 /* ofMatrixStack.cpp */, + E4F76DF6176CB27200798745 /* ofMatrixStack.h */, + E4F76DF7176CB27200798745 /* ofNoise.h */, + E4F76DF8176CB27200798745 /* ofSystemUtils.cpp */, + E4F76DF9176CB27200798745 /* ofSystemUtils.h */, + E4F76DFA176CB27200798745 /* ofThread.cpp */, + E4F76DFB176CB27200798745 /* ofThread.h */, + 67833F8019F8990D00DBE7AA /* ofThreadChannel.h */, + 67833F8119F8990D00DBE7AA /* ofTimer.cpp */, + 67833F8219F8990D00DBE7AA /* ofTimer.h */, + E4F76DFC176CB27200798745 /* ofURLFileLoader.cpp */, + E4F76DFD176CB27200798745 /* ofURLFileLoader.h */, + E4F76DFE176CB27200798745 /* ofUtils.cpp */, + E4F76DFF176CB27200798745 /* ofUtils.h */, + 67509ABA17979781003A3A29 /* ofXml.cpp */, + 67509ABB17979781003A3A29 /* ofXml.h */, + ); + path = utils; + sourceTree = ""; + }; + E4F76E00176CB27200798745 /* video */ = { + isa = PBXGroup; + children = ( + E4F76E15176CB27200798745 /* ofVideoGrabber.cpp */, + E4F76E16176CB27200798745 /* ofVideoGrabber.h */, + E4F76E17176CB27200798745 /* ofVideoPlayer.cpp */, + E4F76E18176CB27200798745 /* ofVideoPlayer.h */, + ); + path = video; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + BB24DE5D10DA7A3F00E9C588 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + E4F76E1A176CB27200798745 /* of3dPrimitives.h in Headers */, + E4F76E1C176CB27200798745 /* of3dUtils.h in Headers */, + E4F76E1E176CB27200798745 /* ofCamera.h in Headers */, + E4F76E20176CB27200798745 /* ofEasyCam.h in Headers */, + E4F76E22176CB27200798745 /* ofMesh.h in Headers */, + E4F76E24176CB27200798745 /* ofNode.h in Headers */, + 67833F8419F8990D00DBE7AA /* ofFpsCounter.h in Headers */, + E4F76E25176CB27200798745 /* ofAppBaseWindow.h in Headers */, + 90080019204EDB5500DC786A /* ofxiOSGLKView.h in Headers */, + E4F76E2F176CB27200798745 /* ofAppRunner.h in Headers */, + E4F76E30176CB27200798745 /* ofBaseApp.h in Headers */, + E4F76E37176CB27200798745 /* ofEvents.h in Headers */, + E4F76E38176CB27200798745 /* ofEventUtils.h in Headers */, + 67D48ED31C103BAE00F719BC /* ofxiOSCoreMotion.h in Headers */, + BF3679C2282BBCC4004FD612 /* EAMLKView.h in Headers */, + E4F76E3A176CB27200798745 /* ofFbo.h in Headers */, + E4F76E3C176CB27200798745 /* ofGLProgrammableRenderer.h in Headers */, + E4F76E3E176CB27200798745 /* ofGLRenderer.h in Headers */, + 69433CD31FE45E41004D5B73 /* ofMathConstants.h in Headers */, + E4F76E40176CB27200798745 /* ofGLUtils.h in Headers */, + E4F76E42176CB27200798745 /* ofLight.h in Headers */, + E4F76E44176CB27200798745 /* ofMaterial.h in Headers */, + 9252B7F11CDA2A6100A8032B /* ofxiOSEventAdapter.h in Headers */, + E4F76E46176CB27200798745 /* ofShader.h in Headers */, + E4F76E4A176CB27200798745 /* ofTexture.h in Headers */, + E4F76E4C176CB27200798745 /* ofVbo.h in Headers */, + E4F76E4E176CB27200798745 /* ofVboMesh.h in Headers */, + E4F76E50176CB27200798745 /* of3dGraphics.h in Headers */, + E4F76E52176CB27200798745 /* ofBitmapFont.h in Headers */, + E4F76E56176CB27200798745 /* ofGraphics.h in Headers */, + E4F76E58176CB27200798745 /* ofImage.h in Headers */, + E4F76E5A176CB27200798745 /* ofPath.h in Headers */, + E4F76E5C176CB27200798745 /* ofPixels.h in Headers */, + 69433CCB1FE45BCD004D5B73 /* ofGraphicsBaseTypes.h in Headers */, + E4F76E5E176CB27200798745 /* ofPolyline.h in Headers */, + E4F76E60176CB27200798745 /* ofRendererCollection.h in Headers */, + E4F76E62176CB27200798745 /* ofTessellator.h in Headers */, + E4F76E64176CB27200798745 /* ofTrueTypeFont.h in Headers */, + E4F76E66176CB27200798745 /* ofMath.h in Headers */, + E4F76E68176CB27200798745 /* ofMatrix3x3.h in Headers */, + E4F76E6A176CB27200798745 /* ofMatrix4x4.h in Headers */, + 69433CC51FE45BB7004D5B73 /* ofGLBaseTypes.h in Headers */, + E4F76E6C176CB27200798745 /* ofQuaternion.h in Headers */, + 69433CCC1FE45BCD004D5B73 /* ofGraphicsConstants.h in Headers */, + E4F76E6E176CB27200798745 /* ofVec2f.h in Headers */, + 9979E8291A1CDBD4007E55D1 /* ofMainLoop.h in Headers */, + E4F76E6F176CB27200798745 /* ofVec3f.h in Headers */, + E4F76E71176CB27200798745 /* ofVec4f.h in Headers */, + E4F76E72176CB27200798745 /* ofVectorMath.h in Headers */, + 9008001E204EDC0F00DC786A /* EAGLKView.h in Headers */, + 67833F8519F8990D00DBE7AA /* ofThreadChannel.h in Headers */, + E4F76E73176CB27200798745 /* ofMain.h in Headers */, + E4F76E81176CB27200798745 /* ofSoundPlayer.h in Headers */, + E4F76E83176CB27200798745 /* ofSoundStream.h in Headers */, + 9957D8701BDDCD440002D53C /* ofEvent.h in Headers */, + E4F76E87176CB27200798745 /* ofColor.h in Headers */, + E4F76E89176CB27200798745 /* ofParameter.h in Headers */, + E4F76E8B176CB27200798745 /* ofParameterGroup.h in Headers */, + E4F76E8D176CB27200798745 /* ofPoint.h in Headers */, + 6678E97819FEB2DF00C00581 /* ofSoundUtils.h in Headers */, + E4F76E8F176CB27200798745 /* ofRectangle.h in Headers */, + E4F76E90176CB27200798745 /* ofTypes.h in Headers */, + E4F76E91176CB27200798745 /* ofConstants.h in Headers */, + 9979E8181A1B9883007E55D1 /* ofWindowSettings.h in Headers */, + E4F76E93176CB27200798745 /* ofFileUtils.h in Headers */, + E4F76E95176CB27200798745 /* ofLog.h in Headers */, + E4F76E97176CB27200798745 /* ofMatrixStack.h in Headers */, + E4F76E98176CB27200798745 /* ofNoise.h in Headers */, + E4F76E9A176CB27200798745 /* ofSystemUtils.h in Headers */, + E4F76E9C176CB27200798745 /* ofThread.h in Headers */, + E4F76E9E176CB27200798745 /* ofURLFileLoader.h in Headers */, + E4F76EA0176CB27200798745 /* ofUtils.h in Headers */, + E4F76EB6176CB27200798745 /* ofVideoGrabber.h in Headers */, + 67833F8B19F8996300DBE7AA /* ofBufferObject.h in Headers */, + E4F76EB8176CB27200798745 /* ofVideoPlayer.h in Headers */, + 15594F0F15C55AC900727FF2 /* EAGLView.h in Headers */, + 15594F1015C55AC900727FF2 /* ES1Renderer.h in Headers */, + 15594F1115C55AC900727FF2 /* ES2Renderer.h in Headers */, + 15594F1215C55AC900727FF2 /* ESRenderer.h in Headers */, + 15594F8515C5697C00727FF2 /* ofAppiOSWindow.h in Headers */, + 15594F8715C5697C00727FF2 /* ofxiOSApp.h in Headers */, + 15594F9415C56A8A00727FF2 /* ofxiOSEAGLView.h in Headers */, + 15594F9515C56A8A00727FF2 /* ofxiOSAppDelegate.h in Headers */, + 15594F9615C56A8A00727FF2 /* ofxiOSViewController.h in Headers */, + 6678E97719FEB2DF00C00581 /* ofSoundBuffer.h in Headers */, + 15594FA515C56BB700727FF2 /* AVFoundationVideoGrabber.h in Headers */, + 15594FA615C56BB700727FF2 /* AVFoundationVideoPlayer.h in Headers */, + 15594FAD15C56C9500727FF2 /* ofxiOSAlerts.h in Headers */, + 15594FAE15C56C9500727FF2 /* ofxiOSAlertsListener.h in Headers */, + BF3679BC282BBBB9004FD612 /* ofxiOSMLKViewController.h in Headers */, + 15594FC515C56D1E00727FF2 /* ofxiOSCoreLocation.h in Headers */, + 15594FC615C56D1E00727FF2 /* ofxiOSExternalDisplay.h in Headers */, + 15594FC715C56D1E00727FF2 /* ofxiOSExtras.h in Headers */, + 15594FC815C56D1E00727FF2 /* ofxiOSImagePicker.h in Headers */, + 15594FC915C56D1E00727FF2 /* ofxiOSKeyboard.h in Headers */, + 15594FCA15C56D1E00727FF2 /* ofxiOSMapKit.h in Headers */, + 69433CD11FE45BF2004D5B73 /* ofSoundBaseTypes.h in Headers */, + 15594FCB15C56D1E00727FF2 /* ofxiOSMapKitDelegate.h in Headers */, + 90080016204EDA4B00DC786A /* ofxiOSGLKViewController.h in Headers */, + 15594FCC15C56D1E00727FF2 /* ofxiOSMapKitListener.h in Headers */, + 1594366615CF5F420087B684 /* ofxiOSVideoGrabber.h in Headers */, + 1594366715CF5F420087B684 /* ofxiOSVideoPlayer.h in Headers */, + BF3679B9282BBBB9004FD612 /* ofxiOSMLKView.h in Headers */, + 678C3D23176F04F800D1CC68 /* ofxiOSSoundStream.h in Headers */, + 678C3D25176F04F800D1CC68 /* ofxiOSSoundStreamDelegate.h in Headers */, + 678C3D27176F04F800D1CC68 /* SoundInputStream.h in Headers */, + 678C3D29176F04F800D1CC68 /* SoundOutputStream.h in Headers */, + 678C3D2B176F04F800D1CC68 /* SoundStream.h in Headers */, + 671C0AF41770246200DF03B3 /* AVSoundPlayer.h in Headers */, + 671C0AF61770246200DF03B3 /* ofxiOSSoundPlayer.h in Headers */, + BF3679BD282BBBB9004FD612 /* ofxiOSViewController.h in Headers */, + 67833F8719F8990D00DBE7AA /* ofTimer.h in Headers */, + 67509ABD17979781003A3A29 /* ofXml.h in Headers */, + 66EA462C17A6D396009BB12A /* ofxOpenALSoundPlayer.h in Headers */, + 66EA462E17A6D396009BB12A /* SoundEngine.h in Headers */, + 860B024D17A96D840032B827 /* ofxiOS.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + BB24DE5C10DA7A3F00E9C588 /* iPhone+OF Static Library */ = { + isa = PBXNativeTarget; + buildConfigurationList = BB24DED210DA7A3F00E9C588 /* Build configuration list for PBXNativeTarget "iPhone+OF Static Library" */; + buildPhases = ( + BB24DE5D10DA7A3F00E9C588 /* Headers */, + BB24DEB110DA7A3F00E9C588 /* Sources */, + BB24DEC910DA7A3F00E9C588 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "iPhone+OF Static Library"; + productName = "Static Library"; + productReference = BB24DED610DA7A3F00E9C588 /* libofxiOS_iphoneos_Debug.a */; + productType = "com.apple.product-type.library.static"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1330; + TargetAttributes = { + BB24DE5C10DA7A3F00E9C588 = { + DevelopmentTeam = M927U3X3CC; + }; + }; + }; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "iOS+OFLib" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + BB24DE5C10DA7A3F00E9C588 /* iPhone+OF Static Library */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + BB24DEB110DA7A3F00E9C588 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E4F76E19176CB27200798745 /* of3dPrimitives.cpp in Sources */, + E4F76E1B176CB27200798745 /* of3dUtils.cpp in Sources */, + BF3679BA282BBBB9004FD612 /* ofxiOSMLKView.mm in Sources */, + E4F76E1D176CB27200798745 /* ofCamera.cpp in Sources */, + E4F76E1F176CB27200798745 /* ofEasyCam.cpp in Sources */, + E4F76E23176CB27200798745 /* ofNode.cpp in Sources */, + BF3679BE282BBBB9004FD612 /* ofxiOSMLKViewController.mm in Sources */, + E4F76E2E176CB27200798745 /* ofAppRunner.cpp in Sources */, + 67833F8319F8990D00DBE7AA /* ofFpsCounter.cpp in Sources */, + E4F76E36176CB27200798745 /* ofEvents.cpp in Sources */, + E4F76E39176CB27200798745 /* ofFbo.cpp in Sources */, + E4F76E3B176CB27200798745 /* ofGLProgrammableRenderer.cpp in Sources */, + E4F76E3D176CB27200798745 /* ofGLRenderer.cpp in Sources */, + E4F76E3F176CB27200798745 /* ofGLUtils.cpp in Sources */, + E4F76E41176CB27200798745 /* ofLight.cpp in Sources */, + BF3679BB282BBBB9004FD612 /* ofxiOSViewController.mm in Sources */, + E4F76E43176CB27200798745 /* ofMaterial.cpp in Sources */, + E4F76E45176CB27200798745 /* ofShader.cpp in Sources */, + E4F76E49176CB27200798745 /* ofTexture.cpp in Sources */, + E4F76E4B176CB27200798745 /* ofVbo.cpp in Sources */, + 90080014204EDA1300DC786A /* ofxiOSGLKViewController.mm in Sources */, + E4F76E4D176CB27200798745 /* ofVboMesh.cpp in Sources */, + E4F76E4F176CB27200798745 /* of3dGraphics.cpp in Sources */, + E4F76E51176CB27200798745 /* ofBitmapFont.cpp in Sources */, + E4F76E55176CB27200798745 /* ofGraphics.cpp in Sources */, + E4F76E57176CB27200798745 /* ofImage.cpp in Sources */, + E4F76E59176CB27200798745 /* ofPath.cpp in Sources */, + E4F76E5B176CB27200798745 /* ofPixels.cpp in Sources */, + E4F76E5F176CB27200798745 /* ofRendererCollection.cpp in Sources */, + E4F76E61176CB27200798745 /* ofTessellator.cpp in Sources */, + E4F76E63176CB27200798745 /* ofTrueTypeFont.cpp in Sources */, + E4F76E65176CB27200798745 /* ofMath.cpp in Sources */, + 67833F8619F8990D00DBE7AA /* ofTimer.cpp in Sources */, + E4F76E67176CB27200798745 /* ofMatrix3x3.cpp in Sources */, + E4F76E69176CB27200798745 /* ofMatrix4x4.cpp in Sources */, + E4F76E6B176CB27200798745 /* ofQuaternion.cpp in Sources */, + E4F76E6D176CB27200798745 /* ofVec2f.cpp in Sources */, + E4F76E70176CB27200798745 /* ofVec4f.cpp in Sources */, + 69433CD01FE45BF2004D5B73 /* ofSoundBaseTypes.cpp in Sources */, + E4F76E80176CB27200798745 /* ofSoundPlayer.cpp in Sources */, + E4F76E82176CB27200798745 /* ofSoundStream.cpp in Sources */, + E4F76E84176CB27200798745 /* ofBaseTypes.cpp in Sources */, + E4F76E86176CB27200798745 /* ofColor.cpp in Sources */, + 6678E97619FEB2DF00C00581 /* ofSoundBuffer.cpp in Sources */, + E4F76E88176CB27200798745 /* ofParameter.cpp in Sources */, + E4F76E8A176CB27200798745 /* ofParameterGroup.cpp in Sources */, + E4F76E8E176CB27200798745 /* ofRectangle.cpp in Sources */, + E4F76E92176CB27200798745 /* ofFileUtils.cpp in Sources */, + E4F76E94176CB27200798745 /* ofLog.cpp in Sources */, + E4F76E96176CB27200798745 /* ofMatrixStack.cpp in Sources */, + E4F76E99176CB27200798745 /* ofSystemUtils.cpp in Sources */, + BF3679C3282BBCC4004FD612 /* EAMLKView.m in Sources */, + E4F76E9B176CB27200798745 /* ofThread.cpp in Sources */, + E4F76E9D176CB27200798745 /* ofURLFileLoader.cpp in Sources */, + E4F76E9F176CB27200798745 /* ofUtils.cpp in Sources */, + E4F76EB5176CB27200798745 /* ofVideoGrabber.cpp in Sources */, + E4F76EB7176CB27200798745 /* ofVideoPlayer.cpp in Sources */, + 15594F0C15C55AC900727FF2 /* EAGLView.m in Sources */, + 9252B7F21CDA2A6100A8032B /* ofxiOSEventAdapter.mm in Sources */, + 9979E8281A1CDBD4007E55D1 /* ofMainLoop.cpp in Sources */, + 15594F0D15C55AC900727FF2 /* ES1Renderer.m in Sources */, + 15594F0E15C55AC900727FF2 /* ES2Renderer.m in Sources */, + 15594F8115C5697C00727FF2 /* ofAppiOSWindow.mm in Sources */, + 15594F9115C56A8A00727FF2 /* ofxiOSEAGLView.mm in Sources */, + 15594F9215C56A8A00727FF2 /* ofxiOSAppDelegate.mm in Sources */, + 69433CCA1FE45BCD004D5B73 /* ofGraphicsBaseTypes.cpp in Sources */, + 15594F9315C56A8A00727FF2 /* ofxiOSViewController.mm in Sources */, + 9008001D204EDC0F00DC786A /* EAGLKView.m in Sources */, + 15594FA315C56BB700727FF2 /* AVFoundationVideoGrabber.mm in Sources */, + 15594FA415C56BB700727FF2 /* AVFoundationVideoPlayer.m in Sources */, + 15594FAC15C56C9500727FF2 /* ofxiOSAlerts.mm in Sources */, + 15594FBE15C56D1E00727FF2 /* ofxiOSCoreLocation.mm in Sources */, + 15594FBF15C56D1E00727FF2 /* ofxiOSExternalDisplay.mm in Sources */, + 15594FC015C56D1E00727FF2 /* ofxiOSExtras.mm in Sources */, + 15594FC115C56D1E00727FF2 /* ofxiOSImagePicker.mm in Sources */, + 15594FC215C56D1E00727FF2 /* ofxiOSKeyboard.mm in Sources */, + 15594FC315C56D1E00727FF2 /* ofxiOSMapKit.mm in Sources */, + 15594FC415C56D1E00727FF2 /* ofxiOSMapKitDelegate.mm in Sources */, + 69433CC31FE45BAC004D5B73 /* ofBaseApp.cpp in Sources */, + 67833F8A19F8996300DBE7AA /* ofBufferObject.cpp in Sources */, + 1594366415CF5F420087B684 /* ofxiOSVideoGrabber.mm in Sources */, + 1594366515CF5F420087B684 /* ofxiOSVideoPlayer.mm in Sources */, + 678C3D24176F04F800D1CC68 /* ofxiOSSoundStream.mm in Sources */, + 678C3D26176F04F800D1CC68 /* ofxiOSSoundStreamDelegate.mm in Sources */, + 678C3D28176F04F800D1CC68 /* SoundInputStream.m in Sources */, + 678C3D2A176F04F800D1CC68 /* SoundOutputStream.m in Sources */, + 678C3D2C176F04F800D1CC68 /* SoundStream.m in Sources */, + 671C0AF51770246200DF03B3 /* AVSoundPlayer.m in Sources */, + 671C0AF71770246200DF03B3 /* ofxiOSSoundPlayer.mm in Sources */, + 67509ABC17979781003A3A29 /* ofXml.cpp in Sources */, + 66EA462B17A6D396009BB12A /* ofxOpenALSoundPlayer.cpp in Sources */, + 67D48ED41C103BAE00F719BC /* ofxiOSCoreMotion.mm in Sources */, + 9008001A204EDB5500DC786A /* ofxiOSGLKView.mm in Sources */, + 66EA462D17A6D396009BB12A /* SoundEngine.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + BB24DED310DA7A3F00E9C588 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = "Apple Distribution"; + CONFIGURATION_BUILD_DIR = "$(SRCROOT)/../../lib/ios/"; + COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = NO; + DEVELOPMENT_TEAM = M927U3X3CC; + ENABLE_BITCODE = YES; + EXECUTABLE_PREFIX = lib; + FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../../../libs/metal/lib/ios/**"; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + GLES_SILENCE_DEPRECATION, + GL_SILENCE_DEPRECATION, + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = NO; + GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES; + GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; + HEADER_SEARCH_PATHS = ""; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/kiss/lib/linux\"", + "\"$(SRCROOT)/kiss/lib/linux64\"", + "\"$(SRCROOT)/../../../tess2/lib/ios\"", + "\"$(SRCROOT)/../../../poco/lib/ios\"", + ); + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + PRODUCT_NAME = "ofxiOS_${PLATFORM_NAME}_Debug"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + USER_HEADER_SEARCH_PATHS = "$(OF_CORE_HEADERS)"; + }; + name = Debug; + }; + BB24DED410DA7A3F00E9C588 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD)"; + CODE_SIGN_IDENTITY = "Apple Distribution"; + CONFIGURATION_BUILD_DIR = "$(SRCROOT)/../../lib/ios/"; + COPY_PHASE_STRIP = YES; + DEAD_CODE_STRIPPING = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = M927U3X3CC; + ENABLE_BITCODE = YES; + EXECUTABLE_PREFIX = lib; + FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../../../libs/metal/lib/ios/**"; + GCC_OPTIMIZATION_LEVEL = z; + GCC_PREPROCESSOR_DEFINITIONS = ( + GLES_SILENCE_DEPRECATION, + GL_SILENCE_DEPRECATION, + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = NO; + GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES; + GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; + HEADER_SEARCH_PATHS = ""; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/kiss/lib/linux\"", + "\"$(SRCROOT)/kiss/lib/linux64\"", + "\"$(SRCROOT)/../../../tess2/lib/ios\"", + "\"$(SRCROOT)/../../../poco/lib/ios\"", + ); + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + PRODUCT_NAME = "ofxiOS_${PLATFORM_NAME}_ReleaseAppStore"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + USER_HEADER_SEARCH_PATHS = "$(OF_CORE_HEADERS)"; + ZERO_LINK = NO; + }; + name = Release; + }; + C01FCF4F08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = E41D3E9113B38BE900A75A5D /* Debug.xcconfig */; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD)"; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "Apple Distribution"; + CONFIGURATION_BUILD_DIR = "$(SRCROOT)/../../lib/ios/"; + CONFIGURATION_TEMP_DIR = "$(SRCROOT)/../../lib/ios/build/debug/"; + DEVELOPMENT_TEAM = M927U3X3CC; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../../../libs/metal/lib/ios"; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_CHECK_SWITCH_STATEMENTS = NO; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + OBJROOT = "$(SRCROOT)/../../lib/ios/build/debug"; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = "iphonesimulator iphoneos"; + SYMROOT = "$(SRCROOT)/../../lib/ios/"; + VALID_ARCHS = "$(ARCHS_STANDARD)"; + WARNING_CFLAGS = ( + "-Wno-non-virtual-dtor", + "-Wno-overloaded-virtual", + ); + }; + name = Debug; + }; + C01FCF5008A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = E41D3E9213B38BE900A75A5D /* Release.xcconfig */; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD)"; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "Apple Distribution"; + CONFIGURATION_BUILD_DIR = "$(SRCROOT)/../../lib/ios/"; + CONFIGURATION_TEMP_DIR = "$(SRCROOT)/../../lib/ios/build/release/"; + DEVELOPMENT_TEAM = M927U3X3CC; + ENABLE_STRICT_OBJC_MSGSEND = YES; + FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../../../libs/metal/lib/ios"; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_CHECK_SWITCH_STATEMENTS = NO; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + OBJROOT = "$(SRCROOT)/../../lib/ios/build/release"; + ONLY_ACTIVE_ARCH = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = "iphonesimulator iphoneos"; + SYMROOT = "$(SRCROOT)/../../lib/ios/"; + VALID_ARCHS = "$(ARCHS_STANDARD)"; + WARNING_CFLAGS = ( + "-Wno-non-virtual-dtor", + "-Wno-overloaded-virtual", + ); + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + BB24DED210DA7A3F00E9C588 /* Build configuration list for PBXNativeTarget "iPhone+OF Static Library" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + BB24DED310DA7A3F00E9C588 /* Debug */, + BB24DED410DA7A3F00E9C588 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "iOS+OFLib" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4F08A954540054247B /* Debug */, + C01FCF5008A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Debug; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} From 3c4a39b301ddb72f10f1b9d0dcf44f227cb37bf8 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Sat, 14 May 2022 03:11:25 +1000 Subject: [PATCH 23/32] iOS Metal Renderer working --- addons/ofxiOS/src/app/ofAppiOSWindow.mm | 19 +- addons/ofxiOS/src/core/ofxiOSAppDelegate.h | 2 +- addons/ofxiOS/src/core/ofxiOSAppDelegate.mm | 9 +- addons/ofxiOS/src/core/ofxiOSMLKView.h | 111 +- addons/ofxiOS/src/core/ofxiOSMLKView.mm | 800 +++++++------- .../ofxiOS/src/core/ofxiOSMLKViewController.h | 90 +- .../src/core/ofxiOSMLKViewController.mm | 996 +++++++++--------- addons/ofxiOS/src/ml/EAMLKView.h | 21 +- addons/ofxiOS/src/ml/EAMLKView.m | 12 +- addons/ofxiOS/src/ofxiOS.h | 2 + .../src/video/AVFoundationVideoPlayer.m | 4 +- .../graphics/ofTrueTypeFont.cpp | 6 + libs/openFrameworks/graphics/ofTrueTypeFont.h | 24 +- libs/openFrameworks/utils/ofConstants.h | 6 +- .../project/ios/Debug.xcconfig | 2 + .../project/ios/Shared.xcconfig | 2 + .../ios/iOS+OFLib.xcodeproj/project.pbxproj | 28 +- .../iPhone+OF Static Library.xcscheme | 67 ++ 18 files changed, 1209 insertions(+), 992 deletions(-) create mode 100644 libs/openFrameworksCompiled/project/ios/iOS+OFLib.xcodeproj/xcshareddata/xcschemes/iPhone+OF Static Library.xcscheme diff --git a/addons/ofxiOS/src/app/ofAppiOSWindow.mm b/addons/ofxiOS/src/app/ofAppiOSWindow.mm index 153c8a8b7d3..65f55a648ad 100644 --- a/addons/ofxiOS/src/app/ofAppiOSWindow.mm +++ b/addons/ofxiOS/src/app/ofAppiOSWindow.mm @@ -42,6 +42,7 @@ const std::string appDelegateName = "ofxtvOSAppDelegate"; #endif #include "ofxiOSGLKView.h" +#include "ofxiOSMLKView.h" #include "ofxiOSEAGLView.h" //----------------------------------------------------------------------------------- instance. @@ -166,21 +167,27 @@ } glm::vec2 ofAppiOSWindow::getWindowPosition() { - if(settings.windowControllerType == METAL_KIT || settings.windowControllerType == GL_KIT) + if(settings.windowControllerType == METAL_KIT) { + return *[[ofxiOSMLKView getInstance] getWindowPosition]; + }else if(settings.windowControllerType == GL_KIT) return *[[ofxiOSGLKView getInstance] getWindowPosition]; else return *[[ofxiOSEAGLView getInstance] getWindowPosition]; } glm::vec2 ofAppiOSWindow::getWindowSize() { - if(settings.windowControllerType == METAL_KIT || settings.windowControllerType == GL_KIT) + if(settings.windowControllerType == METAL_KIT) { + return *[[ofxiOSMLKView getInstance] getWindowSize]; + }else if(settings.windowControllerType == GL_KIT) return *[[ofxiOSGLKView getInstance] getWindowSize]; else return *[[ofxiOSEAGLView getInstance] getWindowSize]; } glm::vec2 ofAppiOSWindow::getScreenSize() { - if(settings.windowControllerType == METAL_KIT || settings.windowControllerType == GL_KIT) + if(settings.windowControllerType == METAL_KIT) { + return *[[ofxiOSMLKView getInstance] getScreenSize]; + } else if(settings.windowControllerType == GL_KIT) return *[[ofxiOSGLKView getInstance] getScreenSize]; else return *[[ofxiOSEAGLView getInstance] getScreenSize]; @@ -430,7 +437,11 @@ void ofAppiOSWindow::enableMultiTouch(bool isOn) { settings.enableMultiTouch = isOn; #if TARGET_OS_IOS || (TARGET_OS_IPHONE && !TARGET_OS_TV) - if(settings.windowControllerType == METAL_KIT || settings.windowControllerType == GL_KIT) { + if(settings.windowControllerType == METAL_KIT) { + if([ofxiOSMLKView getInstance]) { + //[[ofxiOSMLKView getInstance] setMultipleTouchEnabled:isOn]; + } + } else if(settings.windowControllerType == GL_KIT) { if([ofxiOSGLKView getInstance]) { [[ofxiOSGLKView getInstance] setMultipleTouchEnabled:isOn]; } diff --git a/addons/ofxiOS/src/core/ofxiOSAppDelegate.h b/addons/ofxiOS/src/core/ofxiOSAppDelegate.h index 0e8c1e530df..db0a123c8aa 100644 --- a/addons/ofxiOS/src/core/ofxiOSAppDelegate.h +++ b/addons/ofxiOS/src/core/ofxiOSAppDelegate.h @@ -38,7 +38,7 @@ @class ofxiOSViewController; @class ofxiOSGLKViewController; -//@class ofxiOSMTKViewController; +@class ofxiOSMTKViewController; @interface ofxiOSAppDelegate : NSObject { NSInteger currentScreenIndex; diff --git a/addons/ofxiOS/src/core/ofxiOSAppDelegate.mm b/addons/ofxiOS/src/core/ofxiOSAppDelegate.mm index 67aab9449f4..2a5be67b22d 100644 --- a/addons/ofxiOS/src/core/ofxiOSAppDelegate.mm +++ b/addons/ofxiOS/src/core/ofxiOSAppDelegate.mm @@ -35,6 +35,7 @@ #import "ofxiOSViewController.h" #import "ofxiOSGLKViewController.h" +#import "ofxiOSMLKViewController.h" #import "ofxiOSExternalDisplay.h" #include "ofxiOSExtras.h" #include "ofxiOSAlerts.h" @@ -139,7 +140,8 @@ - (void)applicationDidFinishLaunching:(UIApplication *)application { switch(ofxiOSGetOFWindow()->getWindowControllerType()) { case METAL_KIT: - NSLog(@"No MetalKit yet supported for openFrameworks: Falling back to GLKit"); + NSLog(@"Metal ANGLE openFrameworks"); + self.uiViewController = (UIViewController *)[[ofxiOSMLKViewController alloc] initWithFrame:frame app:(ofxiOSApp *)ofGetAppPtr()]; case GL_KIT: self.uiViewController = (UIViewController *)[[ofxiOSGLKViewController alloc] initWithFrame:frame app:(ofxiOSApp *)ofGetAppPtr() sharegroup:nil]; break; @@ -253,6 +255,11 @@ - (void)receivedRotate:(NSNotification*)notification { if([controller isReadyToRotate]) { ofxiOSAlerts.deviceOrientationChanged( deviceOrientation ); } + } else if([self.uiViewController isKindOfClass:ofxiOSMLKViewController.class]) { + ofxiOSMLKViewController *controller = (ofxiOSMLKViewController *)self.uiViewController; + if([controller isReadyToRotate]) { + ofxiOSAlerts.deviceOrientationChanged( deviceOrientation ); + } } } }else { diff --git a/addons/ofxiOS/src/core/ofxiOSMLKView.h b/addons/ofxiOS/src/core/ofxiOSMLKView.h index 3b7a052577f..912c1644490 100644 --- a/addons/ofxiOS/src/core/ofxiOSMLKView.h +++ b/addons/ofxiOS/src/core/ofxiOSMLKView.h @@ -1,50 +1,63 @@ -//// -//// ofxiOSGLKView.mm -//// iPhone+OF Static Library -//// -//// Created by Dan Rosser on 7/3/18. -//// // -// -//#pragma once -//#include -//#import -//#import "EAGLKView.h" -//#include -// -//class ofxiOSApp; -//class ofAppiOSWindow; -// -//@interface ofxiOSGLKView : EAGLKView { -// -//@protected -// NSMutableDictionary * activeTouches; -// glm::vec2 * screenSize; // because glm::vec2 is forward declared, -// glm::vec2 * windowSize; // these values have to be pointers. -// glm::vec2 * windowPos; -//} -// -//@property (readonly, nonatomic, getter=getScreenSize) glm::vec2 * screenSize; -//@property (readonly, nonatomic, getter=getWindowSize) glm::vec2 * windowSize; -//@property (readonly, nonatomic, getter=getWindowPosition) glm::vec2 * windowPos; -// -//+ (ofxiOSGLKView *) getInstance; -// -//- (instancetype)initWithFrame:(CGRect)frame -// andApp:(ofxiOSApp *)app; -//- (instancetype)initWithFrame:(CGRect)frame -// andApp:(ofxiOSApp *)app -// sharegroup:(EAGLSharegroup *)sharegroup; -//- (void)setup; -//- (void)update; -//- (void)draw; -//- (void)setMSAA:(bool)on; -//- (void)updateDimensions; -//- (void)destroy; -//- (CGPoint)orientateTouchPoint:(CGPoint)touchPoint; -//- (void)resetTouches; -//- (UIImage*)getSnapshot; -// -//@end -// -//#define ofxiPhoneEAGLView ofxiOSEAGLView +// ofxiOSGLKView.mm +// iPhone+OF Static Library +// +// Created by Dan Rosser on 7/3/18. +// + + +#pragma once +#include +#import +#import "EAMLKView.h" +#import +#import +#include + +class ofxiOSApp; +class ofAppiOSWindow; + +@interface ofxiOSMLKView : NSObject { + +@protected + NSMutableDictionary * activeTouches; + glm::vec2 * screenSize; // because glm::vec2 is forward declared, + glm::vec2 * windowSize; // these values have to be pointers. + glm::vec2 * windowPos; + MGLKView * theMetal; + CGFloat scaleFactor; + CGFloat scaleFactorPref; +} + +@property (readonly, nonatomic, getter=getScreenSize) glm::vec2 * screenSize; +@property (readonly, nonatomic, getter=getWindowSize) glm::vec2 * windowSize; +@property (readonly, nonatomic, getter=getWindowPosition) glm::vec2 * windowPos; + ++ (ofxiOSMLKView *) getInstance; + +- (instancetype)initWithFrame:(CGRect)frame + andApp:(ofxiOSApp *)app; + +- (void)mglkView:(MGLKView *)view drawInRect:(CGRect)rect; +- (void)setupMetal:(MGLKView *)metal; +- (void)setup; +- (void)update; +- (void)draw; +- (void)setMSAA:(bool)on; +- (void)updateDimensions; +- (void)destroy; +- (CGPoint)orientateTouchPoint:(CGPoint)touchPoint; +- (void)resetTouches; + +- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event; +- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event; +- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event; +- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event; +//- (void)touchesEstimatedPropertiesUpdated:(NSSet *)touches; +//- (void)notifyAnimationStarted; +//- (void)notifyAnimationStopped; +//- (void)notifyDraw; +//- (void)notifyResized; + + +@end diff --git a/addons/ofxiOS/src/core/ofxiOSMLKView.mm b/addons/ofxiOS/src/core/ofxiOSMLKView.mm index ca997044662..b12a9b0b50e 100644 --- a/addons/ofxiOS/src/core/ofxiOSMLKView.mm +++ b/addons/ofxiOS/src/core/ofxiOSMLKView.mm @@ -1,401 +1,423 @@ -//// -//// ofxiOSGLKView.mm -//// iPhone+OF Static Library -//// -//// Created by Dan Rosser on 7/3/18. -//// // -//#include "ofxiOSGLKView.h" -//#include "ofxiOSApp.h" -//#include "ofAppiOSWindow.h" -//#include "ofGLRenderer.h" -//#include "ofGLProgrammableRenderer.h" -//#include -//#import -// -//static ofxiOSGLKView * _instanceRef = nil; -// -//@interface ofxiOSGLKView() { -// BOOL bInit; -// shared_ptr window; -// shared_ptr app; -// BOOL bSetup; -//} -//- (void)updateDimensions; -//@end -// -//@implementation ofxiOSGLKView -// -//@synthesize screenSize; -//@synthesize windowSize; -//@synthesize windowPos; -// -//+ (ofxiOSGLKView *) getInstance { -// return _instanceRef; -//} -// -//- (instancetype)initWithFrame:(CGRect)frame andApp:(ofxiOSApp *)appPtr { -// return [self initWithFrame:frame andApp:appPtr sharegroup:nil]; -//} -// -//- (instancetype)initWithFrame:(CGRect)frame andApp:(ofxiOSApp *)appPtr sharegroup:(EAGLSharegroup *)sharegroup{ -// -// window = dynamic_pointer_cast(ofGetMainLoop()->getCurrentWindow()); -// -// if(window.get() == NULL) { -// ofLog(OF_LOG_FATAL_ERROR, "ofxiOSEAGLView::initWithFrame - window is NULL"); -// return nil; -// } -// +// ofxiOSGLKView.mm +// iPhone+OF Static Library +// +// Created by Dan Rosser on 7/3/18. +// + +#include "ofxiOSMLKView.h" +#include "ofxiOSApp.h" +#include "ofAppiOSWindow.h" +#include "ofGLRenderer.h" +#include "ofGLProgrammableRenderer.h" +#include +#import + +static ofxiOSMLKView * _instanceRef = nil; + +@interface ofxiOSMLKView() { + BOOL bInit; + shared_ptr window; + shared_ptr app; + BOOL bSetup; +} +- (void)updateDimensions; +@end + +@implementation ofxiOSMLKView + +@synthesize screenSize; +@synthesize windowSize; +@synthesize windowPos; + + ++ (ofxiOSMLKView *) getInstance { + return _instanceRef; +} + ++(id)alloc{ + NSLog(@"Allocating..."); +// return self; + return [super alloc]; +} + +- (instancetype)initWithFrame:(CGRect)frame andApp:(ofxiOSApp *)appPtr { + + window = dynamic_pointer_cast(ofGetMainLoop()->getCurrentWindow()); + + if(window.get() == NULL) { + ofLog(OF_LOG_FATAL_ERROR, "ofxiOSEAMLView::initWithFrame - window is NULL"); + return nil; + } + // ESRendererVersion preferedRendererVersion = (ESRendererVersion)window->getSettings().glesVersion; -// +// + + // self = [self initWithFrame:frame // andPreferedRenderer:preferedRendererVersion // andAA:window->isAntiAliasingEnabled() // andRetina:window->isRetinaEnabled() // andRetinaScale:window->getRetinaScale() -// sharegroup:sharegroup -// colorFormat:(GLKViewDrawableColorFormat)window->getRendererColorType() -// depthFormat:(GLKViewDrawableDepthFormat)window->getRendererDepthType() -// stencilFormat:(GLKViewDrawableStencilFormat)window->getRendererStencilType()]; -// -// bSetup = NO; -// if(self) { -// -// _instanceRef = self; -// -// app = shared_ptr(appPtr); -// activeTouches = [[NSMutableDictionary alloc] init]; -// -// screenSize = new glm::vec2(); -// windowSize = new glm::vec2(); -// windowPos = new glm::vec2(); -// ofSetOrientation(window->getOrientation()); -// [self updateDimensions]; -// -// bInit = YES; -// } -// -// return self; -//} -// -//- (void)setup { -// if(window.get() == NULL) { -// ofLog(OF_LOG_FATAL_ERROR, "ofxiOSEAGLView setup. Failed setup. window is NULL"); -// return; -// } -// -// if(app.get() != ofGetAppPtr()) { // check if already running. -// -// ofSetMainLoop(shared_ptr(NULL)); // destroy old main loop. -// auto mainLoop = std::make_shared(); // make new main loop. -// ofSetMainLoop(mainLoop); -// -// ofiOSWindowSettings windowSettings = window->getSettings(); -// window = NULL; -// -// window = dynamic_pointer_cast(ofCreateWindow(windowSettings)); -// -// ofRunApp(app); -// } -// -// if(window->isProgrammableRenderer() == true) { -// static_cast(window->renderer().get())->setup(window->getSettings().glesVersion, 0); -// } else{ -// static_cast(window->renderer().get())->setup(); -// } -// -// ofxiOSAlerts.addListener(app.get()); -// -// ofDisableTextureEdgeHack(); -// -// window->events().notifySetup(); -// bSetup = YES; -// window->renderer()->clear(); -//} -// -//- (void)destroy { -// if(!bInit) { -// return; -// } -// -// window->events().notifyExit(); -// -// ofxiOSAlerts.removeListener(app.get()); -// -// ofGetMainLoop()->exit(); -// -// app = NULL; -// window = NULL; -// -// activeTouches = nil; -// delete screenSize; -// screenSize = NULL; -// delete windowSize; -// windowSize = NULL; -// delete windowPos; -// windowPos = NULL; -// -// _instanceRef = nil; -// -// bInit = NO; -// +// colorFormat:(MGLDrawableColorFormat)window->getRendererColorType() +// depthFormat:(MGLDrawableDepthFormat)window->getRendererDepthType() +// stencilFormat:(MGLDrawableStencilFormat)window->getRendererStencilType()]; + + bSetup = NO; + if(self) { + + _instanceRef = self; + + app = shared_ptr(appPtr); + activeTouches = [[NSMutableDictionary alloc] init]; + + screenSize = new glm::vec2(); + windowSize = new glm::vec2(); + windowPos = new glm::vec2(); + ofSetOrientation(window->getOrientation()); + [self updateDimensions]; + + bInit = YES; + } + + return self; +} + +- (void)setup { + if(window.get() == NULL) { + ofLog(OF_LOG_FATAL_ERROR, "ofxiOSEAGLView setup. Failed setup. window is NULL"); + return; + } + + if(app.get() != ofGetAppPtr()) { // check if already running. + + ofSetMainLoop(shared_ptr(NULL)); // destroy old main loop. + auto mainLoop = std::make_shared(); // make new main loop. + ofSetMainLoop(mainLoop); + + ofiOSWindowSettings windowSettings = window->getSettings(); + window = NULL; + + window = dynamic_pointer_cast(ofCreateWindow(windowSettings)); + + ofRunApp(app); + } + + if(window->isProgrammableRenderer() == true) { + static_cast(window->renderer().get())->setup(window->getSettings().glesVersion, 0); + } else{ + static_cast(window->renderer().get())->setup(); + } + + ofxiOSAlerts.addListener(app.get()); + + ofDisableTextureEdgeHack(); + + window->events().notifySetup(); + bSetup = YES; + window->renderer()->clear(); +} + +- (void)destroy { + if(!bInit) { + return; + } + + window->events().notifyExit(); + + ofxiOSAlerts.removeListener(app.get()); + + ofGetMainLoop()->exit(); + + app = NULL; + window = NULL; + + activeTouches = nil; + delete screenSize; + screenSize = NULL; + delete windowSize; + windowSize = NULL; + delete windowPos; + windowPos = NULL; + + _instanceRef = nil; + + bInit = NO; + // [super destroy]; -//} -// -//- (void)dealloc { -// [self destroy]; -//} -// -//- (void)layoutSubviews { +} +- (void)mglkView:(MGLKView *)view drawInRect:(CGRect)rect { +// [super mglkView:view drawInRect:rect]; +} + +- (void)dealloc { + [self destroy]; +} + +- (void)layoutSubviews { // [super layoutSubviews]; // [self updateDimensions]; -// -// [super notifyResized]; -// window->events().notifyWindowResized(ofGetWidth(), ofGetHeight()); -//} -// -//- (void)updateDimensions { -// *windowPos = glm::vec2(self.frame.origin.x * scaleFactor, self.frame.origin.y * scaleFactor); -// *windowSize = glm::vec2(self.bounds.size.width * scaleFactor, self.bounds.size.height * scaleFactor); -// -// UIScreen * currentScreen = self.window.screen; // current screen is the screen that GLView is attached to. -// if(!currentScreen) { // if GLView is not attached, assume to be main device screen. -// currentScreen = [UIScreen mainScreen]; -// } -// *screenSize = glm::vec2(currentScreen.bounds.size.width * scaleFactor, currentScreen.bounds.size.height * scaleFactor); -//} // -//- (void) setMSAA:(bool)on -//{ -// if(on) -// self.drawableMultisample = GLKViewDrawableMultisample4X; -// else -// self.drawableMultisample = GLKViewDrawableMultisampleNone; -//} -// -//- (void)notifyResized { -// // blank this. -// // we want to notifyResized at the end of layoutSubviews. -//} -// -//- (void)update { -// if(bSetup == NO) return; -// -// window->events().notifyUpdate(); -//} -// -// -//- (void)draw { -// if(bSetup == NO) return; -// -// window->renderer()->startRender(); -// -// if(window->isSetupScreenEnabled()) { -// window->renderer()->setupScreen(); -// } -// -// //------------------------------------------ draw. -// -// window->events().notifyDraw(); -// -// //------------------------------------------ -// -// window->renderer()->finishRender(); -// +// [super notifyResized]; + window->events().notifyWindowResized(ofGetWidth(), ofGetHeight()); +} + +- (void)updateDimensions { + *windowPos = glm::vec2(theMetal.frame.origin.x * scaleFactor, theMetal.frame.origin.y * scaleFactor); + *windowSize = glm::vec2(theMetal.bounds.size.width * scaleFactor, theMetal.bounds.size.height * scaleFactor); + + UIScreen * currentScreen = theMetal.window.screen; // current screen is the screen that GLView is attached to. + if(!currentScreen) { // if GLView is not attached, assume to be main device screen. + currentScreen = [UIScreen mainScreen]; + } + *screenSize = glm::vec2(currentScreen.bounds.size.width * scaleFactor, currentScreen.bounds.size.height * scaleFactor); +} + +- (void) setMSAA:(bool)on +{ + if(on) + theMetal.drawableMultisample = MGLDrawableMultisample4X; + else + theMetal.drawableMultisample = MGLDrawableMultisampleNone; +} + +- (void)notifyResized { + // blank this. + // we want to notifyResized at the end of layoutSubviews. +} + +- (void)update { + if(bSetup == NO) return; + + window->events().notifyUpdate(); +} + + +- (void)draw { + if(bSetup == NO) return; + + window->renderer()->startRender(); + + if(window->isSetupScreenEnabled()) { + window->renderer()->setupScreen(); + } + + //------------------------------------------ draw. + + window->events().notifyDraw(); + + //------------------------------------------ + + window->renderer()->finishRender(); + // [super notifyDraw]; // alerts delegate that a new frame has been drawn. -//} -// -// -//- (void)notifyDraw { -// // blank this. -// // we want to notifyDraw at the end of drawView. -//} -// -////------------------------------------------------------ -//- (CGPoint)orientateTouchPoint:(CGPoint)touchPoint { -// -// if(ofAppiOSWindow::getInstance()->doesHWOrientation()) { -// return touchPoint; -// } -// -// ofOrientation orientation = ofGetOrientation(); -// CGPoint touchPointOriented = CGPointZero; -// -// switch(orientation) { -// case OF_ORIENTATION_180: -// touchPointOriented.x = ofGetWidth() - touchPoint.x; -// touchPointOriented.y = ofGetHeight() - touchPoint.y; -// break; -// -// case OF_ORIENTATION_90_RIGHT: -// touchPointOriented.x = touchPoint.y; -// touchPointOriented.y = ofGetHeight() - touchPoint.x; -// break; -// -// case OF_ORIENTATION_90_LEFT: -// touchPointOriented.x = ofGetWidth() - touchPoint.y; -// touchPointOriented.y = touchPoint.x; -// break; -// -// case OF_ORIENTATION_DEFAULT: -// default: -// touchPointOriented = touchPoint; -// break; -// } -// return touchPointOriented; -//} -// -////------------------------------------------------------ -// -//-(void) resetTouches { -// -// [activeTouches removeAllObjects]; -//} -// -//- (void)touchesBegan:(NSSet *)touches -// withEvent:(UIEvent *)event{ -// -// if(!bInit || !bSetup) { -// // if the glView is destroyed which also includes the OF app, -// // we no longer need to pass on these touch events. -// return; -// } -// -// for(UITouch *touch in touches) { -// int touchIndex = 0; -// while([[activeTouches allValues] containsObject:[NSNumber numberWithInt:touchIndex]]){ -// touchIndex++; -// } -// -// [activeTouches setObject:@(touchIndex) forKey:[NSValue valueWithPointer:(__bridge void *)touch]]; -// -// CGPoint touchPoint = [touch locationInView:self]; -// -// touchPoint.x *= scaleFactor; // this has to be done because retina still returns points in 320x240 but with high percision -// touchPoint.y *= scaleFactor; -// touchPoint = [self orientateTouchPoint:touchPoint]; -// -// if( touchIndex==0 ){ -// window->events().notifyMousePressed(touchPoint.x, touchPoint.y, 0); -// } -// -// ofTouchEventArgs touchArgs; -// touchArgs.numTouches = [[event touchesForView:self] count]; -// touchArgs.x = touchPoint.x; -// touchArgs.y = touchPoint.y; -// touchArgs.id = touchIndex; -// if([touch tapCount] == 2){ -// touchArgs.type = ofTouchEventArgs::doubleTap; -// ofNotifyEvent(window->events().touchDoubleTap,touchArgs); // send doubletap -// } -// touchArgs.type = ofTouchEventArgs::down; -// ofNotifyEvent(window->events().touchDown,touchArgs); // but also send tap (upto app programmer to ignore this if doubletap came that frame) -// } -//} -// -////------------------------------------------------------ -//- (void)touchesMoved:(NSSet *)touches -// withEvent:(UIEvent *)event{ -// -// if(!bInit || !bSetup) { -// // if the glView is destroyed which also includes the OF app, -// // we no longer need to pass on these touch events. -// return; -// } -// -// for(UITouch *touch in touches){ -// int touchIndex = [[activeTouches objectForKey:[NSValue valueWithPointer:(__bridge void *)touch]] intValue]; -// -// CGPoint touchPoint = [touch locationInView:self]; -// -// touchPoint.x *= scaleFactor; // this has to be done because retina still returns points in 320x240 but with high percision -// touchPoint.y *= scaleFactor; -// touchPoint = [self orientateTouchPoint:touchPoint]; -// -// if( touchIndex==0 ){ -// window->events().notifyMouseDragged(touchPoint.x, touchPoint.y, 0); -// } -// ofTouchEventArgs touchArgs; -// touchArgs.numTouches = [[event touchesForView:self] count]; -// touchArgs.x = touchPoint.x; -// touchArgs.y = touchPoint.y; -// touchArgs.id = touchIndex; -// touchArgs.type = ofTouchEventArgs::move; -// ofNotifyEvent(window->events().touchMoved, touchArgs); -// } -//} -// -////------------------------------------------------------ -//- (void)touchesEnded:(NSSet *)touches -// withEvent:(UIEvent *)event{ -// -// if(!bInit || !bSetup) { -// // if the glView is destroyed which also includes the OF app, -// // we no longer need to pass on these touch events. -// return; -// } -// -// for(UITouch *touch in touches){ -// int touchIndex = [[activeTouches objectForKey:[NSValue valueWithPointer:(__bridge void *)touch]] intValue]; -// -// [activeTouches removeObjectForKey:[NSValue valueWithPointer:(__bridge void *)touch]]; -// -// CGPoint touchPoint = [touch locationInView:self]; -// -// touchPoint.x *= scaleFactor; // this has to be done because retina still returns points in 320x240 but with high percision -// touchPoint.y *= scaleFactor; -// touchPoint = [self orientateTouchPoint:touchPoint]; -// -// if( touchIndex==0 ){ -// window->events().notifyMouseReleased(touchPoint.x, touchPoint.y, 0); -// } -// -// ofTouchEventArgs touchArgs; -// touchArgs.numTouches = [[event touchesForView:self] count] - [touches count]; -// touchArgs.x = touchPoint.x; -// touchArgs.y = touchPoint.y; -// touchArgs.id = touchIndex; -// touchArgs.type = ofTouchEventArgs::up; -// ofNotifyEvent(window->events().touchUp, touchArgs); -// } -//} -// -////------------------------------------------------------ -//- (void)touchesCancelled:(NSSet *)touches -// withEvent:(UIEvent *)event{ -// -// if(!bInit || !bSetup) { -// // if the glView is destroyed which also includes the OF app, -// // we no longer need to pass on these touch events. -// return; -// } -// -// for(UITouch *touch in touches){ -// int touchIndex = [[activeTouches objectForKey:[NSValue valueWithPointer:(__bridge void *)touch]] intValue]; -// -// CGPoint touchPoint = [touch locationInView:self]; -// -// touchPoint.x *= scaleFactor; // this has to be done because retina still returns points in 320x240 but with high percision -// touchPoint.y *= scaleFactor; -// touchPoint = [self orientateTouchPoint:touchPoint]; -// -// ofTouchEventArgs touchArgs; -// touchArgs.numTouches = [[event touchesForView:self] count]; -// touchArgs.x = touchPoint.x; -// touchArgs.y = touchPoint.y; -// touchArgs.id = touchIndex; -// touchArgs.type = ofTouchEventArgs::cancel; -// ofNotifyEvent(window->events().touchCancelled, touchArgs); -// } -// -// [self touchesEnded:touches withEvent:event]; -//} -// -//- (UIImage*)getSnapshot { -// return self.snapshot; -//} -// -// -// -//@end +} + + +- (void)notifyDraw { + // blank this. + // we want to notifyDraw at the end of drawView. +} + +//------------------------------------------------------ +- (CGPoint)orientateTouchPoint:(CGPoint)touchPoint { + + if(ofAppiOSWindow::getInstance()->doesHWOrientation()) { + return touchPoint; + } + + ofOrientation orientation = ofGetOrientation(); + CGPoint touchPointOriented = CGPointZero; + + switch(orientation) { + case OF_ORIENTATION_180: + touchPointOriented.x = ofGetWidth() - touchPoint.x; + touchPointOriented.y = ofGetHeight() - touchPoint.y; + break; + + case OF_ORIENTATION_90_RIGHT: + touchPointOriented.x = touchPoint.y; + touchPointOriented.y = ofGetHeight() - touchPoint.x; + break; + + case OF_ORIENTATION_90_LEFT: + touchPointOriented.x = ofGetWidth() - touchPoint.y; + touchPointOriented.y = touchPoint.x; + break; + + case OF_ORIENTATION_DEFAULT: + default: + touchPointOriented = touchPoint; + break; + } + return touchPointOriented; +} + +//------------------------------------------------------ + +-(void) resetTouches { + + [activeTouches removeAllObjects]; +} + +- (void)touchesBegan:(NSSet *)touches + withEvent:(UIEvent *)event{ + + if(!bInit || !bSetup) { + // if the glView is destroyed which also includes the OF app, + // we no longer need to pass on these touch events. + return; + } + + for(UITouch *touch in touches) { + int touchIndex = 0; + while([[activeTouches allValues] containsObject:[NSNumber numberWithInt:touchIndex]]){ + touchIndex++; + } + + [activeTouches setObject:@(touchIndex) forKey:[NSValue valueWithPointer:(__bridge void *)touch]]; + + CGPoint touchPoint = [touch locationInView:theMetal]; + + touchPoint.x *= scaleFactor; // this has to be done because retina still returns points in 320x240 but with high percision + touchPoint.y *= scaleFactor; + touchPoint = [self orientateTouchPoint:touchPoint]; + + if( touchIndex==0 ){ + window->events().notifyMousePressed(touchPoint.x, touchPoint.y, 0); + } + + ofTouchEventArgs touchArgs; + touchArgs.numTouches = [[event touchesForView:theMetal] count]; + touchArgs.x = touchPoint.x; + touchArgs.y = touchPoint.y; + touchArgs.id = touchIndex; + if([touch tapCount] == 2){ + touchArgs.type = ofTouchEventArgs::doubleTap; + ofNotifyEvent(window->events().touchDoubleTap,touchArgs); // send doubletap + } + touchArgs.type = ofTouchEventArgs::down; + ofNotifyEvent(window->events().touchDown,touchArgs); // but also send tap (upto app programmer to ignore this if doubletap came that frame) + } +} + +- (void)setupMetal:(MGLKView *)metal { + + theMetal = metal; +} + +//------------------------------------------------------ +- (void)touchesMoved:(NSSet *)touches + withEvent:(UIEvent *)event{ + + if(!bInit || !bSetup) { + // if the glView is destroyed which also includes the OF app, + // we no longer need to pass on these touch events. + return; + } + + for(UITouch *touch in touches){ + int touchIndex = [[activeTouches objectForKey:[NSValue valueWithPointer:(__bridge void *)touch]] intValue]; + + CGPoint touchPoint = [touch locationInView:theMetal]; + + touchPoint.x *= scaleFactor; // this has to be done because retina still returns points in 320x240 but with high percision + touchPoint.y *= scaleFactor; + touchPoint = [self orientateTouchPoint:touchPoint]; + + if( touchIndex==0 ){ + window->events().notifyMouseDragged(touchPoint.x, touchPoint.y, 0); + } + ofTouchEventArgs touchArgs; + touchArgs.numTouches = [[event touchesForView:theMetal] count]; + touchArgs.x = touchPoint.x; + touchArgs.y = touchPoint.y; + touchArgs.id = touchIndex; + touchArgs.type = ofTouchEventArgs::move; + ofNotifyEvent(window->events().touchMoved, touchArgs); + } +} + +//------------------------------------------------------ +- (void)touchesEnded:(NSSet *)touches + withEvent:(UIEvent *)event{ + + if(!bInit || !bSetup) { + // if the glView is destroyed which also includes the OF app, + // we no longer need to pass on these touch events. + return; + } + + for(UITouch *touch in touches){ + int touchIndex = [[activeTouches objectForKey:[NSValue valueWithPointer:(__bridge void *)touch]] intValue]; + + [activeTouches removeObjectForKey:[NSValue valueWithPointer:(__bridge void *)touch]]; + + CGPoint touchPoint = [touch locationInView:theMetal]; + + touchPoint.x *= scaleFactor; // this has to be done because retina still returns points in 320x240 but with high percision + touchPoint.y *= scaleFactor; + touchPoint = [self orientateTouchPoint:touchPoint]; + + if( touchIndex==0 ){ + window->events().notifyMouseReleased(touchPoint.x, touchPoint.y, 0); + } + + ofTouchEventArgs touchArgs; + touchArgs.numTouches = [[event touchesForView:theMetal] count] - [touches count]; + touchArgs.x = touchPoint.x; + touchArgs.y = touchPoint.y; + touchArgs.id = touchIndex; + touchArgs.type = ofTouchEventArgs::up; + ofNotifyEvent(window->events().touchUp, touchArgs); + } +} + +//------------------------------------------------------ +- (void)touchesCancelled:(NSSet *)touches + withEvent:(UIEvent *)event{ + + if(!bInit || !bSetup) { + // if the glView is destroyed which also includes the OF app, + // we no longer need to pass on these touch events. + return; + } + + for(UITouch *touch in touches){ + int touchIndex = [[activeTouches objectForKey:[NSValue valueWithPointer:(__bridge void *)touch]] intValue]; + + CGPoint touchPoint = [touch locationInView:theMetal]; + + touchPoint.x *= scaleFactor; // this has to be done because retina still returns points in 320x240 but with high percision + touchPoint.y *= scaleFactor; + touchPoint = [self orientateTouchPoint:touchPoint]; + + ofTouchEventArgs touchArgs; + touchArgs.numTouches = [[event touchesForView:theMetal] count]; + touchArgs.x = touchPoint.x; + touchArgs.y = touchPoint.y; + touchArgs.id = touchIndex; + touchArgs.type = ofTouchEventArgs::cancel; + ofNotifyEvent(window->events().touchCancelled, touchArgs); + } + + [self touchesEnded:touches withEvent:event]; +} + + +- (void)updateScaleFactor { + //GLKView *view = (GLKView *)self; + + scaleFactor = MIN(scaleFactorPref, [theMetal contentScaleFactor]); + if(scaleFactor != theMetal.contentScaleFactor) { + theMetal.contentScaleFactor = scaleFactor; + } +} + + + + + + + +@end diff --git a/addons/ofxiOS/src/core/ofxiOSMLKViewController.h b/addons/ofxiOS/src/core/ofxiOSMLKViewController.h index 51ebbb106fe..0616e9f02a6 100644 --- a/addons/ofxiOS/src/core/ofxiOSMLKViewController.h +++ b/addons/ofxiOS/src/core/ofxiOSMLKViewController.h @@ -1,42 +1,52 @@ -//// -//// ofxiOSMLKViewController.h -//// iOS+OFLib -//// -//// Created by Dan R on 11/5/22. -//// // -//#ifndef ofxiOSMLKViewController_h -//#define ofxiOSMLKViewController_h -// -//#pragma once -// -//#include -//#if TARGET_OS_IOS || (TARGET_OS_IPHONE && !TARGET_OS_TV) -// -//#import -//#import -// -//class ofxiOSApp; +// ofxiOSMLKViewController.h +// iOS+OFLib +// +// Created by Dan Rosser on 11/5/22. +// + +#ifndef ofxiOSMLKViewController_h +#define ofxiOSMLKViewController_h + +#pragma once + +#include +#if TARGET_OS_IOS || (TARGET_OS_IPHONE && !TARGET_OS_TV) + +#import +#import + + +#import +#import +#import "EAMLKView.h" +#import "ofxiOSMLKView.h" + +class ofxiOSApp; //@class ofxiOSMLKView; -// -//@interface ofxiOSGLKViewController : MGLKViewController -// -// -//@property (nonatomic, strong) ofxiOSMLKView * glView; -// -//- (instancetype)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app; -// -//- (UIInterfaceOrientation)currentInterfaceOrientation; -//- (void)setCurrentInterfaceOrientation:(UIInterfaceOrientation) orient; -//- (void)rotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation -// animated:(BOOL)animated; -//- (BOOL)isReadyToRotate; -//- (void)setPreferredFPS:(int)fps; -//- (void)setMSAA:(bool)value; -// -//@end -// -//#endif -// -// -//#endif /* ofxiOSMLKViewController_h */ + + +@interface ofxiOSMLKViewController : MGLKViewController + + +@property (nonatomic, strong) MGLKView * glView; // no subclass +@property (nonatomic, strong) ofxiOSMLKView * ofView; + +- (instancetype)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app; + +- (void)mglkView:(MGLKView *)view drawInRect:(CGRect)rect; + +- (UIInterfaceOrientation)currentInterfaceOrientation; +- (void)setCurrentInterfaceOrientation:(UIInterfaceOrientation) orient; +- (void)rotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation + animated:(BOOL)animated; +- (BOOL)isReadyToRotate; +- (void)setPreferredFPS:(int)fps; +- (void)setMSAA:(bool)value; + +@end + +#endif + + +#endif /* ofxiOSMLKViewController_h */ diff --git a/addons/ofxiOS/src/core/ofxiOSMLKViewController.mm b/addons/ofxiOS/src/core/ofxiOSMLKViewController.mm index 65ad7f59101..601679c201e 100644 --- a/addons/ofxiOS/src/core/ofxiOSMLKViewController.mm +++ b/addons/ofxiOS/src/core/ofxiOSMLKViewController.mm @@ -1,472 +1,528 @@ -//// -//// ofxiOSGLKViewController.mm -//// iPhone+OF Static Library -//// -//// Created by Dan Rosser on 7/3/18. -//// // -//#include -//#if TARGET_OS_IOS || (TARGET_OS_IPHONE && !TARGET_OS_TV) -// -//#import "ofxiOSMLKViewController.h" -// -//#include "ofxiOSMLKView.h" -//#import "ofxiOSExtras.h" -//#include "ofAppiOSWindow.h" -// -//@interface ofxiOSMLKViewController() { -// UIInterfaceOrientation currentInterfaceOrientation; -// UIInterfaceOrientation pendingInterfaceOrientation; -// BOOL bReadyToRotate; -// BOOL bFirstUpdate; -// BOOL bAnimated; -//} -//@end -// -//@implementation ofxiOSGLKViewController -// -//@synthesize glView; -// -//- (instancetype)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app { -// return [self initWithFrame:frame app:app sharegroup:nil]; -//} -// -//- (instancetype)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app sharegroup:(EAGLSharegroup *)sharegroup{ -// currentInterfaceOrientation = pendingInterfaceOrientation = UIInterfaceOrientationPortrait; -// if((self = [super init])) { -// currentInterfaceOrientation = pendingInterfaceOrientation = self.interfaceOrientation; -// if( [[[UIDevice currentDevice] systemVersion] compare:@"8.0" options:NSNumericSearch] == NSOrderedAscending ) { -// bReadyToRotate = NO; -// }else{ -// bReadyToRotate = YES; -// } -// bFirstUpdate = NO; -// bAnimated = NO; -// -// self.glView = [[ofxiOSGLKView alloc] initWithFrame:frame andApp:app sharegroup:sharegroup]; -// self.glView.delegate = self; -// } -// -// return self; -//} -// -//- (void) dealloc { -// [self.glView removeFromSuperview]; -// self.glView.delegate = nil; -// self.glView = nil; -//} -// -//- (void)viewDidLoad { -// [super viewDidLoad]; -// -// GLKView *view = (GLKView *)self.view; -// view.context = [self.glView context]; -// self.delegate = self; -// self.preferredFramesPerSecond = 60; //default -// [view setMultipleTouchEnabled:ofxiOSGetOFWindow()->isMultiTouch()]; -// [view bindDrawable]; -// [self.glView setup]; -//} -// -// -//-(void) checkError -//{ -// GLenum error = glGetError(); -// -// if (error == GL_NO_ERROR) -// return; -// -// switch (error) -// { -// case GL_INVALID_ENUM: -// NSLog(@"Invalid Enum"); -// break; -// } -//} -// -// -//- (void)viewDidUnload -//{ -// [super viewDidUnload]; -//} -// -//- (void)viewWillAppear:(BOOL)animated { -// [super viewWillAppear:animated]; -// [self.glView resetTouches]; -//} -// -//- (void)glkViewControllerUpdate:(GLKViewController *)controller { -// [self.glView update]; -//} -// -//- (void)glkViewController:(GLKViewController *)controller willPause:(BOOL)pause { -// -//} -// -//- (void) glkView:(GLKView *)view drawInRect:(CGRect)rect -//{ -// [view bindDrawable]; -// [self.glView draw]; -//} -// -//- (void)viewDidAppear:(BOOL)animated { -// [super viewDidAppear:animated]; -// -// // rotation of the glView only works properly after viewDidAppear. -// // this is something to do with either the bounds, center or transform properties not being initialised earlier. -// // so now that glView is ready, we rotate it to the pendingInterfaceOrientation. -// if( [[[UIDevice currentDevice] systemVersion] compare:@"8.0" options:NSNumericSearch] == NSOrderedAscending ) { -// bReadyToRotate = YES; -// bFirstUpdate = YES; -// [self rotateToInterfaceOrientation:pendingInterfaceOrientation animated:NO]; -// } -//} -// -//- (void)viewWillDisappear:(BOOL)animated { -// [super viewWillDisappear:animated]; -//} -// -//- (void)viewDidDisappear:(BOOL)animated { -// [super viewDidDisappear:animated]; -//} -// -//- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { -// if(self.glView != nil) -// [self.glView touchesBegan:touches withEvent:event]; -//} -// -//- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { -// if(self.glView != nil) -// [self.glView touchesMoved:touches withEvent:event]; -//} -//- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { -// if(self.glView != nil) -// [self.glView touchesEnded:touches withEvent:event]; -//} -//- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event { -// if(self.glView != nil) -// [self.glView touchesCancelled:touches withEvent:event]; -//} -//#ifdef __IPHONE_9_1 -//- (void)touchesEstimatedPropertiesUpdated:(NSSet *)touches { -// if(self.glView != nil) -// [self.glView touchesEstimatedPropertiesUpdated:touches]; -//} -//#endif -// -//- (EAGLSharegroup *)getSharegroup { -// if(self.glView != nil) { -// EAGLContext * context = [self.glView context]; -// if(context) -// return [context sharegroup]; -// } -// return nil; -//} -// -// -////-------------------------------------------------------------- glView callbacks. -//- (void)glViewAnimationStarted { -// // -//} -// -//- (void)glViewAnimationStopped { -// // -//} -// -//- (void)glViewDraw { -// // -//} -// -//- (void)glViewResized { -// // -//} -// -////-------------------------------------------------------------- orientation. -//- (UIInterfaceOrientation)currentInterfaceOrientation { -// return currentInterfaceOrientation; -//} -// -////-------------------------------------------------------------- orientation. -//- (void)setCurrentInterfaceOrientation:(UIInterfaceOrientation) orient { -// currentInterfaceOrientation = pendingInterfaceOrientation = orient; -//} -// -//- (float)rotationForOrientation:(UIInterfaceOrientation)interfaceOrientation { -// if (interfaceOrientation == UIInterfaceOrientationPortrait) { -// return 0; // 0 degrees. -// } else if (interfaceOrientation == UIInterfaceOrientationLandscapeRight) { -// return M_PI * 0.5; // 90 degrees. -// } else if (interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown) { -// return M_PI; // 180 degrees. -// } else if (interfaceOrientation == UIInterfaceOrientationLandscapeLeft) { -// return M_PI * 1.5; // 270 degrees. -// } else { -// return 0; -// } -//} -// -//- (void)rotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation -// animated:(BOOL)animated { -// bAnimated = animated; -// -// -// if(bReadyToRotate == NO) { -// pendingInterfaceOrientation = interfaceOrientation; -// -// // we need to update the dimensions here, so if ofSetOrientation is called in setup, -// // then it will return the correct width and height -// CGSize screenSize = [UIScreen mainScreen].bounds.size; -// CGRect bounds = CGRectMake(0, 0, screenSize.width, screenSize.height); -// if(UIInterfaceOrientationIsLandscape(interfaceOrientation)) { -// bounds.size.width = screenSize.height; -// bounds.size.height = screenSize.width; -// } -// self.glView.bounds = bounds; -// [self.glView updateDimensions]; -// -// return; -// } -// -// -// if(currentInterfaceOrientation == interfaceOrientation && !bFirstUpdate) { -// return; -// } -// -// if(pendingInterfaceOrientation != interfaceOrientation) { -// CGSize screenSize = [UIScreen mainScreen].bounds.size; -// CGRect bounds = CGRectMake(0, 0, screenSize.width, screenSize.height); -// if(UIInterfaceOrientationIsLandscape(interfaceOrientation)) { -// bounds.size.width = screenSize.height; -// bounds.size.height = screenSize.width; -// } -// self.glView.bounds = bounds; -// [self.glView updateDimensions]; -// } -// -// CGSize screenSize = [UIScreen mainScreen].bounds.size; -// CGPoint center; -// CGRect bounds = CGRectMake(0, 0, screenSize.width, screenSize.height); -// -// if(UIInterfaceOrientationIsLandscape(interfaceOrientation)) { -// center.x = screenSize.height * 0.5; -// center.y = screenSize.width * 0.5; -// } else { -// center.x = screenSize.width * 0.5; -// center.y = screenSize.height * 0.5; -// } -// -// // Is the iOS version less than 8? -// if( [[[UIDevice currentDevice] systemVersion] compare:@"8.0" options:NSNumericSearch] == NSOrderedAscending ) { -// if(UIInterfaceOrientationIsLandscape(interfaceOrientation)) { -// bounds.size.width = screenSize.height; -// bounds.size.height = screenSize.width; -// } -// } else { -// // Fixes for iOS 8 Portrait to Landscape issues -// if((UIInterfaceOrientationIsPortrait(interfaceOrientation) && screenSize.width >= screenSize.height) || -// (UIInterfaceOrientationIsLandscape(interfaceOrientation) && screenSize.height >= screenSize.width)) { -// bounds.size.width = screenSize.height; -// bounds.size.height = screenSize.width; -// } else { -// bounds.size.width = screenSize.width; -// bounds.size.height = screenSize.height; -// } -// //borg -// //NSLog(@"w %f h %f",[UIScreen mainScreen].bounds.size.width,[UIScreen mainScreen].bounds.size.height); -// //assumes Portrait orientation -// if(screenSize.width>screenSize.height){ -// center.x = screenSize.height * 0.5; -// center.y = screenSize.width * 0.5; -// }else{ -// center.x = screenSize.width * 0.5; -// center.y = screenSize.height * 0.5; -// } -// //NSLog(@"rotating to portrait %i, is portrait %i, currentInterfaceOrientation %i, bound: w %f h %f",UIInterfaceOrientationIsPortrait(interfaceOrientation),UIInterfaceOrientationIsPortrait(self.interfaceOrientation),UIInterfaceOrientationIsPortrait(currentInterfaceOrientation),bounds.size.width,bounds.size.height); -// } -// -// float rot1 = [self rotationForOrientation:currentInterfaceOrientation]; -// float rot2 = [self rotationForOrientation:interfaceOrientation]; -// float rot3 = rot2 - rot1; -// CGAffineTransform rotate = CGAffineTransformMakeRotation(rot3); -// rotate = CGAffineTransformConcat(rotate, self.glView.transform); -// -// if(animated) { -// NSTimeInterval duration = 0.3; -// if((UIInterfaceOrientationIsLandscape(currentInterfaceOrientation) && UIInterfaceOrientationIsLandscape(interfaceOrientation)) || -// (UIInterfaceOrientationIsPortrait(currentInterfaceOrientation) && UIInterfaceOrientationIsPortrait(interfaceOrientation))) { -// duration = 0.6; -// } -// [self.glView.layer removeAllAnimations]; -// [UIView animateWithDuration:duration animations:^{ -// self.glView.center = center; -// self.glView.transform = rotate; -// self.glView.bounds = bounds; -// }]; -// } else { -// self.glView.center = center; -// self.glView.transform = rotate; -// self.glView.bounds = bounds; -// } -// -// currentInterfaceOrientation = interfaceOrientation; -// bFirstUpdate = NO; -// -// [self.glView updateDimensions]; -//} -// -// -////-------------------------------------------------------------- orientation callbacks. -//// http://developer.apple.com/library/ios/#featuredarticles/ViewControllerPGforiPhoneOS/RespondingtoDeviceOrientationChanges/RespondingtoDeviceOrientationChanges.html -// -//- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation -// duration:(NSTimeInterval)duration { -// -// // CALLBACK 1. -// // The window calls the root view controller’s willRotateToInterfaceOrientation:duration: method. -// // Container view controllers forward this message on to the currently displayed content view controllers. -// // You can override this method in your custom content view controllers to hide views or make other changes to your view layout before the interface is rotated. -// // Deprecated in iOS 8. See viewWillTransitionToSize below. -//} -// -//- (void)viewWillLayoutSubviews { -// [super viewWillLayoutSubviews]; -// -// // CALLBACK 2. -// // The window adjusts the bounds of the view controller’s view. -// // This causes the view to layout its subviews, triggering the view controller’s viewWillLayoutSubviews method. -// // When this method runs, you can query the app object’s statusBarOrientation property to determine the current user interface layout. -//} -// -//- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation -// duration:(NSTimeInterval)duration { -// -// // CALLBACK 3. -// // This method is called from within an animation block so that any property changes you make -// // are animated at the same time as other animations that comprise the rotation. -// // Deprecated in iOS 8. See viewWillTransitionToSize below. -// -// CGSize screenSize = [UIScreen mainScreen].bounds.size; -// -// CGPoint center; -// // Is the iOS version less than 8? -// if( [[[UIDevice currentDevice] systemVersion] compare:@"8.0" options:NSNumericSearch] == NSOrderedAscending ) { -// if(UIInterfaceOrientationIsLandscape(self.interfaceOrientation)) { -// center.x = screenSize.height * 0.5; -// center.y = screenSize.width * 0.5; -// } else { -// center.x = screenSize.width * 0.5; -// center.y = screenSize.height * 0.5; -// } -// } else { -// center.x = screenSize.width * 0.5; -// center.y = screenSize.height * 0.5; -// } -// -// if(bAnimated) { -// NSTimeInterval duration = 0.3; -// [self.glView.layer removeAllAnimations]; -// [UIView animateWithDuration:duration animations:^{ -// self.glView.center = center; -// self.glView.transform = CGAffineTransformMakeRotation(0); -// }]; -// } else { -// self.glView.center = center; -// self.glView.transform = CGAffineTransformMakeRotation(0); -// } -//} -// -//// iOS8+ version of willAnimateRotationToInterfaceOrientation -////NOTE: Only called if actually resizing and not masked -////http://stackoverflow.com/questions/25935006/ios8-interface-rotation-methods-not-called -// -////borg -//#ifdef __IPHONE_8_0 -//- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id)coordinator { -// -// CGPoint center; -// -// center.x = size.width * 0.5; -// center.y = size.height * 0.5; -// -// -// if(bAnimated) { -// NSTimeInterval duration = 0.3; -// [self.glView.layer removeAllAnimations]; -// [UIView animateWithDuration:duration animations:^{ -// self.glView.center = center; -// self.glView.transform = CGAffineTransformMakeRotation(0); -// self.glView.frame = CGRectMake(0, 0, size.width,size.height); -// }]; -// } else { -// self.glView.center = center; -// self.glView.transform = CGAffineTransformMakeRotation(0); -// self.glView.frame = CGRectMake(0, 0, size.width,size.height); -// } -//} -//#endif -// -// -//- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { -// -// // CALLBACK 4. -// // This action marks the end of the rotation process. -// // You can use this method to show views, change the layout of views, or make other changes to your app. -//} -// -////-------------------------------------------------------------- iOS5 and earlier. -//- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation { -// return (toInterfaceOrientation == currentInterfaceOrientation); -//} -// -////-------------------------------------------------------------- iOS6. -//#ifdef __IPHONE_6_0 -//- (NSUInteger)supportedInterfaceOrientations { -// switch (currentInterfaceOrientation) { -// case UIInterfaceOrientationPortrait: -// return UIInterfaceOrientationMaskPortrait; -// break; -// case UIInterfaceOrientationPortraitUpsideDown: -// return UIInterfaceOrientationMaskPortraitUpsideDown; -// break; -// case UIInterfaceOrientationLandscapeLeft: -// return UIInterfaceOrientationMaskLandscapeLeft; -// break; -// case UIInterfaceOrientationLandscapeRight: -// return UIInterfaceOrientationMaskLandscapeRight; -// break; -// default: -// break; -// } -// // defaults to orientations selected in the .plist file ('Supported Interface Orientations' in the XCode Project) -// return -1; -//} -//- (BOOL)shouldAutorotate { -// return YES; -//} -//#endif -// -//- (BOOL)isReadyToRotate { -// return bReadyToRotate; -//} -// -//#ifdef __IPHONE_7_0 -//-(BOOL)prefersStatusBarHidden{ -// return YES; -//} -//#endif -// -//- (void)setPreferredFPS:(int)fps { -// if(self.glView != nil) { -// self.preferredFramesPerSecond = fps; -// } -//} -// -//- (void)setMSAA:(bool)value { -// if(self.glView != nil) { +// ofxiOSGLKViewController.mm +// iPhone+OF Static Library +// +// Created by Dan Rosser on 7/3/18. +// + +#include +#if TARGET_OS_IOS || (TARGET_OS_IPHONE && !TARGET_OS_TV) + +#import "ofxiOSMLKViewController.h" + +#include "ofxiOSMLKView.h" +#import "ofxiOSExtras.h" +#include "ofAppiOSWindow.h" + +@interface ofxiOSMLKViewController() { + UIInterfaceOrientation currentInterfaceOrientation; + UIInterfaceOrientation pendingInterfaceOrientation; + BOOL bReadyToRotate; + BOOL bFirstUpdate; + BOOL bAnimated; +} +@end + +@implementation ofxiOSMLKViewController + +@synthesize glView; +@synthesize ofView; + +- (instancetype)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app { +// return [self initWithFrame:frame app:app]; + currentInterfaceOrientation = pendingInterfaceOrientation = UIInterfaceOrientationPortrait; + if((self = [super init])) { + currentInterfaceOrientation = pendingInterfaceOrientation = self.interfaceOrientation; + if( [[[UIDevice currentDevice] systemVersion] compare:@"8.0" options:NSNumericSearch] == NSOrderedAscending ) { + bReadyToRotate = NO; + }else{ + bReadyToRotate = YES; + } + bFirstUpdate = NO; + bAnimated = NO; + + self.ofView = [[ofView alloc] initWithFrame:frame andApp:app]; + + +// self.ofView.delegate = self; + } + + return self; +} + +- (void) dealloc { + [self.glView removeFromSuperview]; + self.glView.delegate = nil; + self.glView = nil; +// self.ofView.delegate = nil; + self.ofView = nil; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + + MGLKView *view = (MGLKView *)self.glView ; +// view.context = [self.ofView context]; +// [MGLContext setCurrentContext:view.context]; + + // Create OpenGL context + self.glView.drawableDepthFormat = MGLDrawableDepthFormat16; + + bool useGLES3 = getenv("MGL_OF_USE_GLES3"); + useGLES3 = NO; + + MGLRenderingAPI api; + + if (useGLES3) + { + api = kMGLRenderingAPIOpenGLES3; + } + else + { + api = kMGLRenderingAPIOpenGLES2; + } + + MGLContext *context = [[MGLContext alloc] initWithAPI:api]; + self.glView.context = context; + + [MGLContext setCurrentContext:context]; + + [self.ofView setupMetal:glView]; + + self.glView.delegate = self; +// + self.delegate = self; + self.preferredFramesPerSecond = 60; //default + [view setMultipleTouchEnabled:ofxiOSGetOFWindow()->isMultiTouch()]; + [view bindDrawable]; + [self.ofView setup]; +} + + +-(void) checkError +{ + GLenum error = glGetError(); + + if (error == GL_NO_ERROR) + return; + + switch (error) + { + case GL_INVALID_ENUM: + NSLog(@"Invalid Enum"); + break; + } +} + +- (void)mglkView:(MGLKView *)view drawInRect:(CGRect)rect { + [view bindDrawable]; + [self.ofView draw]; +} + + + +- (void)viewDidUnload +{ + [super viewDidUnload]; +} + +- (void)viewWillAppear:(BOOL)animated { + [super viewWillAppear:animated]; + [self.ofView resetTouches]; +} + +- (void)glkViewControllerUpdate:(GLKViewController *)controller { + [self.ofView update]; +} + +- (void)mglkViewControllerUpdate:(MGLKViewController *)controller { + [self.ofView update]; +} + +- (void)mglkViewControllerUpdate:(MGLKViewController *)controller willPause:(BOOL)pause { +// [self.ofView update]; +} + +- (void)glkViewController:(GLKViewController *)controller willPause:(BOOL)pause { + +} + +- (void) glkView:(GLKView *)view drawInRect:(CGRect)rect +{ + [view bindDrawable]; + [self.ofView draw]; +} + +- (void)viewDidAppear:(BOOL)animated { + [super viewDidAppear:animated]; + + // rotation of the glView only works properly after viewDidAppear. + // this is something to do with either the bounds, center or transform properties not being initialised earlier. + // so now that glView is ready, we rotate it to the pendingInterfaceOrientation. + if( [[[UIDevice currentDevice] systemVersion] compare:@"8.0" options:NSNumericSearch] == NSOrderedAscending ) { + bReadyToRotate = YES; + bFirstUpdate = YES; + [self rotateToInterfaceOrientation:pendingInterfaceOrientation animated:NO]; + } +} + +- (void)viewWillDisappear:(BOOL)animated { + [super viewWillDisappear:animated]; +} + +- (void)viewDidDisappear:(BOOL)animated { + [super viewDidDisappear:animated]; +} + +- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { + if(self.glView != nil) + [self.glView touchesBegan:touches withEvent:event]; + if(self.ofView != nil) + [self.ofView touchesBegan:touches withEvent:event]; +} + +- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { + if(self.glView != nil) + [self.glView touchesMoved:touches withEvent:event]; + if(self.ofView != nil) + [self.ofView touchesMoved:touches withEvent:event]; +} +- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { + if(self.glView != nil) + [self.glView touchesEnded:touches withEvent:event]; + if(self.ofView != nil) + [self.ofView touchesEnded:touches withEvent:event]; +} +- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event { + if(self.glView != nil) + [self.glView touchesCancelled:touches withEvent:event]; + if(self.ofView != nil) + [self.ofView touchesCancelled:touches withEvent:event]; +} + +- (void)touchesEstimatedPropertiesUpdated:(NSSet *)touches { + if(self.glView != nil) + [self.glView touchesEstimatedPropertiesUpdated:touches]; +// if(self.ofView != nil) +// [self.ofView touchesEstimatedPropertiesUpdated:touches]; +} + + +//-------------------------------------------------------------- glView callbacks. +- (void)glViewAnimationStarted { + // +} + +- (void)glViewAnimationStopped { + // +} + +- (void)glViewDraw { + // +} + +- (void)glViewResized { + // +} + +//-------------------------------------------------------------- orientation. +- (UIInterfaceOrientation)currentInterfaceOrientation { + return currentInterfaceOrientation; +} + +//-------------------------------------------------------------- orientation. +- (void)setCurrentInterfaceOrientation:(UIInterfaceOrientation) orient { + currentInterfaceOrientation = pendingInterfaceOrientation = orient; +} + +- (float)rotationForOrientation:(UIInterfaceOrientation)interfaceOrientation { + if (interfaceOrientation == UIInterfaceOrientationPortrait) { + return 0; // 0 degrees. + } else if (interfaceOrientation == UIInterfaceOrientationLandscapeRight) { + return M_PI * 0.5; // 90 degrees. + } else if (interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown) { + return M_PI; // 180 degrees. + } else if (interfaceOrientation == UIInterfaceOrientationLandscapeLeft) { + return M_PI * 1.5; // 270 degrees. + } else { + return 0; + } +} + +- (void)rotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation + animated:(BOOL)animated { + bAnimated = animated; + + + if(bReadyToRotate == NO) { + pendingInterfaceOrientation = interfaceOrientation; + + // we need to update the dimensions here, so if ofSetOrientation is called in setup, + // then it will return the correct width and height + CGSize screenSize = [UIScreen mainScreen].bounds.size; + CGRect bounds = CGRectMake(0, 0, screenSize.width, screenSize.height); + if(UIInterfaceOrientationIsLandscape(interfaceOrientation)) { + bounds.size.width = screenSize.height; + bounds.size.height = screenSize.width; + } + self.glView.bounds = bounds; + [self.ofView updateDimensions]; + + return; + } + + + if(currentInterfaceOrientation == interfaceOrientation && !bFirstUpdate) { + return; + } + + if(pendingInterfaceOrientation != interfaceOrientation) { + CGSize screenSize = [UIScreen mainScreen].bounds.size; + CGRect bounds = CGRectMake(0, 0, screenSize.width, screenSize.height); + if(UIInterfaceOrientationIsLandscape(interfaceOrientation)) { + bounds.size.width = screenSize.height; + bounds.size.height = screenSize.width; + } + self.glView.bounds = bounds; + [self.ofView updateDimensions]; + } + + CGSize screenSize = [UIScreen mainScreen].bounds.size; + CGPoint center; + CGRect bounds = CGRectMake(0, 0, screenSize.width, screenSize.height); + + if(UIInterfaceOrientationIsLandscape(interfaceOrientation)) { + center.x = screenSize.height * 0.5; + center.y = screenSize.width * 0.5; + } else { + center.x = screenSize.width * 0.5; + center.y = screenSize.height * 0.5; + } + + // Is the iOS version less than 8? + if( [[[UIDevice currentDevice] systemVersion] compare:@"8.0" options:NSNumericSearch] == NSOrderedAscending ) { + if(UIInterfaceOrientationIsLandscape(interfaceOrientation)) { + bounds.size.width = screenSize.height; + bounds.size.height = screenSize.width; + } + } else { + // Fixes for iOS 8 Portrait to Landscape issues + if((UIInterfaceOrientationIsPortrait(interfaceOrientation) && screenSize.width >= screenSize.height) || + (UIInterfaceOrientationIsLandscape(interfaceOrientation) && screenSize.height >= screenSize.width)) { + bounds.size.width = screenSize.height; + bounds.size.height = screenSize.width; + } else { + bounds.size.width = screenSize.width; + bounds.size.height = screenSize.height; + } + //borg + //NSLog(@"w %f h %f",[UIScreen mainScreen].bounds.size.width,[UIScreen mainScreen].bounds.size.height); + //assumes Portrait orientation + if(screenSize.width>screenSize.height){ + center.x = screenSize.height * 0.5; + center.y = screenSize.width * 0.5; + }else{ + center.x = screenSize.width * 0.5; + center.y = screenSize.height * 0.5; + } + //NSLog(@"rotating to portrait %i, is portrait %i, currentInterfaceOrientation %i, bound: w %f h %f",UIInterfaceOrientationIsPortrait(interfaceOrientation),UIInterfaceOrientationIsPortrait(self.interfaceOrientation),UIInterfaceOrientationIsPortrait(currentInterfaceOrientation),bounds.size.width,bounds.size.height); + } + + float rot1 = [self rotationForOrientation:currentInterfaceOrientation]; + float rot2 = [self rotationForOrientation:interfaceOrientation]; + float rot3 = rot2 - rot1; + CGAffineTransform rotate = CGAffineTransformMakeRotation(rot3); + rotate = CGAffineTransformConcat(rotate, self.glView.transform); + + if(animated) { + NSTimeInterval duration = 0.3; + if((UIInterfaceOrientationIsLandscape(currentInterfaceOrientation) && UIInterfaceOrientationIsLandscape(interfaceOrientation)) || + (UIInterfaceOrientationIsPortrait(currentInterfaceOrientation) && UIInterfaceOrientationIsPortrait(interfaceOrientation))) { + duration = 0.6; + } + [self.glView.layer removeAllAnimations]; + [UIView animateWithDuration:duration animations:^{ + self.glView.center = center; + self.glView.transform = rotate; + self.glView.bounds = bounds; + }]; + } else { + self.glView.center = center; + self.glView.transform = rotate; + self.glView.bounds = bounds; + } + + currentInterfaceOrientation = interfaceOrientation; + bFirstUpdate = NO; + + [self.ofView updateDimensions]; +} + + +//-------------------------------------------------------------- orientation callbacks. +// http://developer.apple.com/library/ios/#featuredarticles/ViewControllerPGforiPhoneOS/RespondingtoDeviceOrientationChanges/RespondingtoDeviceOrientationChanges.html + +- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation + duration:(NSTimeInterval)duration { + + // CALLBACK 1. + // The window calls the root view controller’s willRotateToInterfaceOrientation:duration: method. + // Container view controllers forward this message on to the currently displayed content view controllers. + // You can override this method in your custom content view controllers to hide views or make other changes to your view layout before the interface is rotated. + // Deprecated in iOS 8. See viewWillTransitionToSize below. +} + +- (void)viewWillLayoutSubviews { + [super viewWillLayoutSubviews]; + + // CALLBACK 2. + // The window adjusts the bounds of the view controller’s view. + // This causes the view to layout its subviews, triggering the view controller’s viewWillLayoutSubviews method. + // When this method runs, you can query the app object’s statusBarOrientation property to determine the current user interface layout. +} + +- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation + duration:(NSTimeInterval)duration { + + // CALLBACK 3. + // This method is called from within an animation block so that any property changes you make + // are animated at the same time as other animations that comprise the rotation. + // Deprecated in iOS 8. See viewWillTransitionToSize below. + + CGSize screenSize = [UIScreen mainScreen].bounds.size; + + CGPoint center; + // Is the iOS version less than 8? + if( [[[UIDevice currentDevice] systemVersion] compare:@"8.0" options:NSNumericSearch] == NSOrderedAscending ) { + if(UIInterfaceOrientationIsLandscape(self.interfaceOrientation)) { + center.x = screenSize.height * 0.5; + center.y = screenSize.width * 0.5; + } else { + center.x = screenSize.width * 0.5; + center.y = screenSize.height * 0.5; + } + } else { + center.x = screenSize.width * 0.5; + center.y = screenSize.height * 0.5; + } + + if(bAnimated) { + NSTimeInterval duration = 0.3; + [self.glView.layer removeAllAnimations]; + [UIView animateWithDuration:duration animations:^{ + self.glView.center = center; + self.glView.transform = CGAffineTransformMakeRotation(0); + }]; + } else { + self.glView.center = center; + self.glView.transform = CGAffineTransformMakeRotation(0); + } +} + +// iOS8+ version of willAnimateRotationToInterfaceOrientation +//NOTE: Only called if actually resizing and not masked +//http://stackoverflow.com/questions/25935006/ios8-interface-rotation-methods-not-called + +//borg +#ifdef __IPHONE_8_0 +- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id)coordinator { + + CGPoint center; + + center.x = size.width * 0.5; + center.y = size.height * 0.5; + + + if(bAnimated) { + NSTimeInterval duration = 0.3; + [self.glView.layer removeAllAnimations]; + [UIView animateWithDuration:duration animations:^{ + self.glView.center = center; + self.glView.transform = CGAffineTransformMakeRotation(0); + self.glView.frame = CGRectMake(0, 0, size.width,size.height); + }]; + } else { + self.glView.center = center; + self.glView.transform = CGAffineTransformMakeRotation(0); + self.glView.frame = CGRectMake(0, 0, size.width,size.height); + } +} +#endif + + +- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { + + // CALLBACK 4. + // This action marks the end of the rotation process. + // You can use this method to show views, change the layout of views, or make other changes to your app. +} + +//-------------------------------------------------------------- iOS5 and earlier. +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation { + return (toInterfaceOrientation == currentInterfaceOrientation); +} + +- (NSUInteger)supportedInterfaceOrientations { + switch (currentInterfaceOrientation) { + case UIInterfaceOrientationPortrait: + return UIInterfaceOrientationMaskPortrait; + break; + case UIInterfaceOrientationPortraitUpsideDown: + return UIInterfaceOrientationMaskPortraitUpsideDown; + break; + case UIInterfaceOrientationLandscapeLeft: + return UIInterfaceOrientationMaskLandscapeLeft; + break; + case UIInterfaceOrientationLandscapeRight: + return UIInterfaceOrientationMaskLandscapeRight; + break; + default: + break; + } + // defaults to orientations selected in the .plist file ('Supported Interface Orientations' in the XCode Project) + return -1; +} +- (BOOL)shouldAutorotate { + return YES; +} + +- (BOOL)isReadyToRotate { + return bReadyToRotate; +} + +-(BOOL)prefersStatusBarHidden{ + return YES; +} + +- (void)setPreferredFPS:(int)fps { + if(self.glView != nil) { + self.preferredFramesPerSecond = fps; + } +} + +- (CGSize)size +{ + return self.glView.drawableSize; +} + +- (void)setMSAA:(bool)value { + if(self.glView != nil) { + if(value) + self.glView.drawableMultisample = MGLDrawableMultisample4X; + else + self.glView.drawableMultisample = MGLDrawableMultisampleNone; + // [self.glView setMSAA:value]; -// } -//} -// -//@end -// -//#endif + } +} + + +- (UIImage*)getSnapshot { + return glView.snapshot; +} + +@end + + + +#endif diff --git a/addons/ofxiOS/src/ml/EAMLKView.h b/addons/ofxiOS/src/ml/EAMLKView.h index 311f84d90a0..ee428360639 100644 --- a/addons/ofxiOS/src/ml/EAMLKView.h +++ b/addons/ofxiOS/src/ml/EAMLKView.h @@ -6,24 +6,23 @@ //// // // -//#pragma once +#pragma once // -//#import -//#import +////#import //#import // //#import //#import //#import "ESRenderer.h" // -///// ???: inherit MGLKViewDelegate? -//@protocol EAMGLKViewDelegate -//@optional -//- (void)glViewAnimationStarted; -//- (void)glViewAnimationStopped; -//- (void)glViewDraw; -//- (void)glViewResized; -//@end +/// ???: inherit MGLKViewDelegate? +@protocol EAMGLKViewDelegate +@optional +- (void)glViewAnimationStarted; +- (void)glViewAnimationStopped; +- (void)glViewDraw; +- (void)glViewResized; +@end // //@interface EAMLKView : MGLKView //{ diff --git a/addons/ofxiOS/src/ml/EAMLKView.m b/addons/ofxiOS/src/ml/EAMLKView.m index ad64ccb961a..0f5eaba157b 100644 --- a/addons/ofxiOS/src/ml/EAMLKView.m +++ b/addons/ofxiOS/src/ml/EAMLKView.m @@ -65,7 +65,7 @@ // } // // if(rendererVersion == ESRendererVersion_20) { -// self.context = [[MGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2]; +// self.context = [[MGLContext alloc] initWithAPI:kMGLRenderingAPIOpenGLES2]; // NSLog(@"Creating OpenGL ES2 Renderer"); // if(!self.context) { // NSLog(@"OpenGL ES2 failed"); @@ -80,9 +80,9 @@ // self.drawableStencilFormat = stencilFormat; // // if(msaaEnabled) -// self.drawableMultisample = GLKViewDrawableMultisample4X; +// self.drawableMultisample = MGLDrawableMultisample4X; // else -// self.drawableMultisample = GLKViewDrawableMultisampleNone; +// self.drawableMultisample = MGLDrawableMultisampleNone; // //#if TARGET_OS_IOS || (TARGET_OS_IPHONE && !TARGET_OS_TV) // self.multipleTouchEnabled = true; @@ -130,7 +130,7 @@ // ////------------------------------------------------------------------- //- (void)updateScaleFactor { -// GLKView *view = (GLKView *)self; +// MGLKView *view = (MGLKView *)self; // // scaleFactor = MIN(scaleFactorPref, [view contentScaleFactor]); // if(scaleFactor != self.contentScaleFactor) { @@ -141,9 +141,9 @@ //- (void) setMSAA:(bool)on //{ // if(on) -// self.drawableMultisample = GLKViewDrawableMultisample4X; +// self.drawableMultisample = MGLDrawableMultisample4X; // else -// self.drawableMultisample = GLKViewDrawableMultisampleNone; +// self.drawableMultisample = MGLDrawableMultisampleNone; //} // ////------------------------------------------------------------------- notify. diff --git a/addons/ofxiOS/src/ofxiOS.h b/addons/ofxiOS/src/ofxiOS.h index 05371fea484..10e70be9a8e 100644 --- a/addons/ofxiOS/src/ofxiOS.h +++ b/addons/ofxiOS/src/ofxiOS.h @@ -47,6 +47,8 @@ #include "ofxiOSViewController.h" #include "ofxiOSGLKViewController.h" #include "ofxiOSGLKView.h" +#include "ofxiOSMLKViewController.h" +#include "ofxiOSMLKView.h" #include "ofxiOSEAGLView.h" #include "ofxiOSApp.h" #include "ofxiOSExtras.h" diff --git a/addons/ofxiOS/src/video/AVFoundationVideoPlayer.m b/addons/ofxiOS/src/video/AVFoundationVideoPlayer.m index da195f32f0c..e3cc8c88867 100644 --- a/addons/ofxiOS/src/video/AVFoundationVideoPlayer.m +++ b/addons/ofxiOS/src/video/AVFoundationVideoPlayer.m @@ -432,7 +432,7 @@ - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(N dispatch_async(dispatch_get_main_queue(), ^{ bReady = true; [self update]; // update as soon is ready so pixels are loaded. - [self setVolume:volume]; // set volume for current video. + [self setVolume:self->volume]; // set volume for current video. if([self.delegate respondsToSelector:@selector(playerReady)]) { [self.delegate playerReady]; } @@ -715,7 +715,7 @@ - (void)seekToTime:(CMTime)time toleranceAfter:tolerance completionHandler:^(BOOL finished) { - bSeeking = NO; + self->bSeeking = NO; if([self.delegate respondsToSelector:@selector(playerDidFinishSeeking)]) { [self.delegate playerDidFinishSeeking]; diff --git a/libs/openFrameworks/graphics/ofTrueTypeFont.cpp b/libs/openFrameworks/graphics/ofTrueTypeFont.cpp index 496500ba2f7..0fa0de35411 100644 --- a/libs/openFrameworks/graphics/ofTrueTypeFont.cpp +++ b/libs/openFrameworks/graphics/ofTrueTypeFont.cpp @@ -74,6 +74,12 @@ const ofUnicode::range ofUnicode::Uncategorized {0x00A9, 0x1F5FF}; const ofUnicode::range ofUnicode::AdditionalEmoticons {0x1F600, 0x1F636}; const ofUnicode::range ofUnicode::AdditionalTransportAndMap {0x1F681, 0x1F6C5}; const ofUnicode::range ofUnicode::OtherAdditionalSymbols {0x1F30D, 0x1F567}; +const ofUnicode::range ofUnicode::UppercaseLatin {65, 90}; +const ofUnicode::range ofUnicode::LowercaseLatin {97, 122}; +const ofUnicode::range ofUnicode::Braces {123, 127}; +const ofUnicode::range ofUnicode::Numbers {48, 57}; +const ofUnicode::range ofUnicode::Symbols {33, 47}; +const ofUnicode::range ofUnicode::GenericSymbols {58, 64}; const std::initializer_list ofAlphabet::Emoji { ofUnicode::Space, diff --git a/libs/openFrameworks/graphics/ofTrueTypeFont.h b/libs/openFrameworks/graphics/ofTrueTypeFont.h index 6db3b0fa1d7..c9c3840887f 100644 --- a/libs/openFrameworks/graphics/ofTrueTypeFont.h +++ b/libs/openFrameworks/graphics/ofTrueTypeFont.h @@ -42,12 +42,18 @@ void ofTrueTypeShutdown(); class ofUnicode{ public: struct range{ - std::uint32_t begin; - std::uint32_t end; - - std::uint32_t getNumGlyphs() const{ - return end - begin + 1; - } + range() : begin(0), end(0) { + + } + range(uint32_t be, uint32_t en) : begin(be), end(en) { + + } + std::uint32_t begin = 0; + std::uint32_t end = 0; + + std::uint32_t getNumGlyphs() const{ + return end - begin + 1; + } }; static const range Space; @@ -104,6 +110,12 @@ class ofUnicode{ static const range AdditionalEmoticons; static const range AdditionalTransportAndMap; static const range OtherAdditionalSymbols; + static const range Numbers; + static const range UppercaseLatin; + static const range LowercaseLatin; + static const range Braces; + static const range Symbols; + static const range GenericSymbols; }; class ofAlphabet{ diff --git a/libs/openFrameworks/utils/ofConstants.h b/libs/openFrameworks/utils/ofConstants.h index 4a06d3952d0..5effd245ce0 100644 --- a/libs/openFrameworks/utils/ofConstants.h +++ b/libs/openFrameworks/utils/ofConstants.h @@ -251,9 +251,9 @@ enum ofTargetPlatform{ #define TARGET_LITTLE_ENDIAN // arm cpu - #if defined(__OBJC__) && !__has_feature(objc_arc) - #error "Please enable ARC (Automatic Reference Counting) at the project level" - #endif +// #if defined(__OBJC__) && !__has_feature(objc_arc) +// #error "Please enable ARC (Automatic Reference Counting) at the project level" +// #endif #endif diff --git a/libs/openFrameworksCompiled/project/ios/Debug.xcconfig b/libs/openFrameworksCompiled/project/ios/Debug.xcconfig index bb9e9deb3bf..0b811b8c5b5 100644 --- a/libs/openFrameworksCompiled/project/ios/Debug.xcconfig +++ b/libs/openFrameworksCompiled/project/ios/Debug.xcconfig @@ -15,3 +15,5 @@ GCC_WARN_UNUSED_VARIABLE = NO GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = NO GCC_WARN_ABOUT_RETURN_TYPE = YES + + diff --git a/libs/openFrameworksCompiled/project/ios/Shared.xcconfig b/libs/openFrameworksCompiled/project/ios/Shared.xcconfig index 824ffed2702..8191addeaa1 100644 --- a/libs/openFrameworksCompiled/project/ios/Shared.xcconfig +++ b/libs/openFrameworksCompiled/project/ios/Shared.xcconfig @@ -14,3 +14,5 @@ DEAD_CODE_STRIPPING = YES GCC_AUTO_VECTORIZATION = YES ENABLE_BITCODE = NO COMPILER_INDEX_STORE_ENABLE = NO + +METALKIT = YES diff --git a/libs/openFrameworksCompiled/project/ios/iOS+OFLib.xcodeproj/project.pbxproj b/libs/openFrameworksCompiled/project/ios/iOS+OFLib.xcodeproj/project.pbxproj index 30020174158..9a34d40dcbf 100644 --- a/libs/openFrameworksCompiled/project/ios/iOS+OFLib.xcodeproj/project.pbxproj +++ b/libs/openFrameworksCompiled/project/ios/iOS+OFLib.xcodeproj/project.pbxproj @@ -119,7 +119,7 @@ BB24DED010DA7A3F00E9C588 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5326AEA710A23A0500278DE6 /* CoreLocation.framework */; }; BB24DED110DA7A3F00E9C588 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BB16EBD80F2B2AB500518274 /* QuartzCore.framework */; }; BF3679A4282B97EF004FD612 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF3679A3282B97EF004FD612 /* Metal.framework */; }; - BF3679AE282BB806004FD612 /* MetalANGLE.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF3679AD282BB806004FD612 /* MetalANGLE.framework */; platformFilter = ios; }; + BF3679AE282BB806004FD612 /* MetalANGLE.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF3679AD282BB806004FD612 /* MetalANGLE.framework */; platformFilter = ios; settings = {ATTRIBUTES = (Required, ); }; }; BF3679B9282BBBB9004FD612 /* ofxiOSMLKView.h in Headers */ = {isa = PBXBuildFile; fileRef = BF3679B3282BBBB9004FD612 /* ofxiOSMLKView.h */; }; BF3679BA282BBBB9004FD612 /* ofxiOSMLKView.mm in Sources */ = {isa = PBXBuildFile; fileRef = BF3679B4282BBBB9004FD612 /* ofxiOSMLKView.mm */; }; BF3679BB282BBBB9004FD612 /* ofxiOSViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = BF3679B5282BBBB9004FD612 /* ofxiOSViewController.mm */; }; @@ -129,6 +129,9 @@ BF3679C2282BBCC4004FD612 /* EAMLKView.h in Headers */ = {isa = PBXBuildFile; fileRef = BF3679C1282BBCB3004FD612 /* EAMLKView.h */; }; BF3679C3282BBCC4004FD612 /* EAMLKView.m in Sources */ = {isa = PBXBuildFile; fileRef = BF3679C0282BBCB3004FD612 /* EAMLKView.m */; }; BF41D521282B95D200608DA9 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF41D520282B95D200608DA9 /* Accelerate.framework */; }; + BFE07D58282E5FE800E599C1 /* EAMLKView.h in Sources */ = {isa = PBXBuildFile; fileRef = BF3679C1282BBCB3004FD612 /* EAMLKView.h */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; + BFE07D59282E5FE800E599C1 /* ofxiOSMLKView.h in Sources */ = {isa = PBXBuildFile; fileRef = BF3679B3282BBBB9004FD612 /* ofxiOSMLKView.h */; }; + BFE07D5A282E5FE800E599C1 /* ofxiOSMLKViewController.h in Sources */ = {isa = PBXBuildFile; fileRef = BF3679B6282BBBB9004FD612 /* ofxiOSMLKViewController.h */; }; E4F76E19176CB27200798745 /* of3dPrimitives.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76D6F176CB27200798745 /* of3dPrimitives.cpp */; }; E4F76E1A176CB27200798745 /* of3dPrimitives.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76D70176CB27200798745 /* of3dPrimitives.h */; }; E4F76E1B176CB27200798745 /* of3dUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76D71176CB27200798745 /* of3dUtils.cpp */; }; @@ -357,8 +360,6 @@ BBE5EAB70F49AD8400F28951 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; BF3679A3282B97EF004FD612 /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/Metal.framework; sourceTree = DEVELOPER_DIR; }; BF3679AD282BB806004FD612 /* MetalANGLE.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MetalANGLE.framework; path = ../../../metal/lib/ios/MetalANGLE.framework; sourceTree = ""; }; - BF3679AF282BB82B004FD612 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/Accelerate.framework; sourceTree = DEVELOPER_DIR; }; - BF3679B0282BB833004FD612 /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/Metal.framework; sourceTree = DEVELOPER_DIR; }; BF3679B3282BBBB9004FD612 /* ofxiOSMLKView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxiOSMLKView.h; sourceTree = ""; }; BF3679B4282BBBB9004FD612 /* ofxiOSMLKView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ofxiOSMLKView.mm; sourceTree = ""; }; BF3679B5282BBBB9004FD612 /* ofxiOSViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ofxiOSViewController.mm; sourceTree = ""; }; @@ -681,10 +682,7 @@ 53DA338D12DF8F5000C622CE /* CoreAudio.framework */, 53DA338F12DF8F5000C622CE /* CoreMedia.framework */, 53DA339112DF8F5000C622CE /* CoreVideo.framework */, - BF3679AF282BB82B004FD612 /* Accelerate.framework */, 67D48ECF1C10399900F719BC /* CoreMotion.framework */, - BF3679AD282BB806004FD612 /* MetalANGLE.framework */, - BF3679B0282BB833004FD612 /* Metal.framework */, ); name = "core frameworks"; sourceTree = ""; @@ -752,6 +750,7 @@ BF41D517282B7A7700608DA9 /* Frameworks */ = { isa = PBXGroup; children = ( + BF3679AD282BB806004FD612 /* MetalANGLE.framework */, BF3679A3282B97EF004FD612 /* Metal.framework */, BF41D520282B95D200608DA9 /* Accelerate.framework */, ); @@ -1170,6 +1169,9 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + BFE07D58282E5FE800E599C1 /* EAMLKView.h in Sources */, + BFE07D59282E5FE800E599C1 /* ofxiOSMLKView.h in Sources */, + BFE07D5A282E5FE800E599C1 /* ofxiOSMLKViewController.h in Sources */, E4F76E19176CB27200798745 /* of3dPrimitives.cpp in Sources */, E4F76E1B176CB27200798745 /* of3dUtils.cpp in Sources */, BF3679BA282BBBB9004FD612 /* ofxiOSMLKView.mm in Sources */, @@ -1279,8 +1281,9 @@ DEAD_CODE_STRIPPING = NO; DEVELOPMENT_TEAM = M927U3X3CC; ENABLE_BITCODE = YES; + EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES = "*.nib *.lproj *.gch *.xcode* *.xcassets (*) .DS_Store CVS .svn .git .hg *.pbproj *.pbxproj"; EXECUTABLE_PREFIX = lib; - FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../../../libs/metal/lib/ios/**"; + FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../../../../libs/metal/lib/ios"; GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( @@ -1300,6 +1303,7 @@ ); MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; + OF_CORE_FRAMEWORKS = "-framework AudioToolbox -framework Accelerate -framework AVFoundation -framework CoreAudio -framework CoreGraphics -framework CoreLocation -framework CoreMotion -framework CoreMedia -framework CoreVideo -framework Foundation -framework GameController -framework GLKit -framework MapKit -framework OpenAL -framework OpenGLES -framework UIKit -framework Security -framework QuartzCore -framework Metal -framework MetalANGLE"; PRODUCT_NAME = "ofxiOS_${PLATFORM_NAME}_Debug"; SDKROOT = iphoneos; SKIP_INSTALL = YES; @@ -1318,8 +1322,9 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = M927U3X3CC; ENABLE_BITCODE = YES; + EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES = "*.nib *.lproj *.gch *.xcode* *.xcassets (*) .DS_Store CVS .svn .git .hg *.pbproj *.pbxproj"; EXECUTABLE_PREFIX = lib; - FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../../../libs/metal/lib/ios/**"; + FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../../../../libs/metal/lib/ios"; GCC_OPTIMIZATION_LEVEL = z; GCC_PREPROCESSOR_DEFINITIONS = ( GLES_SILENCE_DEPRECATION, @@ -1338,6 +1343,7 @@ ); MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; + OF_CORE_FRAMEWORKS = "-framework AudioToolbox -framework Accelerate -framework AVFoundation -framework CoreAudio -framework CoreGraphics -framework CoreLocation -framework CoreMotion -framework CoreMedia -framework CoreVideo -framework Foundation -framework GameController -framework GLKit -framework MapKit -framework OpenAL -framework OpenGLES -framework UIKit -framework Security -framework QuartzCore -framework Metal -framework MetalANGLE"; PRODUCT_NAME = "ofxiOS_${PLATFORM_NAME}_ReleaseAppStore"; SDKROOT = iphoneos; SKIP_INSTALL = YES; @@ -1376,7 +1382,7 @@ DEVELOPMENT_TEAM = M927U3X3CC; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; - FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../../../libs/metal/lib/ios"; + FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../../../../libs/metal/lib/ios"; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = NO; @@ -1384,6 +1390,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; IPHONEOS_DEPLOYMENT_TARGET = 13.0; OBJROOT = "$(SRCROOT)/../../lib/ios/build/debug"; + OF_CORE_FRAMEWORKS = "-framework AudioToolbox -framework Accelerate -framework AVFoundation -framework CoreAudio -framework CoreGraphics -framework CoreLocation -framework CoreMotion -framework CoreMedia -framework CoreVideo -framework Foundation -framework GameController -framework GLKit -framework MapKit -framework OpenAL -framework OpenGLES -framework UIKit -framework Security -framework QuartzCore -framework Metal -framework MetalANGLE"; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = "iphonesimulator iphoneos"; @@ -1425,7 +1432,7 @@ CONFIGURATION_TEMP_DIR = "$(SRCROOT)/../../lib/ios/build/release/"; DEVELOPMENT_TEAM = M927U3X3CC; ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../../../libs/metal/lib/ios"; + FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../../../../libs/metal/lib/ios"; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_CHECK_SWITCH_STATEMENTS = NO; @@ -1433,6 +1440,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; IPHONEOS_DEPLOYMENT_TARGET = 13.0; OBJROOT = "$(SRCROOT)/../../lib/ios/build/release"; + OF_CORE_FRAMEWORKS = "-framework AudioToolbox -framework Accelerate -framework AVFoundation -framework CoreAudio -framework CoreGraphics -framework CoreLocation -framework CoreMotion -framework CoreMedia -framework CoreVideo -framework Foundation -framework GameController -framework GLKit -framework MapKit -framework OpenAL -framework OpenGLES -framework UIKit -framework Security -framework QuartzCore -framework Metal -framework MetalANGLE"; ONLY_ACTIVE_ARCH = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = "iphonesimulator iphoneos"; diff --git a/libs/openFrameworksCompiled/project/ios/iOS+OFLib.xcodeproj/xcshareddata/xcschemes/iPhone+OF Static Library.xcscheme b/libs/openFrameworksCompiled/project/ios/iOS+OFLib.xcodeproj/xcshareddata/xcschemes/iPhone+OF Static Library.xcscheme new file mode 100644 index 00000000000..16eeb087d44 --- /dev/null +++ b/libs/openFrameworksCompiled/project/ios/iOS+OFLib.xcodeproj/xcshareddata/xcschemes/iPhone+OF Static Library.xcscheme @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + From 3a93ef4646fd82577ab09d135b93f8d9b6a7ed69 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Thu, 2 Jun 2022 21:19:49 +1000 Subject: [PATCH 24/32] Metal Developments --- addons/ofxiOS/src/app/ofAppiOSWindow.mm | 4 +- addons/ofxiOS/src/core/ofxiOSAppDelegate.mm | 9 +++- addons/ofxiOS/src/core/ofxiOSMLKView.h | 2 +- addons/ofxiOS/src/core/ofxiOSMLKView.mm | 40 +++++++++++----- .../ofxiOS/src/core/ofxiOSMLKViewController.h | 2 + .../src/core/ofxiOSMLKViewController.mm | 47 ++++++++++++++----- .../ios/iOS+OFLib.xcodeproj/project.pbxproj | 19 ++++---- .../iPhone+OF Static Library.xcscheme | 2 +- 8 files changed, 87 insertions(+), 38 deletions(-) diff --git a/addons/ofxiOS/src/app/ofAppiOSWindow.mm b/addons/ofxiOS/src/app/ofAppiOSWindow.mm index 65f55a648ad..42a1045439f 100644 --- a/addons/ofxiOS/src/app/ofAppiOSWindow.mm +++ b/addons/ofxiOS/src/app/ofAppiOSWindow.mm @@ -136,7 +136,7 @@ bAppCreated = true; @autoreleasepool { - UIApplicationMain(0, nil, nil, [NSString stringWithUTF8String:appDelegateClassName.c_str()]); + UIApplicationMain(0, 0, nil, [NSString stringWithUTF8String:appDelegateClassName.c_str()]); } } @@ -439,7 +439,7 @@ #if TARGET_OS_IOS || (TARGET_OS_IPHONE && !TARGET_OS_TV) if(settings.windowControllerType == METAL_KIT) { if([ofxiOSMLKView getInstance]) { - //[[ofxiOSMLKView getInstance] setMultipleTouchEnabled:isOn]; + [[ofxiOSGLKView getInstance] setMultipleTouchEnabled:isOn]; } } else if(settings.windowControllerType == GL_KIT) { if([ofxiOSGLKView getInstance]) { diff --git a/addons/ofxiOS/src/core/ofxiOSAppDelegate.mm b/addons/ofxiOS/src/core/ofxiOSAppDelegate.mm index 2a5be67b22d..73a3e5f1ceb 100644 --- a/addons/ofxiOS/src/core/ofxiOSAppDelegate.mm +++ b/addons/ofxiOS/src/core/ofxiOSAppDelegate.mm @@ -141,7 +141,14 @@ - (void)applicationDidFinishLaunching:(UIApplication *)application { switch(ofxiOSGetOFWindow()->getWindowControllerType()) { case METAL_KIT: NSLog(@"Metal ANGLE openFrameworks"); - self.uiViewController = (UIViewController *)[[ofxiOSMLKViewController alloc] initWithFrame:frame app:(ofxiOSApp *)ofGetAppPtr()]; +// self.uiViewController = (UIViewController *)[[ofxiOSMLKViewController alloc] initWithFrame:frame app:(ofxiOSApp *)ofGetAppPtr()]; + +// UIStoryboard * storyboard = [UIStoryboard storyboardWithName:@"Storyboard" bundle:nil]; +// ofxiOSAppDelegate *del = (ofxiOSAppDelegate *)[UIApplication sharedApplication].delegate; +// MGLKViewController * game = [storyboard instantiateViewControllerWithIdentifier:@"iOSAppMGLKViewController"]; +// [del.navigationController pushViewController:game animated:YES]; + + case GL_KIT: self.uiViewController = (UIViewController *)[[ofxiOSGLKViewController alloc] initWithFrame:frame app:(ofxiOSApp *)ofGetAppPtr() sharegroup:nil]; break; diff --git a/addons/ofxiOS/src/core/ofxiOSMLKView.h b/addons/ofxiOS/src/core/ofxiOSMLKView.h index 912c1644490..da0c880bfe9 100644 --- a/addons/ofxiOS/src/core/ofxiOSMLKView.h +++ b/addons/ofxiOS/src/core/ofxiOSMLKView.h @@ -36,7 +36,7 @@ class ofAppiOSWindow; + (ofxiOSMLKView *) getInstance; - (instancetype)initWithFrame:(CGRect)frame - andApp:(ofxiOSApp *)app; + andApp:(ofxiOSApp *)app andMetal:(MGLKView *)glView; - (void)mglkView:(MGLKView *)view drawInRect:(CGRect)rect; - (void)setupMetal:(MGLKView *)metal; diff --git a/addons/ofxiOS/src/core/ofxiOSMLKView.mm b/addons/ofxiOS/src/core/ofxiOSMLKView.mm index b12a9b0b50e..58997de847c 100644 --- a/addons/ofxiOS/src/core/ofxiOSMLKView.mm +++ b/addons/ofxiOS/src/core/ofxiOSMLKView.mm @@ -41,8 +41,8 @@ +(id)alloc{ return [super alloc]; } -- (instancetype)initWithFrame:(CGRect)frame andApp:(ofxiOSApp *)appPtr { - +- (instancetype)initWithFrame:(CGRect)frame andApp:(ofxiOSApp *)appPtr andMetal:(MGLKView *)glView { + theMetal = glView; window = dynamic_pointer_cast(ofGetMainLoop()->getCurrentWindow()); if(window.get() == NULL) { @@ -50,6 +50,7 @@ - (instancetype)initWithFrame:(CGRect)frame andApp:(ofxiOSApp *)appPtr { return nil; } + // ESRendererVersion preferedRendererVersion = (ESRendererVersion)window->getSettings().glesVersion; // @@ -64,7 +65,7 @@ - (instancetype)initWithFrame:(CGRect)frame andApp:(ofxiOSApp *)appPtr { // stencilFormat:(MGLDrawableStencilFormat)window->getRendererStencilType()]; bSetup = NO; - if(self) { + //if(self) { _instanceRef = self; @@ -76,9 +77,13 @@ - (instancetype)initWithFrame:(CGRect)frame andApp:(ofxiOSApp *)appPtr { windowPos = new glm::vec2(); ofSetOrientation(window->getOrientation()); [self updateDimensions]; + + CGRect bounds = [[UIScreen mainScreen] bounds]; + *windowSize = glm::vec2(bounds.size.width * scaleFactor, bounds.size.height * scaleFactor); + *screenSize = glm::vec2(bounds.size.width * scaleFactor, bounds.size.height * scaleFactor); bInit = YES; - } + //} return self; } @@ -89,6 +94,8 @@ - (void)setup { return; } + [self updateDimensions]; + if(app.get() != ofGetAppPtr()) { // check if already running. ofSetMainLoop(shared_ptr(NULL)); // destroy old main loop. @@ -163,14 +170,23 @@ - (void)layoutSubviews { } - (void)updateDimensions { - *windowPos = glm::vec2(theMetal.frame.origin.x * scaleFactor, theMetal.frame.origin.y * scaleFactor); - *windowSize = glm::vec2(theMetal.bounds.size.width * scaleFactor, theMetal.bounds.size.height * scaleFactor); + if(theMetal) { + + *windowPos = glm::vec2(theMetal.frame.origin.x * scaleFactor, theMetal.frame.origin.y * scaleFactor); + *windowSize = glm::vec2(theMetal.bounds.size.width * scaleFactor, theMetal.bounds.size.height * scaleFactor); - UIScreen * currentScreen = theMetal.window.screen; // current screen is the screen that GLView is attached to. - if(!currentScreen) { // if GLView is not attached, assume to be main device screen. - currentScreen = [UIScreen mainScreen]; + UIScreen * currentScreen = theMetal.window.screen; // current screen is the screen that GLView is attached to. + if(!currentScreen) { // if GLView is not attached, assume to be main device screen. + currentScreen = [UIScreen mainScreen]; + } + *screenSize = glm::vec2(currentScreen.bounds.size.width * scaleFactor, currentScreen.bounds.size.height * scaleFactor); + } else { + ofLog(OF_LOG_FATAL_ERROR, "ofxiOSMLKView updateDimensions. No Metal is NULL"); + + CGRect bounds = [[UIScreen mainScreen] bounds]; + *windowSize = glm::vec2(bounds.size.width * scaleFactor, bounds.size.height * scaleFactor); + *screenSize = glm::vec2(bounds.size.width * scaleFactor, bounds.size.height * scaleFactor); } - *screenSize = glm::vec2(currentScreen.bounds.size.width * scaleFactor, currentScreen.bounds.size.height * scaleFactor); } - (void) setMSAA:(bool)on @@ -303,7 +319,9 @@ - (void)touchesBegan:(NSSet *)touches - (void)setupMetal:(MGLKView *)metal { - theMetal = metal; + if(theMetal == nil) + theMetal = metal; + [self updateDimensions]; } //------------------------------------------------------ diff --git a/addons/ofxiOS/src/core/ofxiOSMLKViewController.h b/addons/ofxiOS/src/core/ofxiOSMLKViewController.h index 0616e9f02a6..3172ac6c2fa 100644 --- a/addons/ofxiOS/src/core/ofxiOSMLKViewController.h +++ b/addons/ofxiOS/src/core/ofxiOSMLKViewController.h @@ -32,6 +32,8 @@ class ofxiOSApp; @property (nonatomic, strong) MGLKView * glView; // no subclass @property (nonatomic, strong) ofxiOSMLKView * ofView; +@property (nonatomic, strong) IBOutlet MGLKView* mtlkView; + - (instancetype)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app; - (void)mglkView:(MGLKView *)view drawInRect:(CGRect)rect; diff --git a/addons/ofxiOS/src/core/ofxiOSMLKViewController.mm b/addons/ofxiOS/src/core/ofxiOSMLKViewController.mm index 601679c201e..520e1e6d4a8 100644 --- a/addons/ofxiOS/src/core/ofxiOSMLKViewController.mm +++ b/addons/ofxiOS/src/core/ofxiOSMLKViewController.mm @@ -20,6 +20,8 @@ @interface ofxiOSMLKViewController() isMultiTouch()]; - [view bindDrawable]; +// [self.glView setMultipleTouchEnabled:ofxiOSGetOFWindow()->isMultiTouch()]; + [self.glView bindDrawable]; [self.ofView setup]; } @@ -116,7 +132,16 @@ -(void) checkError - (void)mglkView:(MGLKView *)view drawInRect:(CGRect)rect { [view bindDrawable]; - [self.ofView draw]; + +// @try { + [self.ofView draw]; +// } +// +// @catch ( NSException *e ) { +// NSLog(@"exception:%@", e.reason); +// } +// + } @@ -183,26 +208,26 @@ - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { if(self.glView != nil) - [self.glView touchesMoved:touches withEvent:event]; + [self.ofView touchesMoved:touches withEvent:event]; if(self.ofView != nil) [self.ofView touchesMoved:touches withEvent:event]; } - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { if(self.glView != nil) - [self.glView touchesEnded:touches withEvent:event]; + [self.ofView touchesEnded:touches withEvent:event]; if(self.ofView != nil) [self.ofView touchesEnded:touches withEvent:event]; } - (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event { if(self.glView != nil) - [self.glView touchesCancelled:touches withEvent:event]; + [self.ofView touchesCancelled:touches withEvent:event]; if(self.ofView != nil) [self.ofView touchesCancelled:touches withEvent:event]; } - (void)touchesEstimatedPropertiesUpdated:(NSSet *)touches { - if(self.glView != nil) - [self.glView touchesEstimatedPropertiesUpdated:touches]; +// if(self.glView != nil) +// [self.ofView touchesEstimatedPropertiesUpdated:touches]; // if(self.ofView != nil) // [self.ofView touchesEstimatedPropertiesUpdated:touches]; } diff --git a/libs/openFrameworksCompiled/project/ios/iOS+OFLib.xcodeproj/project.pbxproj b/libs/openFrameworksCompiled/project/ios/iOS+OFLib.xcodeproj/project.pbxproj index 9a34d40dcbf..7c2a4e39418 100644 --- a/libs/openFrameworksCompiled/project/ios/iOS+OFLib.xcodeproj/project.pbxproj +++ b/libs/openFrameworksCompiled/project/ios/iOS+OFLib.xcodeproj/project.pbxproj @@ -19,7 +19,6 @@ 15594F8715C5697C00727FF2 /* ofxiOSApp.h in Headers */ = {isa = PBXBuildFile; fileRef = 15594F7E15C5697C00727FF2 /* ofxiOSApp.h */; }; 15594F9115C56A8A00727FF2 /* ofxiOSEAGLView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 15594F8B15C56A8A00727FF2 /* ofxiOSEAGLView.mm */; }; 15594F9215C56A8A00727FF2 /* ofxiOSAppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 15594F8C15C56A8A00727FF2 /* ofxiOSAppDelegate.mm */; }; - 15594F9315C56A8A00727FF2 /* ofxiOSViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 15594F8D15C56A8A00727FF2 /* ofxiOSViewController.mm */; }; 15594F9415C56A8A00727FF2 /* ofxiOSEAGLView.h in Headers */ = {isa = PBXBuildFile; fileRef = 15594F8E15C56A8A00727FF2 /* ofxiOSEAGLView.h */; }; 15594F9515C56A8A00727FF2 /* ofxiOSAppDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 15594F8F15C56A8A00727FF2 /* ofxiOSAppDelegate.h */; }; 15594F9615C56A8A00727FF2 /* ofxiOSViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 15594F9015C56A8A00727FF2 /* ofxiOSViewController.h */; }; @@ -124,13 +123,12 @@ BF3679BA282BBBB9004FD612 /* ofxiOSMLKView.mm in Sources */ = {isa = PBXBuildFile; fileRef = BF3679B4282BBBB9004FD612 /* ofxiOSMLKView.mm */; }; BF3679BB282BBBB9004FD612 /* ofxiOSViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = BF3679B5282BBBB9004FD612 /* ofxiOSViewController.mm */; }; BF3679BC282BBBB9004FD612 /* ofxiOSMLKViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = BF3679B6282BBBB9004FD612 /* ofxiOSMLKViewController.h */; }; - BF3679BD282BBBB9004FD612 /* ofxiOSViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = BF3679B7282BBBB9004FD612 /* ofxiOSViewController.h */; }; BF3679BE282BBBB9004FD612 /* ofxiOSMLKViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = BF3679B8282BBBB9004FD612 /* ofxiOSMLKViewController.mm */; }; BF3679C2282BBCC4004FD612 /* EAMLKView.h in Headers */ = {isa = PBXBuildFile; fileRef = BF3679C1282BBCB3004FD612 /* EAMLKView.h */; }; BF3679C3282BBCC4004FD612 /* EAMLKView.m in Sources */ = {isa = PBXBuildFile; fileRef = BF3679C0282BBCB3004FD612 /* EAMLKView.m */; }; BF41D521282B95D200608DA9 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF41D520282B95D200608DA9 /* Accelerate.framework */; }; BFE07D58282E5FE800E599C1 /* EAMLKView.h in Sources */ = {isa = PBXBuildFile; fileRef = BF3679C1282BBCB3004FD612 /* EAMLKView.h */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; - BFE07D59282E5FE800E599C1 /* ofxiOSMLKView.h in Sources */ = {isa = PBXBuildFile; fileRef = BF3679B3282BBBB9004FD612 /* ofxiOSMLKView.h */; }; + BFE07D59282E5FE800E599C1 /* ofxiOSMLKView.h in Sources */ = {isa = PBXBuildFile; fileRef = BF3679B3282BBBB9004FD612 /* ofxiOSMLKView.h */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; BFE07D5A282E5FE800E599C1 /* ofxiOSMLKViewController.h in Sources */ = {isa = PBXBuildFile; fileRef = BF3679B6282BBBB9004FD612 /* ofxiOSMLKViewController.h */; }; E4F76E19176CB27200798745 /* of3dPrimitives.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76D6F176CB27200798745 /* of3dPrimitives.cpp */; }; E4F76E1A176CB27200798745 /* of3dPrimitives.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76D70176CB27200798745 /* of3dPrimitives.h */; }; @@ -1103,7 +1101,6 @@ 678C3D2B176F04F800D1CC68 /* SoundStream.h in Headers */, 671C0AF41770246200DF03B3 /* AVSoundPlayer.h in Headers */, 671C0AF61770246200DF03B3 /* ofxiOSSoundPlayer.h in Headers */, - BF3679BD282BBBB9004FD612 /* ofxiOSViewController.h in Headers */, 67833F8719F8990D00DBE7AA /* ofTimer.h in Headers */, 67509ABD17979781003A3A29 /* ofXml.h in Headers */, 66EA462C17A6D396009BB12A /* ofxOpenALSoundPlayer.h in Headers */, @@ -1138,7 +1135,7 @@ 29B97313FDCFA39411CA2CEA /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1330; + LastUpgradeCheck = 1340; TargetAttributes = { BB24DE5C10DA7A3F00E9C588 = { DevelopmentTeam = M927U3X3CC; @@ -1147,13 +1144,14 @@ }; buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "iOS+OFLib" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 1; knownRegions = ( - English, - Japanese, - French, - German, + Base, + fr, + de, + ja, + en, ); mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; projectDirPath = ""; @@ -1238,7 +1236,6 @@ 15594F9115C56A8A00727FF2 /* ofxiOSEAGLView.mm in Sources */, 15594F9215C56A8A00727FF2 /* ofxiOSAppDelegate.mm in Sources */, 69433CCA1FE45BCD004D5B73 /* ofGraphicsBaseTypes.cpp in Sources */, - 15594F9315C56A8A00727FF2 /* ofxiOSViewController.mm in Sources */, 9008001D204EDC0F00DC786A /* EAGLKView.m in Sources */, 15594FA315C56BB700727FF2 /* AVFoundationVideoGrabber.mm in Sources */, 15594FA415C56BB700727FF2 /* AVFoundationVideoPlayer.m in Sources */, diff --git a/libs/openFrameworksCompiled/project/ios/iOS+OFLib.xcodeproj/xcshareddata/xcschemes/iPhone+OF Static Library.xcscheme b/libs/openFrameworksCompiled/project/ios/iOS+OFLib.xcodeproj/xcshareddata/xcschemes/iPhone+OF Static Library.xcscheme index 16eeb087d44..e8c1cd4018d 100644 --- a/libs/openFrameworksCompiled/project/ios/iOS+OFLib.xcodeproj/xcshareddata/xcschemes/iPhone+OF Static Library.xcscheme +++ b/libs/openFrameworksCompiled/project/ios/iOS+OFLib.xcodeproj/xcshareddata/xcschemes/iPhone+OF Static Library.xcscheme @@ -1,6 +1,6 @@ Date: Thu, 2 Jun 2022 21:20:10 +1000 Subject: [PATCH 25/32] Temp Fixes --- libs/openFrameworks/gl/ofGLProgrammableRenderer.cpp | 6 +++++- libs/openFrameworks/graphics/ofTrueTypeFont.cpp | 11 ++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/libs/openFrameworks/gl/ofGLProgrammableRenderer.cpp b/libs/openFrameworks/gl/ofGLProgrammableRenderer.cpp index 50a27f930b1..fcb27c5ef52 100644 --- a/libs/openFrameworks/gl/ofGLProgrammableRenderer.cpp +++ b/libs/openFrameworks/gl/ofGLProgrammableRenderer.cpp @@ -590,6 +590,10 @@ void ofGLProgrammableRenderer::setupScreenPerspective(float width, float height, viewW = currentViewport.width; viewH = currentViewport.height; + + viewW = 1920; + viewH = 1080; + fov = 60; }else{ viewW = width; viewH = height; @@ -2471,7 +2475,7 @@ void ofGLProgrammableRenderer::setup(int _major, int _minor){ setupGraphicDefaults(); viewport(); - setupScreenPerspective(); + setupScreenPerspective(1920, 1080); } const ofShader * ofGLProgrammableRenderer::getVideoShader(const ofBaseVideoDraws & video) const{ diff --git a/libs/openFrameworks/graphics/ofTrueTypeFont.cpp b/libs/openFrameworks/graphics/ofTrueTypeFont.cpp index 0fa0de35411..1c27eecca75 100644 --- a/libs/openFrameworks/graphics/ofTrueTypeFont.cpp +++ b/libs/openFrameworks/graphics/ofTrueTypeFont.cpp @@ -871,11 +871,12 @@ bool ofTrueTypeFont::load(const ofTrueTypeFontSettings & _settings){ } int maxSize; - glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxSize); - if(w > maxSize || h > maxSize){ - ofLogError("ofTruetypeFont") << "Trying to allocate texture of " << w << "x" << h << " which is bigger than supported in current platform: " << maxSize; - return false; - }else{ +// glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxSize); +// if(w > maxSize || h > maxSize){ +// ofLogError("ofTruetypeFont") << "Trying to allocate texture of " << w << "x" << h << " which is bigger than supported in current platform: " << maxSize; +// return false; +// }else + { texAtlas.allocate(atlasPixelsLuminanceAlpha,false); texAtlas.setRGToRGBASwizzles(true); From 92bb06eeccee8bc5a09198f3706d62c5e4f4272c Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Tue, 15 Nov 2022 17:55:25 +1100 Subject: [PATCH 26/32] Further Metal Developments for iOS oF issues still getting the storyboard to register as the type to instantiate the context --- addons/ofxiOS/src/core/ofxiOSMLKView.h | 10 +- addons/ofxiOS/src/core/ofxiOSMLKView.mm | 244 ++++++++++-- .../ofxiOS/src/core/ofxiOSMLKViewController.h | 3 +- .../src/core/ofxiOSMLKViewController.mm | 111 +++++- addons/ofxiOS/src/ml/EAMLKView.h | 87 +++-- addons/ofxiOS/src/ml/EAMLKView.m | 366 ++++++++++++------ 6 files changed, 622 insertions(+), 199 deletions(-) diff --git a/addons/ofxiOS/src/core/ofxiOSMLKView.h b/addons/ofxiOS/src/core/ofxiOSMLKView.h index da0c880bfe9..27aceb89e1b 100644 --- a/addons/ofxiOS/src/core/ofxiOSMLKView.h +++ b/addons/ofxiOS/src/core/ofxiOSMLKView.h @@ -13,11 +13,15 @@ #import #import #include +#import +#import +#import +#import class ofxiOSApp; class ofAppiOSWindow; -@interface ofxiOSMLKView : NSObject { +@interface ofxiOSMLKView : UIView { @protected NSMutableDictionary * activeTouches; @@ -36,7 +40,9 @@ class ofAppiOSWindow; + (ofxiOSMLKView *) getInstance; - (instancetype)initWithFrame:(CGRect)frame - andApp:(ofxiOSApp *)app andMetal:(MGLKView *)glView; + andApp:(ofxiOSApp *)app; + +- (void)setupApp:(ofxiOSApp *)app; - (void)mglkView:(MGLKView *)view drawInRect:(CGRect)rect; - (void)setupMetal:(MGLKView *)metal; diff --git a/addons/ofxiOS/src/core/ofxiOSMLKView.mm b/addons/ofxiOS/src/core/ofxiOSMLKView.mm index 58997de847c..5803721d32d 100644 --- a/addons/ofxiOS/src/core/ofxiOSMLKView.mm +++ b/addons/ofxiOS/src/core/ofxiOSMLKView.mm @@ -20,6 +20,27 @@ @interface ofxiOSMLKView() { shared_ptr window; shared_ptr app; BOOL bSetup; + + + // The pixel dimensions of the backbuffer + GLint backingWidth; + GLint backingHeight; + + MGLContext *context; + MGLLayer *glLayer; + + // Shader objects + GLuint vertexShader; + GLuint fragmentShader; + GLuint shaderProgram; + + Boolean firstTouch; + Boolean needsErase; + + // Buffer Objects + GLuint vboId; + + BOOL initialized; } - (void)updateDimensions; @end @@ -35,14 +56,142 @@ + (ofxiOSMLKView *) getInstance { return _instanceRef; } +// You must implement this method ++ (Class) layerClass { + return [MGLLayer class]; +} + +(id)alloc{ NSLog(@"Allocating..."); // return self; return [super alloc]; } -- (instancetype)initWithFrame:(CGRect)frame andApp:(ofxiOSApp *)appPtr andMetal:(MGLKView *)glView { - theMetal = glView; + +- (id)initWithCoder:(NSCoder *)coder +{ + if ((self = [super initWithCoder:coder])) + { + glLayer = (MGLLayer *)self.layer; + + glLayer.opaque = YES; + // In this application, we want to retain the EAGLDrawable contents after a call to + // presentRenderbuffer. + glLayer.drawableColorFormat = MGLDrawableColorFormatRGBA8888; + glLayer.drawableDepthFormat = MGLDrawableDepthFormatNone; + glLayer.drawableStencilFormat = MGLDrawableStencilFormatNone; + glLayer.retainedBacking = YES; + + if(true) + glLayer.drawableMultisample = MGLDrawableMultisample4X; + else + glLayer.drawableMultisample = MGLDrawableMultisampleNone; + // +// #if TARGET_OS_IOS || (TARGET_OS_IPHONE && !TARGET_OS_TV) +//// glLayer.multipleTouchEnabled = true; +// #endif + // self.opaque = true; + // + // [self bindDrawable]; + // + bInit = YES; + + context = [[MGLContext alloc] initWithAPI:kMGLRenderingAPIOpenGLES2]; + + if (!context || ![MGLContext setCurrentContext:context]) + { + return nil; + } + + // Set the view's scale factor as you wish + self.contentScaleFactor = [[UIScreen mainScreen] scale]; + + + } + + return self; +} + + +// If our view is resized, we'll be asked to layout subviews. +// This is the perfect opportunity to also update the framebuffer so that it is +// the same size as our display area. +- (void)layoutSubviews +{ + [MGLContext setCurrentContext:context forLayer:glLayer]; + + if (!initialized) + { + initialized = [self initGL]; + } + else + { + [self resizeFromGLLayer]; + } + + // Clear the framebuffer the first time it is allocated + if (needsErase) + { + [self erase]; + needsErase = NO; + } + + window->events().notifyWindowResized(ofGetWidth(), ofGetHeight()); +} + +- (BOOL)resizeFromGLLayer +{ + backingWidth = (GLint)glLayer.drawableSize.width; + backingHeight = (GLint)glLayer.drawableSize.height; + + + // Update viewport + glViewport(0, 0, backingWidth, backingHeight); + + return YES; +} + +- (BOOL)initGL +{ + backingWidth = (GLint)glLayer.drawableSize.width; + backingHeight = (GLint)glLayer.drawableSize.height; + + // Setup the view port in Pixels + glViewport(0, 0, backingWidth, backingHeight); + +} + +// Releases resources when they are not longer needed. +- (void)dealloc +{ + [self destroy]; + // vbo + if (vboId) + { + glDeleteBuffers(1, &vboId); + vboId = 0; + } + + // tear down context + if ([MGLContext currentContext] == context) + [MGLContext setCurrentContext:nil]; +} + +- (void)erase +{ + [MGLContext setCurrentContext:context forLayer:glLayer]; + + // Clear the buffer + glClearColor(0.0, 0.0, 0.0, 0.0); + glClear(GL_COLOR_BUFFER_BIT); + + // Display the buffer + [glLayer present]; +} + + +- (instancetype)initWithFrame:(CGRect)frame andApp:(ofxiOSApp *)appPtr { +// theMetal = glView; window = dynamic_pointer_cast(ofGetMainLoop()->getCurrentWindow()); if(window.get() == NULL) { @@ -153,29 +302,54 @@ - (void)destroy { // [super destroy]; } -- (void)mglkView:(MGLKView *)view drawInRect:(CGRect)rect { -// [super mglkView:view drawInRect:rect]; + +- (void)setupApp:(ofxiOSApp *)appPtr { + bSetup = NO; + //if(self) { + + _instanceRef = self; + + app = shared_ptr(appPtr); + activeTouches = [[NSMutableDictionary alloc] init]; + + screenSize = new glm::vec2(); + windowSize = new glm::vec2(); + windowPos = new glm::vec2(); + ofSetOrientation(window->getOrientation()); + [self updateDimensions]; + + CGRect bounds = [[UIScreen mainScreen] bounds]; + *windowSize = glm::vec2(bounds.size.width * scaleFactor, bounds.size.height * scaleFactor); + *screenSize = glm::vec2(bounds.size.width * scaleFactor, bounds.size.height * scaleFactor); + + bInit = YES; + +// bSetup = YES; } -- (void)dealloc { - [self destroy]; +- (void)mglkView:(MGLKView *)view drawInRect:(CGRect)rect { +// [super mglkView:view drawInRect:rect]; } -- (void)layoutSubviews { -// [super layoutSubviews]; -// [self updateDimensions]; +//- (void)dealloc { +// [self destroy]; +//} // -// [super notifyResized]; - window->events().notifyWindowResized(ofGetWidth(), ofGetHeight()); -} +//- (void)layoutSubviews { +//// [super layoutSubviews]; +//// [self updateDimensions]; +//// +//// [super notifyResized]; +// window->events().notifyWindowResized(ofGetWidth(), ofGetHeight()); +//} - (void)updateDimensions { - if(theMetal) { + if(glLayer) { - *windowPos = glm::vec2(theMetal.frame.origin.x * scaleFactor, theMetal.frame.origin.y * scaleFactor); - *windowSize = glm::vec2(theMetal.bounds.size.width * scaleFactor, theMetal.bounds.size.height * scaleFactor); + *windowPos = glm::vec2(glLayer.frame.origin.x * scaleFactor, glLayer.frame.origin.y * scaleFactor); + *windowSize = glm::vec2(glLayer.bounds.size.width * scaleFactor, glLayer.bounds.size.height * scaleFactor); - UIScreen * currentScreen = theMetal.window.screen; // current screen is the screen that GLView is attached to. + UIScreen * currentScreen = self.window.screen; // current screen is the screen that GLView is attached to. if(!currentScreen) { // if GLView is not attached, assume to be main device screen. currentScreen = [UIScreen mainScreen]; } @@ -192,9 +366,9 @@ - (void)updateDimensions { - (void) setMSAA:(bool)on { if(on) - theMetal.drawableMultisample = MGLDrawableMultisample4X; + glLayer.drawableMultisample = MGLDrawableMultisample4X; else - theMetal.drawableMultisample = MGLDrawableMultisampleNone; + glLayer.drawableMultisample = MGLDrawableMultisampleNone; } - (void)notifyResized { @@ -293,7 +467,7 @@ - (void)touchesBegan:(NSSet *)touches [activeTouches setObject:@(touchIndex) forKey:[NSValue valueWithPointer:(__bridge void *)touch]]; - CGPoint touchPoint = [touch locationInView:theMetal]; + CGPoint touchPoint = [touch locationInView:self]; touchPoint.x *= scaleFactor; // this has to be done because retina still returns points in 320x240 but with high percision touchPoint.y *= scaleFactor; @@ -304,7 +478,7 @@ - (void)touchesBegan:(NSSet *)touches } ofTouchEventArgs touchArgs; - touchArgs.numTouches = [[event touchesForView:theMetal] count]; + touchArgs.numTouches = [[event touchesForView:self] count]; touchArgs.x = touchPoint.x; touchArgs.y = touchPoint.y; touchArgs.id = touchIndex; @@ -317,12 +491,12 @@ - (void)touchesBegan:(NSSet *)touches } } -- (void)setupMetal:(MGLKView *)metal { - - if(theMetal == nil) - theMetal = metal; - [self updateDimensions]; -} +//- (void)setupMetal:(MGLKView *)metal { +// +// if(theMetal == nil) +// theMetal = metal; +// [self updateDimensions]; +//} //------------------------------------------------------ - (void)touchesMoved:(NSSet *)touches @@ -337,7 +511,7 @@ - (void)touchesMoved:(NSSet *)touches for(UITouch *touch in touches){ int touchIndex = [[activeTouches objectForKey:[NSValue valueWithPointer:(__bridge void *)touch]] intValue]; - CGPoint touchPoint = [touch locationInView:theMetal]; + CGPoint touchPoint = [touch locationInView:self]; touchPoint.x *= scaleFactor; // this has to be done because retina still returns points in 320x240 but with high percision touchPoint.y *= scaleFactor; @@ -347,7 +521,7 @@ - (void)touchesMoved:(NSSet *)touches window->events().notifyMouseDragged(touchPoint.x, touchPoint.y, 0); } ofTouchEventArgs touchArgs; - touchArgs.numTouches = [[event touchesForView:theMetal] count]; + touchArgs.numTouches = [[event touchesForView:self] count]; touchArgs.x = touchPoint.x; touchArgs.y = touchPoint.y; touchArgs.id = touchIndex; @@ -371,7 +545,7 @@ - (void)touchesEnded:(NSSet *)touches [activeTouches removeObjectForKey:[NSValue valueWithPointer:(__bridge void *)touch]]; - CGPoint touchPoint = [touch locationInView:theMetal]; + CGPoint touchPoint = [touch locationInView:self]; touchPoint.x *= scaleFactor; // this has to be done because retina still returns points in 320x240 but with high percision touchPoint.y *= scaleFactor; @@ -382,7 +556,7 @@ - (void)touchesEnded:(NSSet *)touches } ofTouchEventArgs touchArgs; - touchArgs.numTouches = [[event touchesForView:theMetal] count] - [touches count]; + touchArgs.numTouches = [[event touchesForView:self] count] - [touches count]; touchArgs.x = touchPoint.x; touchArgs.y = touchPoint.y; touchArgs.id = touchIndex; @@ -404,14 +578,14 @@ - (void)touchesCancelled:(NSSet *)touches for(UITouch *touch in touches){ int touchIndex = [[activeTouches objectForKey:[NSValue valueWithPointer:(__bridge void *)touch]] intValue]; - CGPoint touchPoint = [touch locationInView:theMetal]; + CGPoint touchPoint = [touch locationInView:self]; touchPoint.x *= scaleFactor; // this has to be done because retina still returns points in 320x240 but with high percision touchPoint.y *= scaleFactor; touchPoint = [self orientateTouchPoint:touchPoint]; ofTouchEventArgs touchArgs; - touchArgs.numTouches = [[event touchesForView:theMetal] count]; + touchArgs.numTouches = [[event touchesForView:self] count]; touchArgs.x = touchPoint.x; touchArgs.y = touchPoint.y; touchArgs.id = touchIndex; @@ -426,9 +600,9 @@ - (void)touchesCancelled:(NSSet *)touches - (void)updateScaleFactor { //GLKView *view = (GLKView *)self; - scaleFactor = MIN(scaleFactorPref, [theMetal contentScaleFactor]); - if(scaleFactor != theMetal.contentScaleFactor) { - theMetal.contentScaleFactor = scaleFactor; + scaleFactor = MIN(scaleFactorPref, [self contentScaleFactor]); + if(scaleFactor != self.contentScaleFactor) { + self.contentScaleFactor = scaleFactor; } } diff --git a/addons/ofxiOS/src/core/ofxiOSMLKViewController.h b/addons/ofxiOS/src/core/ofxiOSMLKViewController.h index 3172ac6c2fa..ee2e735d693 100644 --- a/addons/ofxiOS/src/core/ofxiOSMLKViewController.h +++ b/addons/ofxiOS/src/core/ofxiOSMLKViewController.h @@ -32,9 +32,8 @@ class ofxiOSApp; @property (nonatomic, strong) MGLKView * glView; // no subclass @property (nonatomic, strong) ofxiOSMLKView * ofView; -@property (nonatomic, strong) IBOutlet MGLKView* mtlkView; - - (instancetype)initWithFrame:(CGRect)frame app:(ofxiOSApp *)app; +- (void)setupApp:(ofxiOSApp *)appPtr; - (void)mglkView:(MGLKView *)view drawInRect:(CGRect)rect; diff --git a/addons/ofxiOS/src/core/ofxiOSMLKViewController.mm b/addons/ofxiOS/src/core/ofxiOSMLKViewController.mm index 520e1e6d4a8..0ef11aa65e8 100644 --- a/addons/ofxiOS/src/core/ofxiOSMLKViewController.mm +++ b/addons/ofxiOS/src/core/ofxiOSMLKViewController.mm @@ -22,6 +22,10 @@ @interface ofxiOSMLKViewController() +#import +#import +#import + ////#import //#import // @@ -23,28 +29,27 @@ - (void)glViewDraw; - (void)glViewResized; @end -// -//@interface EAMLKView : MGLKView -//{ -// -//@protected -// -// CGFloat scaleFactor; -// CGFloat scaleFactorPref; -// -// BOOL bUseDepth; -// BOOL bUseMSAA; -// BOOL bUseRetina; -// NSInteger msaaSamples; -// ESRendererVersion rendererVersion; -//} -// -///// TODO: need to give protocol explicity. -///// ???: can we assume EAGLKViewDelegate is inherit GLKViewDelegate? -//@property (nonatomic, weak) id delegate; -// + +@interface EAMLKView : UIView +{ + +@protected + + CGFloat scaleFactor; + CGFloat scaleFactorPref; + + BOOL bUseDepth; + BOOL bUseMSAA; + BOOL bUseRetina; + NSInteger msaaSamples; + //ESRendererVersion rendererVersion; +} + +/// TODO: need to give protocol explicity. +/// ???: can we assume EAGLKViewDelegate is inherit GLKViewDelegate? +@property (nonatomic, weak) id delegate; + //- (instancetype)initWithFrame:(CGRect)frame -// andPreferedRenderer:(ESRendererVersion)rendererVersion // andAA:(bool)msaaEnabled // andRetina:(bool)retinaEnabled // andRetinaScale:(CGFloat)retinaScale @@ -52,23 +57,23 @@ // depthFormat:(MGLDrawableDepthFormat)depthFormat // stencilFormat:(MGLDrawableStencilFormat)stencilFormat; // -// -// -//- (void)setup; -//- (void)update; -//- (void)draw; -//- (void)destroy; -// -//- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event; -//- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event; -//- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event; -//- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event; -// -//- (void)touchesEstimatedPropertiesUpdated:(NSSet *)toucheso; -//- (void)setMSAA:(bool)on; -//- (void)notifyAnimationStarted; -//- (void)notifyAnimationStopped; -//- (void)notifyDraw; -//- (void)notifyResized; -// -//@end + + +- (void)setup; +- (void)update; +- (void)draw; +- (void)destroy; + +- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event; +- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event; +- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event; +- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event; + +- (void)touchesEstimatedPropertiesUpdated:(NSSet *)toucheso; +- (void)setMSAA:(bool)on; +- (void)notifyAnimationStarted; +- (void)notifyAnimationStopped; +- (void)notifyDraw; +- (void)notifyResized; + +@end diff --git a/addons/ofxiOS/src/ml/EAMLKView.m b/addons/ofxiOS/src/ml/EAMLKView.m index 0f5eaba157b..4c0140f565e 100644 --- a/addons/ofxiOS/src/ml/EAMLKView.m +++ b/addons/ofxiOS/src/ml/EAMLKView.m @@ -1,30 +1,169 @@ -//// -//// EAMLKView.h -//// iPhone+OF Static Library -//// -//// Created by Dan Rosser on 11/5/22. -//// // -//#include +// EAMLKView.h +// iPhone+OF Static Library // -//#import "EAMLKView.h" -//#import -// -//#import "ES2Renderer.h" -// -//@interface EAMLKView() { -// BOOL bInit; -//} -//@end -// -//@implementation EAMLKView -// -//@synthesize delegate; -//// You must implement this method -//+ (Class) layerClass { -// return [MGLLayer class]; -//} +// Created by Dan Rosser on 11/5/22. // + +#include + +#import "EAMLKView.h" +#import + +#import "ES2Renderer.h" + +@interface EAMLKView() { + BOOL bInit; + + // The pixel dimensions of the backbuffer + GLint backingWidth; + GLint backingHeight; + + MGLContext *context; + __weak MGLLayer *glLayer; + + // Shader objects + GLuint vertexShader; + GLuint fragmentShader; + GLuint shaderProgram; + + Boolean firstTouch; + Boolean needsErase; + + // Buffer Objects + GLuint vboId; + + BOOL initialized; +} +@end + +@implementation EAMLKView + +@synthesize delegate; +// You must implement this method ++ (Class) layerClass { + return [MGLLayer class]; +} + +- (id)initWithCoder:(NSCoder *)coder +{ + if ((self = [super initWithCoder:coder])) + { + glLayer = (MGLLayer *)self.layer; + + glLayer.opaque = YES; + // In this application, we want to retain the EAGLDrawable contents after a call to + // presentRenderbuffer. + glLayer.drawableColorFormat = MGLDrawableColorFormatRGBA8888; + glLayer.drawableDepthFormat = MGLDrawableDepthFormatNone; + glLayer.drawableStencilFormat = MGLDrawableStencilFormatNone; + glLayer.retainedBacking = YES; + + if(true) + glLayer.drawableMultisample = MGLDrawableMultisample4X; + else + glLayer.drawableMultisample = MGLDrawableMultisampleNone; + // +// #if TARGET_OS_IOS || (TARGET_OS_IPHONE && !TARGET_OS_TV) +//// glLayer.multipleTouchEnabled = true; +// #endif + // self.opaque = true; + // + // [self bindDrawable]; + // + bInit = YES; + + context = [[MGLContext alloc] initWithAPI:kMGLRenderingAPIOpenGLES2]; + + if (!context || ![MGLContext setCurrentContext:context]) + { + return nil; + } + + // Set the view's scale factor as you wish + self.contentScaleFactor = [[UIScreen mainScreen] scale]; + + + } + + return self; +} + + +// If our view is resized, we'll be asked to layout subviews. +// This is the perfect opportunity to also update the framebuffer so that it is +// the same size as our display area. +- (void)layoutSubviews +{ + [MGLContext setCurrentContext:context forLayer:glLayer]; + + if (!initialized) + { + initialized = [self initGL]; + } + else + { + [self resizeFromGLLayer]; + } + + // Clear the framebuffer the first time it is allocated + if (needsErase) + { + [self erase]; + needsErase = NO; + } +} + +- (BOOL)resizeFromGLLayer +{ + backingWidth = (GLint)glLayer.drawableSize.width; + backingHeight = (GLint)glLayer.drawableSize.height; + + + // Update viewport + glViewport(0, 0, backingWidth, backingHeight); + + return YES; +} + +- (BOOL)initGL +{ + backingWidth = (GLint)glLayer.drawableSize.width; + backingHeight = (GLint)glLayer.drawableSize.height; + + // Setup the view port in Pixels + glViewport(0, 0, backingWidth, backingHeight); + +} + +// Releases resources when they are not longer needed. +- (void)dealloc +{ + [self destroy]; + // vbo + if (vboId) + { + glDeleteBuffers(1, &vboId); + vboId = 0; + } + + // tear down context + if ([MGLContext currentContext] == context) + [MGLContext setCurrentContext:nil]; +} + +- (void)erase +{ + [MGLContext setCurrentContext:context forLayer:glLayer]; + + // Clear the buffer + glClearColor(0.0, 0.0, 0.0, 0.0); + glClear(GL_COLOR_BUFFER_BIT); + + // Display the buffer + [glLayer present]; +} + //- (instancetype)initWithFrame:(CGRect)frame // andPreferedRenderer:(ESRendererVersion)version // andAA:(bool)msaaEnabled @@ -35,13 +174,13 @@ // stencilFormat:(MGLDrawableStencilFormat)stencilFormat { // // if((self = [super initWithFrame:frame])) { -// +// // rendererVersion = version; // bUseMSAA = msaaEnabled; // bUseRetina = retinaEnabled; // //------------------------------------------------------ // scaleFactorPref = retinaScale; -// +// // if(bUseRetina == YES) { // if(scaleFactorPref == 0.0) { // scaleFactorPref = [[UIScreen mainScreen] nativeScale]; // no scale preference, default to max scale. @@ -55,15 +194,15 @@ // } else { // scaleFactorPref = 1.0; // } -// +// // [self updateScaleFactor]; -// +// // //------------------------------------------------------ // if(rendererVersion == ESRendererVersion_30) { // NSLog(@"OpenGLES 3.0 Renderer not implemented for oF. Defaulting to OpenGLES 2.0"); // rendererVersion = ESRendererVersion_20; // } -// +// // if(rendererVersion == ESRendererVersion_20) { // self.context = [[MGLContext alloc] initWithAPI:kMGLRenderingAPIOpenGLES2]; // NSLog(@"Creating OpenGL ES2 Renderer"); @@ -72,104 +211,109 @@ // rendererVersion = ESRendererVersion_11; // } // } -// -// -// +// +// +// // self.drawableColorFormat = colorFormat; // self.drawableDepthFormat = depthFormat; // self.drawableStencilFormat = stencilFormat; -// +// // if(msaaEnabled) // self.drawableMultisample = MGLDrawableMultisample4X; // else // self.drawableMultisample = MGLDrawableMultisampleNone; -// +// //#if TARGET_OS_IOS || (TARGET_OS_IPHONE && !TARGET_OS_TV) // self.multipleTouchEnabled = true; //#endif // self.opaque = true; -// +// // [self bindDrawable]; -// +// // bInit = YES; // } -// -// return self; -//} // -//- (void) destroy { -// if(!bInit) { -// return; -// } -// bInit = NO; +// return self; //} -// + +- (void) destroy { + if(!bInit) { + return; + } + bInit = NO; +} + //- (void) dealloc{ // [self destroy]; //} -// -//- (void) setup { -// -//} -//- (void) update{ -// -//} -// -//- (void) draw{ -// -//} -// -//- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { } -//- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { } -//- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { } -//- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event { } -//#ifdef __IPHONE_9_1 -//- (void)touchesEstimatedPropertiesUpdated:(NSSet *)touches { } -//#endif -// -// -////------------------------------------------------------------------- -//- (void)updateScaleFactor { -// MGLKView *view = (MGLKView *)self; -// -// scaleFactor = MIN(scaleFactorPref, [view contentScaleFactor]); -// if(scaleFactor != self.contentScaleFactor) { -// self.contentScaleFactor = scaleFactor; -// } -//} -// -//- (void) setMSAA:(bool)on -//{ -// if(on) -// self.drawableMultisample = MGLDrawableMultisample4X; -// else -// self.drawableMultisample = MGLDrawableMultisampleNone; -//} -// -////------------------------------------------------------------------- notify. -//- (void) notifyAnimationStarted { -// if([self.delegate respondsToSelector:@selector(glViewAnimationStarted)]) { -// [self.delegate glViewAnimationStarted]; -// } -//} -// -//- (void) notifyAnimationStopped { -// if([self.delegate respondsToSelector:@selector(glViewAnimationStopped)]) { -// [self.delegate glViewAnimationStopped]; -// } -//} -// -//- (void) notifyDraw { -// if([self.delegate respondsToSelector:@selector(glViewDraw)]) { -// [self.delegate glViewDraw]; -// } -//} -// -//- (void) notifyResized { -// if([self.delegate respondsToSelector:@selector(glViewResized)]) { -// [self.delegate glViewResized]; -// } -//} -// -// -//@end + +- (void) setup { + +} +- (void) update{ + +} + +- (void) draw{ + +} + +- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { } +- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { } +- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { } +- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event { } +#ifdef __IPHONE_9_1 +- (void)touchesEstimatedPropertiesUpdated:(NSSet *)touches { } +#endif + + +//------------------------------------------------------------------- +- (void)updateScaleFactor { + MGLKView *view = (MGLKView *)self; + + scaleFactor = MIN(scaleFactorPref, [view contentScaleFactor]); + if(scaleFactor != self.contentScaleFactor) { + self.contentScaleFactor = scaleFactor; + } +} + +- (void) setMSAA:(bool)on +{ + if(on) + glLayer.drawableMultisample = MGLDrawableMultisample4X; + else + glLayer.drawableMultisample = MGLDrawableMultisampleNone; +} + +//------------------------------------------------------------------- notify. +- (void) notifyAnimationStarted { + if([self.delegate respondsToSelector:@selector(glViewAnimationStarted)]) { + [self.delegate glViewAnimationStarted]; + } +} + +- (void) notifyAnimationStopped { + if([self.delegate respondsToSelector:@selector(glViewAnimationStopped)]) { + [self.delegate glViewAnimationStopped]; + } +} + +- (void) notifyDraw { + if([self.delegate respondsToSelector:@selector(glViewDraw)]) { + [self.delegate glViewDraw]; + } +} + +- (void) notifyResized { + if([self.delegate respondsToSelector:@selector(glViewResized)]) { + [self.delegate glViewResized]; + } +} + +- (BOOL)canBecomeFirstResponder +{ + return YES; +} + + +@end From ce368f707a9a59ec80027664edbcf4c559664525 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Thu, 13 Jul 2023 01:15:16 +1000 Subject: [PATCH 27/32] iOS Fix Video Player --- addons/ofxiOS/src/video/ofxiOSVideoPlayer.mm | 77 ++++++++++--------- .../ios/iOS+OFLib.xcodeproj/project.pbxproj | 2 +- 2 files changed, 40 insertions(+), 39 deletions(-) diff --git a/addons/ofxiOS/src/video/ofxiOSVideoPlayer.mm b/addons/ofxiOS/src/video/ofxiOSVideoPlayer.mm index d4356ebd07a..31ef044ee56 100644 --- a/addons/ofxiOS/src/video/ofxiOSVideoPlayer.mm +++ b/addons/ofxiOS/src/video/ofxiOSVideoPlayer.mm @@ -7,7 +7,7 @@ #include "ofGLUtils.h" #include "ofMath.h" -using std::string; +using namespace std; CVOpenGLESTextureCacheRef _videoTextureCache = NULL; @@ -44,12 +44,12 @@ bool ofxiOSVideoPlayer::load(const of::filesystem::path & fileName) { if(!videoPlayer) { - videoPlayer = (__bridge_retained void *)[[AVFoundationVideoPlayer alloc] init]; - [(__bridge AVFoundationVideoPlayer *)videoPlayer setWillBeUpdatedExternally:YES]; + videoPlayer = [[AVFoundationVideoPlayer alloc] init]; + [(AVFoundationVideoPlayer *)videoPlayer setWillBeUpdatedExternally:YES]; } - NSString * videoPath = [NSString stringWithUTF8String:ofToDataPath(fileName).c_str()]; - [(__bridge AVFoundationVideoPlayer*)videoPlayer loadWithPath:videoPath]; + NSString * videoPath = [NSString stringWithUTF8String:ofToDataPath(name).c_str()]; + [(AVFoundationVideoPlayer*)videoPlayer loadWithPath:videoPath]; bResetPixels = true; bUpdatePixels = true; @@ -79,7 +79,8 @@ videoTexture.clear(); - ((__bridge AVFoundationVideoPlayer *)videoPlayer).delegate = nil; + ((AVFoundationVideoPlayer *)videoPlayer).delegate = nil; + [(AVFoundationVideoPlayer *)videoPlayer release]; __autoreleasing AVFoundationVideoPlayer *player = (__bridge_transfer AVFoundationVideoPlayer *)videoPlayer; if(bTextureCacheSupported == true) { @@ -130,8 +131,8 @@ return; } - [(__bridge AVFoundationVideoPlayer *)videoPlayer update]; - bFrameNew = [(__bridge AVFoundationVideoPlayer *)videoPlayer isNewFrame]; // check for new frame staright after the call to update. + [(AVFoundationVideoPlayer *)videoPlayer update]; + bFrameNew = [(AVFoundationVideoPlayer *)videoPlayer isNewFrame]; // check for new frame staright after the call to update. if(bFrameNew) { /** @@ -151,7 +152,7 @@ ofLogWarning("ofxiOSVideoPlayer::play()") << "video not loaded"; } - [(__bridge AVFoundationVideoPlayer *)videoPlayer play]; + [(AVFoundationVideoPlayer *)videoPlayer play]; } //---------------------------------------- @@ -160,8 +161,8 @@ return; } - [(__bridge AVFoundationVideoPlayer *)videoPlayer pause]; - [(__bridge AVFoundationVideoPlayer *)videoPlayer setPosition:0]; + [(AVFoundationVideoPlayer *)videoPlayer pause]; + [(AVFoundationVideoPlayer *)videoPlayer setPosition:0]; } //---------------------------------------- @@ -190,7 +191,7 @@ bResetPixels = false; } - CVImageBufferRef imageBuffer = [(__bridge AVFoundationVideoPlayer *)videoPlayer getCurrentFrame]; + CVImageBufferRef imageBuffer = [(AVFoundationVideoPlayer *)videoPlayer getCurrentFrame]; CVPixelBufferLockBaseAddress(imageBuffer, kCVPixelBufferLock_ReadOnly); @@ -283,10 +284,10 @@ int maxTextureSize = 0; glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxTextureSize); - if([(__bridge AVFoundationVideoPlayer *)videoPlayer getWidth] > maxTextureSize || - [(__bridge AVFoundationVideoPlayer *)videoPlayer getHeight] > maxTextureSize) { + if([(AVFoundationVideoPlayer *)videoPlayer getWidth] > maxTextureSize || + [(AVFoundationVideoPlayer *)videoPlayer getHeight] > maxTextureSize) { ofLogWarning("ofxiOSVideoPlayer::getTexturePtr()") - << [(__bridge AVFoundationVideoPlayer *)videoPlayer getWidth] << "x" << [(__bridge AVFoundationVideoPlayer *)videoPlayer getHeight] + << [(AVFoundationVideoPlayer *)videoPlayer getWidth] << "x" << [(AVFoundationVideoPlayer *)videoPlayer getHeight] << " video image is bigger then max supported texture size " << maxTextureSize; return NULL; } @@ -302,7 +303,7 @@ //---------------------------------------- texture cache void ofxiOSVideoPlayer::initTextureCache() { - CVImageBufferRef imageBuffer = [(__bridge AVFoundationVideoPlayer *)videoPlayer getCurrentFrame]; + CVImageBufferRef imageBuffer = [(AVFoundationVideoPlayer *)videoPlayer getCurrentFrame]; if(imageBuffer == nil) { return; } @@ -324,8 +325,8 @@ * so... we can use ofTexture::setUseExternalTextureID() to get around this. */ - int videoTextureW = [(__bridge AVFoundationVideoPlayer *)videoPlayer getWidth]; - int videoTextureH = [(__bridge AVFoundationVideoPlayer *)videoPlayer getHeight]; + int videoTextureW = [(AVFoundationVideoPlayer *)videoPlayer getWidth]; + int videoTextureH = [(AVFoundationVideoPlayer *)videoPlayer getHeight]; videoTexture.allocate(videoTextureW, videoTextureH, GL_RGBA); ofTextureData & texData = videoTexture.getTextureData(); @@ -392,7 +393,7 @@ return 0; } - return [((__bridge AVFoundationVideoPlayer *)videoPlayer) getWidth]; + return [((AVFoundationVideoPlayer *)videoPlayer) getWidth]; } //---------------------------------------- @@ -401,7 +402,7 @@ return 0; } - return [((__bridge AVFoundationVideoPlayer *)videoPlayer) getHeight]; + return [((AVFoundationVideoPlayer *)videoPlayer) getHeight]; } //---------------------------------------- @@ -410,7 +411,7 @@ return false; } - return ![((__bridge AVFoundationVideoPlayer *)videoPlayer) isPlaying]; + return ![((AVFoundationVideoPlayer *)videoPlayer) isPlaying]; } //---------------------------------------- @@ -419,7 +420,7 @@ return false; } - return [((__bridge AVFoundationVideoPlayer *)videoPlayer) isReady]; + return [((AVFoundationVideoPlayer *)videoPlayer) isReady]; } //---------------------------------------- @@ -428,7 +429,7 @@ return false; } - return [((__bridge AVFoundationVideoPlayer *)videoPlayer) isPlaying]; + return [((AVFoundationVideoPlayer *)videoPlayer) isPlaying]; } //---------------------------------------- @@ -437,7 +438,7 @@ return 0; } - return [((__bridge AVFoundationVideoPlayer *)videoPlayer) getPosition]; + return [((AVFoundationVideoPlayer *)videoPlayer) getPosition]; } //---------------------------------------- @@ -446,7 +447,7 @@ return 0; } - return [((__bridge AVFoundationVideoPlayer *)videoPlayer) getSpeed]; + return [((AVFoundationVideoPlayer *)videoPlayer) getSpeed]; } //---------------------------------------- @@ -455,7 +456,7 @@ return 0; } - return [((__bridge AVFoundationVideoPlayer *)videoPlayer) getDurationInSec]; + return [((AVFoundationVideoPlayer *)videoPlayer) getDurationInSec]; } //---------------------------------------- @@ -464,7 +465,7 @@ return false; } - return [((__bridge AVFoundationVideoPlayer *)videoPlayer) isFinished]; + return [((AVFoundationVideoPlayer *)videoPlayer) isFinished]; } //---------------------------------------- @@ -474,9 +475,9 @@ } if(bPause) { - [((__bridge AVFoundationVideoPlayer *)videoPlayer) pause]; + [((AVFoundationVideoPlayer *)videoPlayer) pause]; } else { - [((__bridge AVFoundationVideoPlayer *)videoPlayer) play]; + [((AVFoundationVideoPlayer *)videoPlayer) play]; } } @@ -486,7 +487,7 @@ return; } - [((__bridge AVFoundationVideoPlayer *)videoPlayer) setPosition:pct]; + [((AVFoundationVideoPlayer *)videoPlayer) setPosition:pct]; } //---------------------------------------- @@ -498,7 +499,7 @@ ofLogWarning("ofxiOSVideoPlayer::setVolume()") << "expected range is 0-1, limiting requested volume " << volume << " to 1.0"; volume = 1.0f; } - [((__bridge AVFoundationVideoPlayer *)videoPlayer) setVolume:volume]; + [((AVFoundationVideoPlayer *)videoPlayer) setVolume:volume]; } //---------------------------------------- @@ -512,7 +513,7 @@ (state == OF_LOOP_PALINDROME)) { bLoop = true; } - [((__bridge AVFoundationVideoPlayer *)videoPlayer) setLoop:bLoop]; + [((AVFoundationVideoPlayer *)videoPlayer) setLoop:bLoop]; } //---------------------------------------- @@ -521,7 +522,7 @@ return; } - [((__bridge AVFoundationVideoPlayer *)videoPlayer) setSpeed:speed]; + [((AVFoundationVideoPlayer *)videoPlayer) setSpeed:speed]; } //---------------------------------------- @@ -530,7 +531,7 @@ return; } - [((__bridge AVFoundationVideoPlayer *)videoPlayer) setFrame:frame]; + [((AVFoundationVideoPlayer *)videoPlayer) setFrame:frame]; } //---------------------------------------- @@ -538,7 +539,7 @@ if(videoPlayer == NULL){ return 0; } - return [((__bridge AVFoundationVideoPlayer *)videoPlayer) getCurrentFrameNum]; + return [((AVFoundationVideoPlayer *)videoPlayer) getCurrentFrameNum]; } //---------------------------------------- @@ -546,7 +547,7 @@ if(videoPlayer == NULL){ return 0; } - return [((__bridge AVFoundationVideoPlayer *)videoPlayer) getDurationInFrames]; + return [((AVFoundationVideoPlayer *)videoPlayer) getDurationInFrames]; } //---------------------------------------- @@ -555,7 +556,7 @@ return OF_LOOP_NONE; } - bool bLoop = [((__bridge AVFoundationVideoPlayer *)videoPlayer) getLoop]; + bool bLoop = [((AVFoundationVideoPlayer *)videoPlayer) getLoop]; if(bLoop) { return OF_LOOP_NORMAL; } @@ -568,7 +569,7 @@ return; } - [((__bridge AVFoundationVideoPlayer *)videoPlayer) setPosition:0]; + [((AVFoundationVideoPlayer *)videoPlayer) setPosition:0]; } //---------------------------------------- diff --git a/libs/openFrameworksCompiled/project/ios/iOS+OFLib.xcodeproj/project.pbxproj b/libs/openFrameworksCompiled/project/ios/iOS+OFLib.xcodeproj/project.pbxproj index c347655e373..ceb30e13f51 100644 --- a/libs/openFrameworksCompiled/project/ios/iOS+OFLib.xcodeproj/project.pbxproj +++ b/libs/openFrameworksCompiled/project/ios/iOS+OFLib.xcodeproj/project.pbxproj @@ -46,7 +46,7 @@ 15594FCB15C56D1E00727FF2 /* ofxiOSMapKitDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 15594FBC15C56D1E00727FF2 /* ofxiOSMapKitDelegate.h */; }; 15594FCC15C56D1E00727FF2 /* ofxiOSMapKitListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 15594FBD15C56D1E00727FF2 /* ofxiOSMapKitListener.h */; }; 1594366415CF5F420087B684 /* ofxiOSVideoGrabber.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1594366015CF5F420087B684 /* ofxiOSVideoGrabber.mm */; }; - 1594366515CF5F420087B684 /* ofxiOSVideoPlayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1594366115CF5F420087B684 /* ofxiOSVideoPlayer.mm */; }; + 1594366515CF5F420087B684 /* ofxiOSVideoPlayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1594366115CF5F420087B684 /* ofxiOSVideoPlayer.mm */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 1594366615CF5F420087B684 /* ofxiOSVideoGrabber.h in Headers */ = {isa = PBXBuildFile; fileRef = 1594366215CF5F420087B684 /* ofxiOSVideoGrabber.h */; }; 1594366715CF5F420087B684 /* ofxiOSVideoPlayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1594366315CF5F420087B684 /* ofxiOSVideoPlayer.h */; }; 2E49891A292C98000096EC56 /* ofCubeMapShaders.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E498917292C98000096EC56 /* ofCubeMapShaders.h */; }; From 29aa4cdbf574d01e791c2d28b1019dbedd1714c3 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Mon, 28 Oct 2024 22:24:44 +1100 Subject: [PATCH 28/32] iOS Extras Fixes --- addons/ofxiOS/src/utils/ofxiOSExtras.h | 2 ++ addons/ofxiOS/src/utils/ofxiOSExtras.mm | 6 ++++++ addons/ofxiOS/src/video/ofxiOSVideoPlayer.mm | 5 +++-- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/addons/ofxiOS/src/utils/ofxiOSExtras.h b/addons/ofxiOS/src/utils/ofxiOSExtras.h index 3bc292d2184..db630126ebf 100644 --- a/addons/ofxiOS/src/utils/ofxiOSExtras.h +++ b/addons/ofxiOS/src/utils/ofxiOSExtras.h @@ -104,6 +104,8 @@ ofxiOSEAGLView * ofxiOSGetGLView(); ofxiOSGLKView * ofxiOSGetGLKView(); +bool isUsingGLKView(); + // return opengl parent view UIView * ofxiOSGetGLParentView(); diff --git a/addons/ofxiOS/src/utils/ofxiOSExtras.mm b/addons/ofxiOS/src/utils/ofxiOSExtras.mm index c0033cd2c77..bdad8a8fa03 100644 --- a/addons/ofxiOS/src/utils/ofxiOSExtras.mm +++ b/addons/ofxiOS/src/utils/ofxiOSExtras.mm @@ -156,6 +156,12 @@ ofxiOSDeviceInfo ofxiOSGetDeviceInfo(){ return [ofxiOSGLKView getInstance]; } +bool isUsingGLKView() { + if([[ofxiOSGetAppDelegate() uiViewController] isKindOfClass:[ofxiOSGLKViewController class]] == YES) return true; + else + return false; +} + //-------------------------------------------------------------- UIView * ofxiOSGetGLParentView() { return ofxiOSGetGLView().superview; diff --git a/addons/ofxiOS/src/video/ofxiOSVideoPlayer.mm b/addons/ofxiOS/src/video/ofxiOSVideoPlayer.mm index 31ef044ee56..535baa23ba7 100644 --- a/addons/ofxiOS/src/video/ofxiOSVideoPlayer.mm +++ b/addons/ofxiOS/src/video/ofxiOSVideoPlayer.mm @@ -3,6 +3,7 @@ #if defined(TARGET_OF_IOS) #include "ofxiOSExtras.h" #include "ofxiOSEAGLView.h" +#import "ofxiOSGLKView.h" #import "AVFoundationVideoPlayer.h" #include "ofGLUtils.h" #include "ofMath.h" @@ -22,7 +23,7 @@ bUpdatePixels = false; bUpdateTexture = false; bTextureCacheSupported = (&CVOpenGLESTextureCacheCreate != NULL); - bTextureCacheEnabled = true; + bTextureCacheEnabled = false; } //---------------------------------------- @@ -59,7 +60,7 @@ if(_videoTextureCache == NULL) { CVReturn err = CVOpenGLESTextureCacheCreate(kCFAllocatorDefault, NULL, - ofxiOSGetGLView().context, + isUsingGLKView() ? [[ofxiOSGLKView getInstance] context] : ofxiOSGetGLView().context, NULL, &_videoTextureCache); if(err) { From 9f583a2a8c3fad1d0cd0ecd11911e10beb569908 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Tue, 29 Oct 2024 15:50:21 +1100 Subject: [PATCH 29/32] ofxiOSVideoPlayer Fix --- addons/ofxiOS/src/video/ofxiOSVideoPlayer.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/ofxiOS/src/video/ofxiOSVideoPlayer.mm b/addons/ofxiOS/src/video/ofxiOSVideoPlayer.mm index 535baa23ba7..7c840493bdd 100644 --- a/addons/ofxiOS/src/video/ofxiOSVideoPlayer.mm +++ b/addons/ofxiOS/src/video/ofxiOSVideoPlayer.mm @@ -49,7 +49,7 @@ [(AVFoundationVideoPlayer *)videoPlayer setWillBeUpdatedExternally:YES]; } - NSString * videoPath = [NSString stringWithUTF8String:ofToDataPath(name).c_str()]; + NSString * videoPath = [NSString stringWithUTF8String:ofToDataPath(fileName).c_str()]; [(AVFoundationVideoPlayer*)videoPlayer loadWithPath:videoPath]; bResetPixels = true; From a70718bc066c3efb3a4bf7f6bb8bd359c8aa89d3 Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Fri, 15 Nov 2024 04:35:32 +1100 Subject: [PATCH 30/32] Merge Fixes --- addons/ofxiOS/src/core/ofxiOSAppDelegate.mm | 6 ------ addons/ofxiOS/src/utils/ofxiOSExtras.mm | 3 --- 2 files changed, 9 deletions(-) diff --git a/addons/ofxiOS/src/core/ofxiOSAppDelegate.mm b/addons/ofxiOS/src/core/ofxiOSAppDelegate.mm index c432eb6dc28..6bdd9564a1a 100644 --- a/addons/ofxiOS/src/core/ofxiOSAppDelegate.mm +++ b/addons/ofxiOS/src/core/ofxiOSAppDelegate.mm @@ -29,21 +29,15 @@ * * ***********************************************************************/ -<<<<<<< HEAD #include "ofxiOSConstants.h" #if defined(OF_UI_KIT) && TARGET_OS_IOS || (TARGET_OS_IPHONE && !TARGET_OS_TV) #import "ofxiOSAppDelegate.h" #import "ofxiOSViewController.h" #import "ofxiOSGLKViewController.h" -======= -#import "ofxiOSAppDelegate.h" - -#if TARGET_OS_IOS || (TARGET_OS_IPHONE && !TARGET_OS_TV) #import "ofxiOSViewController.h" #import "ofxiOSGLKViewController.h" #import "ofxiOSMLKViewController.h" ->>>>>>> 92bb06eeccee8bc5a09198f3706d62c5e4f4272c #import "ofxiOSExternalDisplay.h" #include "ofxiOSExtras.h" #include "ofxiOSAlerts.h" diff --git a/addons/ofxiOS/src/utils/ofxiOSExtras.mm b/addons/ofxiOS/src/utils/ofxiOSExtras.mm index 17fcd88eecf..c7ab3c44cd9 100644 --- a/addons/ofxiOS/src/utils/ofxiOSExtras.mm +++ b/addons/ofxiOS/src/utils/ofxiOSExtras.mm @@ -35,10 +35,7 @@ #include "ofPixels.h" #include #if TARGET_OS_IOS || (TARGET_OS_IPHONE && !TARGET_OS_TV) -<<<<<<< HEAD -======= ->>>>>>> 92bb06eeccee8bc5a09198f3706d62c5e4f4272c #import "ofxiOSAppDelegate.h" #import "ofxiOSViewController.h" #import "ofxiOSGLKViewController.h" From e604e752cc0ab4df08cb5568274161753e90843b Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Wed, 8 Jan 2025 15:09:38 +1100 Subject: [PATCH 31/32] Metal ANGLE --- addons/ofxiOS/src/app/ofAppiOSWindow.mm | 12 +- addons/ofxiOS/src/core/ofxiOSAppDelegate.mm | 5 +- addons/ofxiOS/src/core/ofxiOSMLKView.h | 2 + .../ofxiOS/src/core/ofxiOSMLKViewController.h | 2 + addons/ofxiOS/src/{ml => metal}/EAMLKView.h | 5 +- .../{ml/EAMLKView.m => metal/EAMLKView.mm} | 3 +- .../src/metal/MGLKit/MGLContext+Private.h | 24 + addons/ofxiOS/src/metal/MGLKit/MGLContext.h | 54 + addons/ofxiOS/src/metal/MGLKit/MGLContext.mm | 316 +++++ addons/ofxiOS/src/metal/MGLKit/MGLDisplay.h | 25 + addons/ofxiOS/src/metal/MGLKit/MGLDisplay.mm | 91 ++ .../src/metal/MGLKit/MGLKView+Private.h | 21 + addons/ofxiOS/src/metal/MGLKit/MGLKView.h | 68 + addons/ofxiOS/src/metal/MGLKit/MGLKView.mm | 299 +++++ .../metal/MGLKit/MGLKViewController+Mac.mm | 201 +++ .../metal/MGLKit/MGLKViewController+Private.h | 43 + .../metal/MGLKit/MGLKViewController+iOS.mm | 90 ++ .../src/metal/MGLKit/MGLKViewController.h | 42 + .../src/metal/MGLKit/MGLKViewController.mm | 241 ++++ addons/ofxiOS/src/metal/MGLKit/MGLKit.h | 14 + .../ofxiOS/src/metal/MGLKit/MGLKitPlatform.h | 33 + .../src/metal/MGLKit/MGLLayer+Private.h | 50 + addons/ofxiOS/src/metal/MGLKit/MGLLayer.h | 73 ++ addons/ofxiOS/src/metal/MGLKit/MGLLayer.mm | 1133 +++++++++++++++++ libs/openFrameworksCompiled/lib/ios/.gitkeep | 0 .../project/ios/CoreOF.xcconfig | 11 +- .../ios/iOS+OFLib.xcodeproj/project.pbxproj | 121 ++ .../iPhone+OF Static Library.xcscheme | 4 +- .../emptyExample.xcodeproj/project.pbxproj | 1117 +++++++--------- 29 files changed, 3444 insertions(+), 656 deletions(-) rename addons/ofxiOS/src/{ml => metal}/EAMLKView.h (98%) rename addons/ofxiOS/src/{ml/EAMLKView.m => metal/EAMLKView.mm} (99%) create mode 100644 addons/ofxiOS/src/metal/MGLKit/MGLContext+Private.h create mode 100644 addons/ofxiOS/src/metal/MGLKit/MGLContext.h create mode 100644 addons/ofxiOS/src/metal/MGLKit/MGLContext.mm create mode 100644 addons/ofxiOS/src/metal/MGLKit/MGLDisplay.h create mode 100644 addons/ofxiOS/src/metal/MGLKit/MGLDisplay.mm create mode 100644 addons/ofxiOS/src/metal/MGLKit/MGLKView+Private.h create mode 100644 addons/ofxiOS/src/metal/MGLKit/MGLKView.h create mode 100644 addons/ofxiOS/src/metal/MGLKit/MGLKView.mm create mode 100644 addons/ofxiOS/src/metal/MGLKit/MGLKViewController+Mac.mm create mode 100644 addons/ofxiOS/src/metal/MGLKit/MGLKViewController+Private.h create mode 100644 addons/ofxiOS/src/metal/MGLKit/MGLKViewController+iOS.mm create mode 100644 addons/ofxiOS/src/metal/MGLKit/MGLKViewController.h create mode 100644 addons/ofxiOS/src/metal/MGLKit/MGLKViewController.mm create mode 100644 addons/ofxiOS/src/metal/MGLKit/MGLKit.h create mode 100644 addons/ofxiOS/src/metal/MGLKit/MGLKitPlatform.h create mode 100644 addons/ofxiOS/src/metal/MGLKit/MGLLayer+Private.h create mode 100644 addons/ofxiOS/src/metal/MGLKit/MGLLayer.h create mode 100644 addons/ofxiOS/src/metal/MGLKit/MGLLayer.mm delete mode 100644 libs/openFrameworksCompiled/lib/ios/.gitkeep diff --git a/addons/ofxiOS/src/app/ofAppiOSWindow.mm b/addons/ofxiOS/src/app/ofAppiOSWindow.mm index c6d8d6f9353..127c29e7d7e 100644 --- a/addons/ofxiOS/src/app/ofAppiOSWindow.mm +++ b/addons/ofxiOS/src/app/ofAppiOSWindow.mm @@ -44,7 +44,7 @@ const std::string appDelegateName = "ofxtvOSAppDelegate"; #endif #include "ofxiOSGLKView.h" -#include "ofxiOSMLKView.h" +#include "MGLKView.h" #include "ofxiOSEAGLView.h" //----------------------------------------------------------------------------------- instance. @@ -170,7 +170,7 @@ glm::vec2 ofAppiOSWindow::getWindowPosition() { if(settings.windowControllerType == METAL_KIT) { - return *[[ofxiOSMLKView getInstance] getWindowPosition]; + return *[[MGLKView getInstance] getWindowPosition]; }else if(settings.windowControllerType == GL_KIT) return *[[ofxiOSGLKView getInstance] getWindowPosition]; else @@ -179,7 +179,7 @@ glm::vec2 ofAppiOSWindow::getWindowSize() { if(settings.windowControllerType == METAL_KIT) { - return *[[ofxiOSMLKView getInstance] getWindowSize]; + return *[[MGLKView getInstance] getWindowSize]; }else if(settings.windowControllerType == GL_KIT) return *[[ofxiOSGLKView getInstance] getWindowSize]; else @@ -188,7 +188,7 @@ glm::vec2 ofAppiOSWindow::getScreenSize() { if(settings.windowControllerType == METAL_KIT) { - return *[[ofxiOSMLKView getInstance] getScreenSize]; + return *[[MGLKView getInstance] getScreenSize]; } else if(settings.windowControllerType == GL_KIT) return *[[ofxiOSGLKView getInstance] getScreenSize]; else @@ -440,8 +440,8 @@ settings.enableMultiTouch = isOn; #if TARGET_OS_IOS || (TARGET_OS_IPHONE && !TARGET_OS_TV) if(settings.windowControllerType == METAL_KIT) { - if([ofxiOSMLKView getInstance]) { - [[ofxiOSGLKView getInstance] setMultipleTouchEnabled:isOn]; + if([MGLKView getInstance]) { + [[MGLKView getInstance] setMultipleTouchEnabled:isOn]; } } else if(settings.windowControllerType == GL_KIT) { if([ofxiOSGLKView getInstance]) { diff --git a/addons/ofxiOS/src/core/ofxiOSAppDelegate.mm b/addons/ofxiOS/src/core/ofxiOSAppDelegate.mm index 6bdd9564a1a..f958a1b04b4 100644 --- a/addons/ofxiOS/src/core/ofxiOSAppDelegate.mm +++ b/addons/ofxiOS/src/core/ofxiOSAppDelegate.mm @@ -264,14 +264,13 @@ - (void)receivedRotate:(NSNotification*)notification { if([controller isReadyToRotate]) { ofxiOSAlerts.deviceOrientationChanged( deviceOrientation ); } -<<<<<<< HEAD -======= +#if defined(OF_METAL) } else if([self.uiViewController isKindOfClass:ofxiOSMLKViewController.class]) { ofxiOSMLKViewController *controller = (ofxiOSMLKViewController *)self.uiViewController; if([controller isReadyToRotate]) { ofxiOSAlerts.deviceOrientationChanged( deviceOrientation ); } ->>>>>>> 92bb06eeccee8bc5a09198f3706d62c5e4f4272c +#endif /* OF_METAL_KIT */ } } }else { diff --git a/addons/ofxiOS/src/core/ofxiOSMLKView.h b/addons/ofxiOS/src/core/ofxiOSMLKView.h index 27aceb89e1b..b4d11f65d21 100644 --- a/addons/ofxiOS/src/core/ofxiOSMLKView.h +++ b/addons/ofxiOS/src/core/ofxiOSMLKView.h @@ -9,6 +9,7 @@ #pragma once #include #import +#if defined(OF_METAL) #import "EAMLKView.h" #import #import @@ -67,3 +68,4 @@ class ofAppiOSWindow; @end +#endif diff --git a/addons/ofxiOS/src/core/ofxiOSMLKViewController.h b/addons/ofxiOS/src/core/ofxiOSMLKViewController.h index ee2e735d693..2a08fbeea13 100644 --- a/addons/ofxiOS/src/core/ofxiOSMLKViewController.h +++ b/addons/ofxiOS/src/core/ofxiOSMLKViewController.h @@ -16,6 +16,7 @@ #import #import +#if defined(OF_METAL) #import #import @@ -49,5 +50,6 @@ class ofxiOSApp; #endif +#endif /* OF_METAL_KIT */ #endif /* ofxiOSMLKViewController_h */ diff --git a/addons/ofxiOS/src/ml/EAMLKView.h b/addons/ofxiOS/src/metal/EAMLKView.h similarity index 98% rename from addons/ofxiOS/src/ml/EAMLKView.h rename to addons/ofxiOS/src/metal/EAMLKView.h index 29a4f508d4f..fb9a8197bbf 100644 --- a/addons/ofxiOS/src/ml/EAMLKView.h +++ b/addons/ofxiOS/src/metal/EAMLKView.h @@ -8,10 +8,11 @@ // #pragma once // - +#if defined(OF_METAL) #import #import #import +#endif #import ////#import @@ -77,3 +78,5 @@ - (void)notifyResized; @end + +//#endif diff --git a/addons/ofxiOS/src/ml/EAMLKView.m b/addons/ofxiOS/src/metal/EAMLKView.mm similarity index 99% rename from addons/ofxiOS/src/ml/EAMLKView.m rename to addons/ofxiOS/src/metal/EAMLKView.mm index 4c0140f565e..bfeaae2e168 100644 --- a/addons/ofxiOS/src/ml/EAMLKView.m +++ b/addons/ofxiOS/src/metal/EAMLKView.mm @@ -8,7 +8,7 @@ #include #import "EAMLKView.h" -#import +#import #import "ES2Renderer.h" @@ -133,6 +133,7 @@ - (BOOL)initGL // Setup the view port in Pixels glViewport(0, 0, backingWidth, backingHeight); + return true; } diff --git a/addons/ofxiOS/src/metal/MGLKit/MGLContext+Private.h b/addons/ofxiOS/src/metal/MGLKit/MGLContext+Private.h new file mode 100644 index 00000000000..6128090b9c0 --- /dev/null +++ b/addons/ofxiOS/src/metal/MGLKit/MGLContext+Private.h @@ -0,0 +1,24 @@ +// +// Copyright 2019 Le Hoang Quyen. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// + +#ifndef MGLContext_Private_h +#define MGLContext_Private_h + +#import "MGLContext.h" +#import "MGLDisplay.h" + +#include + +@interface MGLContext () { + MGLRenderingAPI _renderingApi; +} + +@property(nonatomic, readonly) MGLDisplay *display; +@property(nonatomic, readonly) EGLContext eglContext; + +@end + +#endif /* MGLContext_Private_h */ diff --git a/addons/ofxiOS/src/metal/MGLKit/MGLContext.h b/addons/ofxiOS/src/metal/MGLKit/MGLContext.h new file mode 100644 index 00000000000..6bd8b5dfa5c --- /dev/null +++ b/addons/ofxiOS/src/metal/MGLKit/MGLContext.h @@ -0,0 +1,54 @@ +// +// Copyright 2019 Le Hoang Quyen. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// + +#import "MGLLayer.h" + +#include "EGL/egl.h" + +NS_ASSUME_NONNULL_BEGIN + +typedef enum MGLRenderingAPI : int +{ + kMGLRenderingAPIOpenGLES1 = 1, + kMGLRenderingAPIOpenGLES2 = 2, + kMGLRenderingAPIOpenGLES3 = 3, +} MGLRenderingAPI; + +@interface MGLSharegroup : NSObject +@end + +@interface MGLContext : NSObject + +- (id)initWithAPI:(MGLRenderingAPI)api; + +// NOTE: If you use sharegroup to share resources between contexts, make sure to call glFlush() +// when you finish the works of one context on a thread to make the changes visible to other +// contexts. +- (id)initWithAPI:(MGLRenderingAPI)api sharegroup:(MGLSharegroup *_Nullable)sharegroup; + +@property(nonatomic, readonly) MGLRenderingAPI API; + +@property(readonly) MGLSharegroup *sharegroup; + +@property(nonatomic, readonly) EGLDisplay eglDisplay; + +// Present the content of layer on screen as soon as possible. +- (BOOL)present:(MGLLayer *)layer; + ++ (MGLContext *)currentContext; ++ (MGLLayer *)currentLayer; + +// Set current context without layer. NOTE: this function is only useful if you want to +// create OpenGL resources such as textures/buffers before creating the presentation layer. +// Before drawing to a layer, use [MGLContext setCurrentContext: forLayer:] function instead. ++ (BOOL)setCurrentContext:(MGLContext *_Nullable)context; + +// Set current context to render to the given layer. ++ (BOOL)setCurrentContext:(MGLContext *_Nullable)context forLayer:(MGLLayer *_Nullable)layer; + +@end + +NS_ASSUME_NONNULL_END diff --git a/addons/ofxiOS/src/metal/MGLKit/MGLContext.mm b/addons/ofxiOS/src/metal/MGLKit/MGLContext.mm new file mode 100644 index 00000000000..01e37da2b03 --- /dev/null +++ b/addons/ofxiOS/src/metal/MGLKit/MGLContext.mm @@ -0,0 +1,316 @@ +// +// MGLContext.m +// OpenGLES +// +// Created by Le Quyen on 16/10/19. +// Copyright © 2019 Google. All rights reserved. +// + +#import "MGLContext.h" +#import "MGLContext+Private.h" + +#include +#include + +#include +#include +#include +#include +#include +#import "MGLLayer+Private.h" + +namespace +{ +struct ThreadLocalInfo +{ + __weak MGLContext *currentContext = nil; + __weak MGLLayer *currentLayer = nil; +}; + +#if TARGET_OS_SIMULATOR +pthread_key_t gThreadSpecificKey; +void ThreadTLSDestructor(void *data) +{ + auto tlsData = reinterpret_cast(data); + delete tlsData; +} + +#endif + +ThreadLocalInfo &CurrentTLS() +{ +#if TARGET_OS_SIMULATOR + // There are some issuess with C++11 TLS could not be compiled on iOS + // simulator, so we have to fallback to use pthread TLS. + static pthread_once_t sKeyOnce = PTHREAD_ONCE_INIT; + pthread_once(&sKeyOnce, [] { pthread_key_create(&gThreadSpecificKey, ThreadTLSDestructor); }); + + auto tlsData = reinterpret_cast(pthread_getspecific(gThreadSpecificKey)); + if (!tlsData) + { + tlsData = new ThreadLocalInfo(); + pthread_setspecific(gThreadSpecificKey, tlsData); + } + return *tlsData; +#else // TARGET_OS_SIMULATOR + static thread_local ThreadLocalInfo tls; + return tls; +#endif +} + +void Throw(NSString *msg) +{ + [NSException raise:@"MGLSurfaceException" format:@"%@", msg]; +} + +EGLContext CreateEGLContext(EGLDisplay display, MGLRenderingAPI api, EGLContext sharedContext) +{ + // Init config + std::vector surfaceAttribs = { + EGL_RED_SIZE, EGL_DONT_CARE, EGL_GREEN_SIZE, EGL_DONT_CARE, + EGL_BLUE_SIZE, EGL_DONT_CARE, EGL_ALPHA_SIZE, EGL_DONT_CARE, + EGL_DEPTH_SIZE, EGL_DONT_CARE, EGL_STENCIL_SIZE, EGL_DONT_CARE, + EGL_SAMPLE_BUFFERS, EGL_DONT_CARE, EGL_SAMPLES, EGL_DONT_CARE, + }; + surfaceAttribs.push_back(EGL_NONE); + EGLConfig config; + EGLint numConfigs; + if (!eglChooseConfig(display, surfaceAttribs.data(), &config, 1, &numConfigs) || numConfigs < 1) + { + Throw(@"Failed to call eglChooseConfig()"); + } + + // Init context + int ctxMajorVersion = 2; + int ctxMinorVersion = 0; + switch (api) + { + case kMGLRenderingAPIOpenGLES1: + ctxMajorVersion = 1; + ctxMinorVersion = 0; + break; + case kMGLRenderingAPIOpenGLES2: + ctxMajorVersion = 2; + ctxMinorVersion = 0; + break; + case kMGLRenderingAPIOpenGLES3: + ctxMajorVersion = 3; + ctxMinorVersion = 0; + break; + default: + UNREACHABLE(); + } + EGLint ctxAttribs[] = {EGL_CONTEXT_MAJOR_VERSION, ctxMajorVersion, EGL_CONTEXT_MINOR_VERSION, + ctxMinorVersion, EGL_NONE}; + + EGLContext eglContext = eglCreateContext(display, config, sharedContext, ctxAttribs); + if (eglContext == EGL_NO_CONTEXT) + { + Throw(@"Failed to call eglCreateContext()"); + } + + return eglContext; +} +} + +// MGLSharegroup implementation +@interface MGLSharegroup () { + __weak MGLContext *_firstContext; + EGLDisplay _sharedEGLDisplay; + EGLContext _sharedEGLContext; +} + +// This shared context is only created when the shared group has more +// than one context. +- (EGLContext)sharedEGLContext; +- (void)addContext:(MGLContext *)context; + +@end + +@implementation MGLSharegroup + +- (id)init +{ + if (self = [super init]) + { + _sharedEGLContext = EGL_NO_CONTEXT; + } + return self; +} + +- (void)dealloc +{ + if (_sharedEGLContext != EGL_NO_CONTEXT) + { + eglDestroyContext(_sharedEGLDisplay, _sharedEGLContext); + _sharedEGLContext = EGL_NO_CONTEXT; + } +} + +- (EGLContext)sharedEGLContext +{ + @synchronized(self) + { + return _sharedEGLContext; + } +} + +- (void)addContext:(MGLContext *)context +{ + @synchronized(self) + { + if (!_firstContext) + { + _firstContext = context; + } + else if (_sharedEGLContext == EGL_NO_CONTEXT) + { + // If we have more than one context in the shared group, create + // a "master" context to be shared by all contexts in the group. + _sharedEGLDisplay = _firstContext.display.eglDisplay; + _sharedEGLContext = + CreateEGLContext(_sharedEGLDisplay, _firstContext.API, _firstContext.eglContext); + } + } +} + +@end + +// MGLContext implementation + +@implementation MGLContext + +- (id)initWithAPI:(MGLRenderingAPI)api +{ + return [self initWithAPI:api sharegroup:nil]; +} + +- (id)initWithAPI:(MGLRenderingAPI)api sharegroup:(MGLSharegroup *)sharegroup +{ + if (self = [super init]) + { + _renderingApi = api; + _display = [MGLDisplay defaultDisplay]; + if (sharegroup) + { + _sharegroup = sharegroup; + } + else + { + _sharegroup = [MGLSharegroup new]; + } + + [_sharegroup addContext:self]; + + [self initContext]; + } + return self; +} + +- (MGLRenderingAPI)API +{ + return _renderingApi; +} + +- (EGLDisplay)eglDisplay +{ + return _display.eglDisplay; +} + +- (void)dealloc +{ + [self releaseContext]; + + _display = nil; +} + +- (void)releaseContext +{ + if (eglGetCurrentContext() == _eglContext) + { + eglMakeCurrent(_display.eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + } + + if (_eglContext != EGL_NO_CONTEXT) + { + eglDestroyContext(_display.eglDisplay, _eglContext); + _eglContext = EGL_NO_CONTEXT; + } +} + +- (void)initContext +{ + _eglContext = + CreateEGLContext(_display.eglDisplay, _renderingApi, _sharegroup.sharedEGLContext); +} + +- (BOOL)present:(MGLLayer *)layer +{ + return [layer present]; +} + ++ (MGLContext *)currentContext +{ + return CurrentTLS().currentContext; +} + ++ (MGLLayer *)currentLayer +{ + return CurrentTLS().currentLayer; +} + ++ (BOOL)setCurrentContext:(MGLContext *)context +{ + ThreadLocalInfo &tlsData = CurrentTLS(); + if (context) + { + return [context setCurrentContextForLayer:tlsData.currentLayer]; + } + + // No context + tlsData.currentContext = nil; + tlsData.currentLayer = nil; + + return eglMakeCurrent([MGLDisplay defaultDisplay].eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, + EGL_NO_CONTEXT); +} + ++ (BOOL)setCurrentContext:(MGLContext *)context forLayer:(MGLLayer *)layer +{ + if (context) + { + return [context setCurrentContextForLayer:layer]; + } + return [self setCurrentContext:nil]; +} + +- (BOOL)setCurrentContextForLayer:(MGLLayer *_Nullable)layer +{ + if (!layer) + { + if (eglGetCurrentContext() != _eglContext || + eglGetCurrentSurface(EGL_READ) != EGL_NO_SURFACE || + eglGetCurrentSurface(EGL_DRAW) != EGL_NO_SURFACE) + { + if (!eglMakeCurrent(_display.eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, _eglContext)) + { + return NO; + } + } + } + else + { + if (![layer setCurrentContext:self]) + { + return NO; + } + } + + ThreadLocalInfo &tlsData = CurrentTLS(); + tlsData.currentContext = self; + tlsData.currentLayer = layer; + + return YES; +} + +@end diff --git a/addons/ofxiOS/src/metal/MGLKit/MGLDisplay.h b/addons/ofxiOS/src/metal/MGLKit/MGLDisplay.h new file mode 100644 index 00000000000..b9109d8e24e --- /dev/null +++ b/addons/ofxiOS/src/metal/MGLKit/MGLDisplay.h @@ -0,0 +1,25 @@ +// +// Copyright 2019 Le Hoang Quyen. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// + +#ifndef MGLKitCommon_h +#define MGLKitCommon_h + +#import + +#include +#include +#include +#include + +@interface MGLDisplay : NSObject + +@property(nonatomic, readonly) EGLDisplay eglDisplay; + ++ (MGLDisplay *)defaultDisplay; + +@end + +#endif /* MGLKitCommon_h */ diff --git a/addons/ofxiOS/src/metal/MGLKit/MGLDisplay.mm b/addons/ofxiOS/src/metal/MGLKit/MGLDisplay.mm new file mode 100644 index 00000000000..3417eebc255 --- /dev/null +++ b/addons/ofxiOS/src/metal/MGLKit/MGLDisplay.mm @@ -0,0 +1,91 @@ +// +// Copyright 2019 Le Hoang Quyen. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// + +#import "MGLDisplay.h" + +namespace +{ +void Throw(NSString *msg) +{ + [NSException raise:@"MGLSurfaceException" format:@"%@", msg]; +} +} + +// EGLDisplayHolder +@interface EGLDisplayHolder : NSObject +@property(nonatomic) EGLDisplay eglDisplay; +@end + +@implementation EGLDisplayHolder + +- (id)init +{ + if (self = [super init]) + { + // Init display + EGLAttrib displayAttribs[] = {EGL_NONE}; + _eglDisplay = eglGetPlatformDisplay(EGL_PLATFORM_ANGLE_ANGLE, nullptr, displayAttribs); + if (_eglDisplay == EGL_NO_DISPLAY) + { + Throw(@"Failed To call eglGetPlatformDisplay()"); + } + if (!eglInitialize(_eglDisplay, NULL, NULL)) + { + Throw(@"Failed To call eglInitialize()"); + } + } + + return self; +} + +- (void)dealloc +{ + if (_eglDisplay != EGL_NO_DISPLAY) + { + eglTerminate(_eglDisplay); + _eglDisplay = EGL_NO_DISPLAY; + } +} + +@end + +static EGLDisplayHolder *gGlobalDisplayHolder; +static MGLDisplay *gDefaultDisplay; + +// MGLDisplay implementation +@interface MGLDisplay () { + EGLDisplayHolder *_eglDisplayHolder; +} + +@end + +@implementation MGLDisplay + ++ (MGLDisplay *)defaultDisplay +{ + if (!gDefaultDisplay) + { + gDefaultDisplay = [[MGLDisplay alloc] init]; + } + return gDefaultDisplay; +} + +- (id)init +{ + if (self = [super init]) + { + if (!gGlobalDisplayHolder) + { + gGlobalDisplayHolder = [[EGLDisplayHolder alloc] init]; + } + _eglDisplayHolder = gGlobalDisplayHolder; + _eglDisplay = _eglDisplayHolder.eglDisplay; + } + + return self; +} + +@end diff --git a/addons/ofxiOS/src/metal/MGLKit/MGLKView+Private.h b/addons/ofxiOS/src/metal/MGLKit/MGLKView+Private.h new file mode 100644 index 00000000000..217b25a1d2f --- /dev/null +++ b/addons/ofxiOS/src/metal/MGLKit/MGLKView+Private.h @@ -0,0 +1,21 @@ +// +// Copyright 2019 Le Hoang Quyen. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// + +#ifndef MGLKView_Private_h +#define MGLKView_Private_h + +#import "MGLKView.h" + +@class MGLKViewController; + +@interface MGLKView () + +@property(atomic) BOOL drawing; +@property(nonatomic, weak) MGLKViewController *controller; + +@end + +#endif /* MGLKView_Private_h */ diff --git a/addons/ofxiOS/src/metal/MGLKit/MGLKView.h b/addons/ofxiOS/src/metal/MGLKit/MGLKView.h new file mode 100644 index 00000000000..807de0f4d00 --- /dev/null +++ b/addons/ofxiOS/src/metal/MGLKit/MGLKView.h @@ -0,0 +1,68 @@ +// +// Copyright 2019 Le Hoang Quyen. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// + +#ifndef MGLKView_h +#define MGLKView_h + +#import "MGLContext.h" + +@class MGLKView; + +@protocol MGLKViewDelegate + +// Implement this method to draw to the view using current OpenGL +// context associated with the view. +- (void)mglkView:(MGLKView *)view drawInRect:(CGRect)rect; + +@end + +// NOTE: do not subclass this class, use delegate if needed to override +// the drawing method. +@interface MGLKView : MGLKNativeView + +@property(nonatomic) MGLContext *context; +@property(nonatomic, assign) IBOutlet id delegate; + +// Default value is NO. Setting to YES will keep the framebuffer data after presenting. +// Doing so will reduce performance and increase memory usage. +@property(nonatomic) BOOL retainedBacking; +@property(nonatomic) MGLDrawableColorFormat drawableColorFormat; // Default is RGBA8888 +@property(nonatomic) MGLDrawableDepthFormat drawableDepthFormat; // Default is DepthNone +@property(nonatomic) MGLDrawableStencilFormat drawableStencilFormat; // Default is StencilNone +@property(nonatomic) + MGLDrawableMultisample drawableMultisample; // Default is MGLDrawableMultisampleNone + +@property(nonatomic, weak, readonly) MGLLayer *glLayer; + +// Return the size of the OpenGL default framebuffer. +@property(readonly) CGSize drawableSize; +@property(nonatomic, readonly) NSInteger drawableWidth; +@property(nonatomic, readonly) NSInteger drawableHeight; + +// OpenGL id of the underlying default framebuffer object. +// Might not necessary be zero. +@property(readonly) uint32_t defaultOpenGLFrameBufferID; + +#if TARGET_OS_IOS || TARGET_OS_TV +// Enable setNeedsDisplay method. +@property(nonatomic) BOOL enableSetNeedsDisplay; +@property(readonly, strong) UIImage *snapshot; +#endif + +- (id)initWithFrame:(CGRect)frame context:(MGLContext *)context; + +// Redraw the view's contents immediately. +- (void)display; + +// Binds the underlying default framebuffer object to OpenGL ES. +// Use this after drawing to offscreen FBO. +- (void)bindDrawable; + +@end + +//#define MGLKView ofxiOSMGLKView + +#endif /* MLKView_h */ diff --git a/addons/ofxiOS/src/metal/MGLKit/MGLKView.mm b/addons/ofxiOS/src/metal/MGLKit/MGLKView.mm new file mode 100644 index 00000000000..e6bfd6036df --- /dev/null +++ b/addons/ofxiOS/src/metal/MGLKit/MGLKView.mm @@ -0,0 +1,299 @@ +// +// Copyright 2019 Le Hoang Quyen. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// + +#import "MGLKView+Private.h" +#import "MGLKViewController+Private.h" + +#include + +namespace +{ +void Throw(NSString *msg) +{ + [NSException raise:@"MGLSurfaceException" format:@"%@", msg]; +} +} + +@implementation MGLKView + +- (id)initWithCoder:(NSCoder *)coder +{ + if (self = [super initWithCoder:coder]) + { +#if TARGET_OS_OSX + self.wantsLayer = YES; + self.autoresizingMask = kCALayerWidthSizable | kCALayerHeightSizable; +#else + self.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; +#if TARGET_OS_IOS || TARGET_OS_TV + self.enableSetNeedsDisplay = YES; +#endif +#endif + } + return self; +} + +- (id)initWithFrame:(CGRect)frame +{ + if (self = [super initWithFrame:frame]) + { +#if TARGET_OS_OSX + self.wantsLayer = YES; + self.autoresizingMask = kCALayerWidthSizable | kCALayerHeightSizable; +#else + self.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; +#if TARGET_OS_IOS || TARGET_OS_TV + self.enableSetNeedsDisplay = YES; +#endif +#endif + } + return self; +} + +- (id)initWithFrame:(CGRect)frame context:(MGLContext *)context +{ + if (self = [self initWithFrame:frame]) + { + [self setContext:context]; + } + return self; +} + +- (void)dealloc +{ + _context = nil; +} + +#if TARGET_OS_OSX +- (CALayer *)makeBackingLayer +{ + return [MGLLayer layer]; +} +#else ++ (Class)layerClass +{ + return MGLLayer.class; +} +#endif + +- (MGLLayer *)glLayer +{ + return static_cast(self.layer); +} + +- (void)setContext:(MGLContext *)context +{ + if (_drawing) + { + Throw(@"Changing GL context when drawing is not allowed"); + } + + _context = context; +} + +#if TARGET_OS_IOS || TARGET_OS_TV +- (void)setNeedsDisplay +{ + if (_enableSetNeedsDisplay) + { + [super setNeedsDisplay]; + } +} + +- (void)setNeedsDisplayInRect:(CGRect)invalidRect +{ + if (_enableSetNeedsDisplay) + { + [super setNeedsDisplayInRect:invalidRect]; + } +} +#endif // TARGET_OS_IOS || TARGET_OS_TV + +- (void)setRetainedBacking:(BOOL)retainedBacking +{ + self.glLayer.retainedBacking = _retainedBacking = retainedBacking; +} + +- (void)setDrawableColorFormat:(MGLDrawableColorFormat)drawableColorFormat +{ + self.glLayer.drawableColorFormat = _drawableColorFormat = drawableColorFormat; +} + +- (void)setDrawableDepthFormat:(MGLDrawableDepthFormat)drawableDepthFormat +{ + self.glLayer.drawableDepthFormat = _drawableDepthFormat = drawableDepthFormat; +} + +- (void)setDrawableStencilFormat:(MGLDrawableStencilFormat)drawableStencilFormat +{ + self.glLayer.drawableStencilFormat = _drawableStencilFormat = drawableStencilFormat; +} + +- (void)setDrawableMultisample:(MGLDrawableMultisample)drawableMultisample +{ + self.glLayer.drawableMultisample = _drawableMultisample = drawableMultisample; +} + +- (void)display +{ + [self displayAndCapture:nullptr]; +} + +- (void)bindDrawable +{ + [self.glLayer bindDefaultFrameBuffer]; +} + +- (CGSize)drawableSize +{ + if (!self.layer) + { + CGSize zero = {0}; + return zero; + } + return self.glLayer.drawableSize; +} + +- (NSInteger)drawableWidth +{ + return self.drawableSize.width; +} + +- (NSInteger)drawableHeight +{ + return self.drawableSize.height; +} + +- (uint32_t)defaultOpenGLFrameBufferID +{ + return self.glLayer.defaultOpenGLFrameBufferID; +} + +#if TARGET_OS_OSX +- (void)viewDidMoveToWindow +{ + [super viewDidMoveToWindow]; +#else +- (void)didMoveToWindow +{ + [super didMoveToWindow]; +#endif + + // notify view controller + if (_controller) + { + [_controller viewDidMoveToWindow]; + } +} + +- (void)drawRect:(CGRect)rect +{ + if (_delegate) + { + [_delegate mglkView:self drawInRect:rect]; + } +} + +- (void)displayAndCapture:(uint8_t **)pPixels +{ + _drawing = YES; + if (_context) + { + if (![MGLContext setCurrentContext:_context forLayer:self.glLayer]) + { + Throw(@"Failed to setCurrentContext"); + } + } + + [self drawRect:self.bounds]; + + if (pPixels) + { + // Frame capture request + int width = static_cast(self.drawableSize.width); + int height = static_cast(self.drawableSize.height); + if (width && height) + { + // Capture framebuffer's content + *pPixels = new uint8_t[4 * width * height]; + GLint prevPackAlignment; + gl::GetIntegerv(GL_PACK_ALIGNMENT, &prevPackAlignment); + gl::PixelStorei(GL_PACK_ALIGNMENT, 1); + + // Clear errors + gl::GetError(); + + gl::ReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, *pPixels); + + gl::PixelStorei(GL_PACK_ALIGNMENT, prevPackAlignment); + + // Clear errors + gl::GetError(); + } + else + { + *pPixels = nullptr; + } + } // if (pPixels) + + if (![_context present:self.glLayer]) + { + Throw(@"Failed to present framebuffer"); + } + _drawing = NO; +} + +#if TARGET_OS_IOS || TARGET_OS_TV +static void freeImageData(void *info, const void *data, size_t size) +{ + delete[] static_cast(info); +} + +- (UIImage *)snapshot +{ + uint8_t *pixels = nullptr; + [self displayAndCapture:&pixels]; + + if (!pixels) + { + return nil; + } + + int width = static_cast(self.drawableSize.width); + int height = static_cast(self.drawableSize.height); + size_t dataLen = width * height * 4; + + uint8_t *flippedPixels = new uint8_t[dataLen]; + for (int y1 = 0; y1 < height; y1++) + { + for (int x1 = 0; x1 < width * 4; x1++) + { + flippedPixels[(height - 1 - y1) * width * 4 + x1] = pixels[y1 * 4 * width + x1]; + } + } + delete[] pixels; + + CGDataProviderRef provider = + CGDataProviderCreateWithData(flippedPixels, flippedPixels, dataLen, freeImageData); + int bitsPerComponent = 8; + int bitsPerPixel = 32; + int bytesPerRow = 4 * width; + CGColorSpaceRef colorSpaceRef = CGColorSpaceCreateDeviceRGB(); + CGBitmapInfo bitmapInfo = kCGBitmapByteOrderDefault | kCGImageAlphaNoneSkipLast; + CGColorRenderingIntent renderingIntent = kCGRenderingIntentDefault; + CGImageRef imageRef = + CGImageCreate(width, height, bitsPerComponent, bitsPerPixel, bytesPerRow, colorSpaceRef, + bitmapInfo, provider, NULL, NO, renderingIntent); + CGColorSpaceRelease(colorSpaceRef); + CGDataProviderRelease(provider); + UIImage *image = [UIImage imageWithCGImage:imageRef scale:1 orientation:UIImageOrientationUp]; + + CGImageRelease(imageRef); + return image; +} +#endif // TARGET_OS_IOS || TARGET_OS_TV + +@end diff --git a/addons/ofxiOS/src/metal/MGLKit/MGLKViewController+Mac.mm b/addons/ofxiOS/src/metal/MGLKit/MGLKViewController+Mac.mm new file mode 100644 index 00000000000..983c6fe9322 --- /dev/null +++ b/addons/ofxiOS/src/metal/MGLKit/MGLKViewController+Mac.mm @@ -0,0 +1,201 @@ +// +// Copyright 2019 Le Hoang Quyen. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// + +- (void)initImpl {} + +- (void)releaseTimer +{ + if (_displayLink) + { + CVDisplayLinkRelease(_displayLink); + _displayLink = nullptr; + } + if (_displaySource) + { + dispatch_source_cancel(_displaySource); + _displaySource = nullptr; + } + if (_displayTimer) + { + [_displayTimer invalidate]; + _displayTimer = nil; + } +} + +- (void)deallocImpl +{ + NSLog(@"MGLKViewController deallocImpl"); + [self releaseTimer]; +} + +- (void)viewDidMoveToWindow +{ + NSLog(@"MGLKViewController viewDidMoveToWindow"); + if (self.view.window) + { + // Obtain current window's screen refresh rate. + CGDirectDisplayID displayID = + (CGDirectDisplayID)[self.view.window.screen + .deviceDescription[@"NSScreenNumber"] unsignedIntegerValue]; + + CGDisplayModeRef displayModeRef = CGDisplayCopyDisplayMode(displayID); + if (displayModeRef) + { + _currentScreenRefreshRate = CGDisplayModeGetRefreshRate(displayModeRef); + } + CGDisplayModeRelease(displayModeRef); + + // Call resume to reset display link's window + [self pause]; + [self resume]; + + // Register callback to be called when this window is closed. + _observedWindow = self.view.window; + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(windowWillClose:) + name:NSWindowWillCloseNotification + object:self.view.window]; + } + else + { + // View is removed from window + [self releaseTimer]; + + // Unregister window closed callback. + if (_observedWindow) + { + [[NSNotificationCenter defaultCenter] removeObserver:self + name:NSWindowWillCloseNotification + object:_observedWindow]; + _observedWindow = nil; + } + } +} + +- (void)windowWillClose:(NSNotification *)notification +{ + NSLog(@"MGLKViewController windowWillClose:"); + [self releaseTimer]; +} + +static CVReturn CVFrameDisplayCallback(CVDisplayLinkRef displayLink, + const CVTimeStamp *now, + const CVTimeStamp *outputTime, + CVOptionFlags flagsIn, + CVOptionFlags *flagsOut, + void *displayLinkContext) +{ + // 'CVFrameDisplayCallback' is always called on a secondary thread. Merge the dispatch source + // setup for the main queue so that rendering occurs on the main thread + __weak dispatch_source_t source = (__bridge dispatch_source_t)displayLinkContext; + dispatch_source_merge_data(source, 1); + + return kCVReturnSuccess; +} + +- (void)setPreferredFramesPerSecond:(NSInteger)preferredFramesPerSecond +{ + _preferredFramesPerSecond = preferredFramesPerSecond; + + [self pause]; + [self resume]; +} + +- (void)pause +{ + if (_paused) + { + return; + } + NSLog(@"MGLKViewController pause"); + + if (_displayLink) + { + CVDisplayLinkStop(_displayLink); + } + if (_displayTimer) + { + [_displayTimer invalidate]; + _displayTimer = nil; + } + + _paused = YES; +} + +- (void)resume +{ + if (!_paused) + { + return; + } + + [self pause]; + NSLog(@"MGLKViewController resume"); + + if (!_glView) + { + return; + } + + if (_preferredFramesPerSecond == 1 || + (_currentScreenRefreshRate && + fabs(_preferredFramesPerSecond - _currentScreenRefreshRate) < 0.00001)) + { + NSWindow *window = _glView.window; + if (!window) + { + return; + } + // The CVDisplayLink callback, CVFrameDisplayCallback, never executes + // on the main thread. To execute rendering on the main thread, create + // a dispatch source using the main queue (the main thread). + // CVFrameDisplayCallback merges this dispatch source in each call + // to execute rendering on the main thread. + if (!_displaySource) + { + _displaySource = dispatch_source_create(DISPATCH_SOURCE_TYPE_DATA_ADD, 0, 0, + dispatch_get_main_queue()); + __weak MGLKViewController *weakSelf = self; + dispatch_source_set_event_handler(_displaySource, ^() { + [weakSelf frameStep]; + }); + dispatch_resume(_displaySource); + } + + // Sync to display refresh rate using CVDisplayLink + _needEnableVsync = YES; + if (!_displayLink) + { + CVDisplayLinkCreateWithActiveCGDisplays(&_displayLink); + CVDisplayLinkSetOutputCallback(_displayLink, CVFrameDisplayCallback, + (__bridge void *)_displaySource); + } + CGDirectDisplayID displayID = + (CGDirectDisplayID)[window.screen + .deviceDescription[@"NSScreenNumber"] unsignedIntegerValue]; + CVDisplayLinkSetCurrentCGDisplay(_displayLink, displayID); + + CVDisplayLinkStart(_displayLink); + } + else + { + // Render the frames without in sync with refresh rate. + _needDisableVsync = YES; + + ASSERT(!_displayTimer); + NSTimeInterval frameInterval = + (_preferredFramesPerSecond <= 0) ? 0 : (1.0 / _preferredFramesPerSecond); + _displayTimer = [NSTimer timerWithTimeInterval:frameInterval + target:self + selector:@selector(frameStep) + userInfo:nil + repeats:YES]; + [[NSRunLoop currentRunLoop] addTimer:_displayTimer forMode:NSDefaultRunLoopMode]; + [[NSRunLoop currentRunLoop] addTimer:_displayTimer forMode:NSModalPanelRunLoopMode]; + } + + _paused = NO; +} diff --git a/addons/ofxiOS/src/metal/MGLKit/MGLKViewController+Private.h b/addons/ofxiOS/src/metal/MGLKit/MGLKViewController+Private.h new file mode 100644 index 00000000000..dc59d369169 --- /dev/null +++ b/addons/ofxiOS/src/metal/MGLKit/MGLKViewController+Private.h @@ -0,0 +1,43 @@ +// +// Copyright 2019 Le Hoang Quyen. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// + +#ifndef MGLKViewController_Private_h +#define MGLKViewController_Private_h + +#import "MGLKViewController.h" + +@interface MGLKViewController () { + __weak MGLKView *_glView; +#if TARGET_OS_OSX + NSTimer *_displayTimer; // Used to render with irregular framerate + CVDisplayLinkRef _displayLink; // Used to render in sync with display refresh rate + dispatch_source_t _displaySource; // Used together with displayLink + double _currentScreenRefreshRate; + NSWindow *_observedWindow; +#else + CADisplayLink *_displayLink; +#endif + CFTimeInterval _lastUpdateTime; + BOOL _needDisableVsync; + BOOL _needEnableVsync; + + BOOL _appWasInBackground; +} + +- (void)viewDidMoveToWindow; + +// Platform specific +- (void)initImpl; +- (void)deallocImpl; +- (void)pause; +- (void)resume; + +// Common +- (void)frameStep; + +@end + +#endif /* MGLKViewController_Private_h */ diff --git a/addons/ofxiOS/src/metal/MGLKit/MGLKViewController+iOS.mm b/addons/ofxiOS/src/metal/MGLKit/MGLKViewController+iOS.mm new file mode 100644 index 00000000000..3dfbf16bb9d --- /dev/null +++ b/addons/ofxiOS/src/metal/MGLKit/MGLKViewController+iOS.mm @@ -0,0 +1,90 @@ +// +// Copyright 2019 Le Hoang Quyen. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// + +- (void)initImpl {} +- (void)deallocImpl {} +- (void)viewDidMoveToWindow {} + +- (void)viewDidLoad +{ + NSLog(@"MGLKViewController viewDidLoad"); + [super viewDidLoad]; +} + +- (void)setPreferredFramesPerSecond:(NSInteger)preferredFramesPerSecond +{ + _preferredFramesPerSecond = preferredFramesPerSecond; + if (_displayLink) + { + if (ANGLE_APPLE_AVAILABLE_CI(13.0, 10.0)) + { + _displayLink.preferredFramesPerSecond = _preferredFramesPerSecond; + } + else + { + _displayLink.frameInterval = 60 / std::max(_preferredFramesPerSecond, 1); + } + } + [self pause]; + [self resume]; +} + +- (void)pause +{ + if (_paused) + { + return; + } + + NSLog(@"MGLKViewController pause"); + + if (_displayLink) + { + [_displayLink removeFromRunLoop:[NSRunLoop mainRunLoop] forMode:NSDefaultRunLoopMode]; + _displayLink = nil; + } + + _paused = YES; +} + +- (void)resume +{ + if (!_paused) + { + return; + } + + [self pause]; + NSLog(@"MGLKViewController resume"); + + if (!_glView) + { + return; + } + + if (!_displayLink) + { + _displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(frameStep)]; + if (ANGLE_APPLE_AVAILABLE_CI(13.0, 10.0)) + { + _displayLink.preferredFramesPerSecond = _preferredFramesPerSecond == 1 ? 0 : _preferredFramesPerSecond; + } + else + { + if (_preferredFramesPerSecond <= 1) + { + _displayLink.frameInterval = 1; + } + else { + _displayLink.frameInterval = 60 / _preferredFramesPerSecond; + } + } + } + + [_displayLink addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSDefaultRunLoopMode]; + + _paused = NO; +} diff --git a/addons/ofxiOS/src/metal/MGLKit/MGLKViewController.h b/addons/ofxiOS/src/metal/MGLKit/MGLKViewController.h new file mode 100644 index 00000000000..238b4cf9589 --- /dev/null +++ b/addons/ofxiOS/src/metal/MGLKit/MGLKViewController.h @@ -0,0 +1,42 @@ +// +// Copyright 2019 Le Hoang Quyen. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// + +#import "MGLKView.h" + +NS_ASSUME_NONNULL_BEGIN + +@class MGLKViewController; + +@protocol MGLKViewControllerDelegate + +- (void)mglkViewControllerUpdate:(MGLKViewController *)controller; + +@end + +@interface MGLKViewController : MGLKNativeViewController + +@property(nonatomic, assign) IBOutlet id delegate; + +// The default value is 30. +// On iOS: +// - Setting to 0 or 1 will sync the framerate with display's refresh rate +// On macOS: +// - Setting to 1 will sync the framerate with display's refresh rate +// - Setting to 0 will display the frames as fast as possible. +@property(nonatomic) NSInteger preferredFramesPerSecond; + +@property(nonatomic, readonly) NSInteger framesDisplayed; +@property(nonatomic, readonly) NSTimeInterval timeSinceLastUpdate; + +@property(nonatomic, getter=isPaused) BOOL paused; +@property(nonatomic) BOOL pauseOnWillResignActive; +@property(nonatomic) BOOL resumeOnDidBecomeActive; + +@property(weak, nonatomic, readonly) MGLKView *glView; + +@end + +NS_ASSUME_NONNULL_END diff --git a/addons/ofxiOS/src/metal/MGLKit/MGLKViewController.mm b/addons/ofxiOS/src/metal/MGLKit/MGLKViewController.mm new file mode 100644 index 00000000000..aea44e7ca0c --- /dev/null +++ b/addons/ofxiOS/src/metal/MGLKit/MGLKViewController.mm @@ -0,0 +1,241 @@ +// +// Copyright 2019 Le Hoang Quyen. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// + +#import "MGLKViewController+Private.h" + +#include +#include +#include +#include +#include +#include + +#import "MGLDisplay.h" +#import "MGLKView+Private.h" + +@implementation MGLKViewController + +#if TARGET_OS_OSX +# include "MGLKViewController+Mac.mm" +#else +# include "MGLKViewController+iOS.mm" +#endif + +- (instancetype)init +{ + if (self = [super init]) + { + [self constructor]; + } + return self; +} + +- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil +{ + if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) + { + [self constructor]; + } + return self; +} + +- (instancetype)initWithCoder:(NSCoder *)coder +{ + if (self = [super initWithCoder:coder]) + { + [self constructor]; + } + return self; +} + +- (void)constructor +{ + _appWasInBackground = YES; + _preferredFramesPerSecond = 30; + _pauseOnWillResignActive = YES; + _resumeOnDidBecomeActive = YES; + // not-paused corresponds to having a DisplayLink or timer active and driving the frame loop + _paused = YES; +} + +- (void)dealloc +{ + [self deallocImpl]; +} + +- (void)setView:(MGLKNativeView *)view +{ + [super setView:view]; + if ([view isKindOfClass:MGLKView.class]) + { + _glView = (MGLKView *)view; +#if TARGET_OS_IOS || TARGET_OS_TV + _glView.enableSetNeedsDisplay = NO; +#endif + if (!_glView.delegate) + { + // If view has no delegate, set this controller as its delegate + _glView.delegate = self; + } + // Store this object inside the view itself so that the view can notify + // this controller about certain events such as moving to new window. + _glView.controller = self; + } + else + { + if (_glView.delegate == self) + { + // Detach from old view + _glView.delegate = nil; + } + if (_glView.controller == self) + { + _glView.controller = nil; + } + _glView = nil; + } +} + +- (void)setPaused:(BOOL)paused +{ + if (paused != _paused) { + if (paused) { + [self pause]; + } else { + [self resume]; + } + } +} + +- (void)mglkView:(MGLKView *)view drawInRect:(CGRect)rect +{ + // Default implementation do nothing. +} + +// viewDidAppear callback +#if TARGET_OS_OSX +- (void)viewDidAppear +{ + [super viewDidAppear]; +#else // TARGET_OS_OSX +- (void)viewDidAppear:(BOOL)animated +{ + [super viewDidAppear:animated]; +#endif // TARGET_OS_OSX + NSLog(@"MGLKViewController viewDidAppear"); + + // Implementation dependent + [self resume]; + + // Register callbacks to be called when app enters/exits background + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(appWillPause:) + name:MGLKApplicationWillResignActiveNotification + object:nil]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(appDidBecomeActive:) + name:MGLKApplicationDidBecomeActiveNotification + object:nil]; +} + +// viewDidDisappear callback +#if TARGET_OS_OSX +- (void)viewDidDisappear +{ + [super viewDidDisappear]; +#else // TARGET_OS_OSX +- (void)viewDidDisappear:(BOOL)animated +{ + [super viewDidDisappear:animated]; +#endif // TARGET_OS_OSX + NSLog(@"MGLKViewController viewDidDisappear"); + _appWasInBackground = YES; + + // Implementation dependent + [self pause]; + + // Unregister callbacks that are called when app enters/exits background + [[NSNotificationCenter defaultCenter] removeObserver:self + name:MGLKApplicationWillResignActiveNotification + object:nil]; + + [[NSNotificationCenter defaultCenter] removeObserver:self + name:MGLKApplicationDidBecomeActiveNotification + object:nil]; +} + +- (void)appWillPause:(NSNotification *)note +{ + NSLog(@"MGLKViewController appWillPause:"); + if (_pauseOnWillResignActive) { + _appWasInBackground = YES; + self.paused = YES; + } +} + +- (void)appDidBecomeActive:(NSNotification *)note +{ + NSLog(@"MGLKViewController appDidBecomeActive:"); + if (_resumeOnDidBecomeActive) { + self.paused = NO; + } +} + +- (void)handleAppWasInBackground +{ + if (!_appWasInBackground) + { + return; + } + // To avoid time jump when the app goes to background + // for a long period of time. + _lastUpdateTime = CACurrentMediaTime(); + + _appWasInBackground = NO; +} + +- (void)frameStep +{ + [self handleAppWasInBackground]; + + CFTimeInterval now = CACurrentMediaTime(); + _timeSinceLastUpdate = now - _lastUpdateTime; + + [self update]; + [_glView display]; + + if (_needDisableVsync) + { + eglSwapInterval([MGLDisplay defaultDisplay].eglDisplay, 0); + _needDisableVsync = NO; + } + else if (_needEnableVsync) + { + eglSwapInterval([MGLDisplay defaultDisplay].eglDisplay, 1); + _needEnableVsync = NO; + } + + _framesDisplayed++; + _lastUpdateTime = now; + +#if 0 + if (_timeSinceLastUpdate > 2 * _displayLink.duration) + { + NSLog(@"frame was jump by %fs", _timeSinceLastUpdate); + } +#endif +} + +- (void)update +{ + if (_delegate) + { + [_delegate mglkViewControllerUpdate:self]; + } +} + +@end diff --git a/addons/ofxiOS/src/metal/MGLKit/MGLKit.h b/addons/ofxiOS/src/metal/MGLKit/MGLKit.h new file mode 100644 index 00000000000..731c45f48d7 --- /dev/null +++ b/addons/ofxiOS/src/metal/MGLKit/MGLKit.h @@ -0,0 +1,14 @@ +// +// Copyright 2019 Le Hoang Quyen. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// + +#ifndef MGLKit_h +#define MGLKit_h + +#import "MGLContext.h" +#import "MGLKView.h" +#import "MGLKViewController.h" + +#endif /* MGLKit_h */ diff --git a/addons/ofxiOS/src/metal/MGLKit/MGLKitPlatform.h b/addons/ofxiOS/src/metal/MGLKit/MGLKitPlatform.h new file mode 100644 index 00000000000..bed4a412165 --- /dev/null +++ b/addons/ofxiOS/src/metal/MGLKit/MGLKitPlatform.h @@ -0,0 +1,33 @@ +// +// Copyright 2020 Le Hoang Quyen. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// + +#ifndef MGLKitPlatform_h +#define MGLKitPlatform_h + +#include + +#if TARGET_OS_IOS || TARGET_OS_MACCATALYST || TARGET_OS_TV || TARGET_OS_VISION +# include + +@compatibility_alias MGLKNativeView UIView; +@compatibility_alias MGLKNativeViewController UIViewController; + +# define MGLKApplicationWillResignActiveNotification UIApplicationWillResignActiveNotification +# define MGLKApplicationDidBecomeActiveNotification UIApplicationDidBecomeActiveNotification + +#elif TARGET_OS_OSX +# include + +@compatibility_alias MGLKNativeView NSView; +@compatibility_alias MGLKNativeViewController NSViewController; + +# define MGLKApplicationWillResignActiveNotification NSApplicationWillResignActiveNotification +# define MGLKApplicationDidBecomeActiveNotification NSApplicationDidBecomeActiveNotification +#else +# error "Unsupported platform" +#endif + +#endif /* MGLKitPlatform_h */ diff --git a/addons/ofxiOS/src/metal/MGLKit/MGLLayer+Private.h b/addons/ofxiOS/src/metal/MGLKit/MGLLayer+Private.h new file mode 100644 index 00000000000..99245bab92e --- /dev/null +++ b/addons/ofxiOS/src/metal/MGLKit/MGLLayer+Private.h @@ -0,0 +1,50 @@ +// +// Copyright 2019 Le Hoang Quyen. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// + +#ifndef MGLLayer_Private_h +#define MGLLayer_Private_h + +#import "MGLLayer.h" + +#import +#import + +#include +#include +#include +#import "MGLDisplay.h" + +@interface MGLLayer () { + MGLDisplay *_display; + // The context that owns the offscreen FBO + MGLContext *_offscreenFBOCreatorContext; + EGLSurface _eglSurface; + CAMetalLayer *_metalLayer; + CALayer *_legacyGLLayer; + + // Textures used to retain the content of framebuffer. + GLuint _offscreenColorUnsizedFormat; + GLuint _offscreenColorFormatDataType; + GLuint _offscreenTexture; // Use if glBlitFramebufferANGLE is not available + GLuint _offscreenRenderBuffer; // Use if glBlitFramebufferANGLE is available + GLuint _offscreenDepthStencilBuffer; + GLuint _offscreenBlitProgram; + GLuint _offscreenBlitVBO; + GLuint _offscreenBlitVAO; + CGSize _offscreenFBOSize; + BOOL _isGLES3Plus; + BOOL _blitFramebufferAvail; + BOOL _drawBuffersAvail; + BOOL _useOffscreenFBO; +} + +@property(nonatomic, readonly) EGLSurface eglSurface; + +- (BOOL)setCurrentContext:(MGLContext *)context; + +@end + +#endif /* MGLLayer_Private_h */ diff --git a/addons/ofxiOS/src/metal/MGLKit/MGLLayer.h b/addons/ofxiOS/src/metal/MGLKit/MGLLayer.h new file mode 100644 index 00000000000..f720923941a --- /dev/null +++ b/addons/ofxiOS/src/metal/MGLKit/MGLLayer.h @@ -0,0 +1,73 @@ +// +// Copyright 2019 Le Hoang Quyen. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// + +// We don't use GLES from Apple framework. +// Instead we use GLES provided by MetalANGLE. +#define GLES_SILENCE_DEPRECATION +#define GL_SILENCE_DEPRECATION + +#import +#import + +#import "MGLKitPlatform.h" + +NS_ASSUME_NONNULL_BEGIN + +@class MGLContext; + +typedef enum MGLDrawableColorFormat : int +{ + MGLDrawableColorFormatRGBA8888 = 32, + MGLDrawableColorFormatSRGBA8888 = -32, + MGLDrawableColorFormatRGB565 = 16, +} MGLDrawableColorFormat; + +typedef enum MGLDrawableStencilFormat : int +{ + MGLDrawableStencilFormatNone = 0, + MGLDrawableStencilFormat8 = 8, +} MGLDrawableStencilFormat; + +typedef enum MGLDrawableDepthFormat : int +{ + MGLDrawableDepthFormatNone = 0, + MGLDrawableDepthFormat16 = 16, + MGLDrawableDepthFormat24 = 24, +} MGLDrawableDepthFormat; + +typedef enum MGLDrawableMultisample : int +{ + MGLDrawableMultisampleNone = 0, + MGLDrawableMultisample4X = 4, +} MGLDrawableMultisample; + +@interface MGLLayer : CALayer + +// Return the size of the OpenGL framebuffer. +@property(readonly) CGSize drawableSize; +// Default OpenGL id of the framebuffer storing content of this layer. +// Might not necessary be zero. +@property(readonly) uint32_t defaultOpenGLFrameBufferID; + +@property(nonatomic) MGLDrawableColorFormat drawableColorFormat; // Default is RGBA8888 +@property(nonatomic) MGLDrawableDepthFormat drawableDepthFormat; // Default is DepthNone +@property(nonatomic) MGLDrawableStencilFormat drawableStencilFormat; // Default is StencilNone +@property(nonatomic) + MGLDrawableMultisample drawableMultisample; // Default is MGLDrawableMultisampleNone + +// Default value is NO. Setting to YES will keep the framebuffer data after presenting. +// Doing so will reduce performance and increase memory usage. +@property(nonatomic) BOOL retainedBacking; + +// Present the content of OpenGL backed framebuffer on screen as soon as possible. +- (BOOL)present; + +// Bind default framebuffer. Use this after drawing to offscreen FBO. +- (void)bindDefaultFrameBuffer; + +@end + +NS_ASSUME_NONNULL_END diff --git a/addons/ofxiOS/src/metal/MGLKit/MGLLayer.mm b/addons/ofxiOS/src/metal/MGLKit/MGLLayer.mm new file mode 100644 index 00000000000..e2f33eeb9f9 --- /dev/null +++ b/addons/ofxiOS/src/metal/MGLKit/MGLLayer.mm @@ -0,0 +1,1133 @@ +// +// Copyright 2019 Le Hoang Quyen. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// + +#import "MGLLayer+Private.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#import "MGLContext+Private.h" +#import "MGLDisplay.h" + +namespace +{ + +constexpr GLchar kBlitVS[] = R"( +attribute vec2 aPosition; + +varying mediump vec2 vTexcoords; + +void main() +{ + gl_Position = vec4(aPosition.x, aPosition.y, 0.0, 1.0); + vTexcoords = 0.5 * (aPosition + vec2(1.0, 1.0)); +} +)"; + +constexpr GLchar kBlitFS[] = R"( +uniform sampler2D uTexture; + +varying mediump vec2 vTexcoords; + +void main() +{ + gl_FragColor = texture2D(uTexture, vTexcoords); +} +)"; + +template +class ScopedGLEnable +{ + public: + ScopedGLEnable(bool enable) + { + gl::GetIntegerv(State, &mPrevState); + + if (enable) + { + gl::Enable(State); + } + else + { + gl::Disable(State); + } + } + ~ScopedGLEnable() + { + if (mPrevState) + { + gl::Enable(State); + } + else + { + gl::Disable(State); + } + } + + private: + GLint mPrevState; +}; + +template +class ScopedGLBinding +{ + public: + ScopedGLBinding(GLuint newObj) + { + gl::GetIntegerv(TargetBindingGet, &mPrevBoundObj); + BindFunc(Target, newObj); + } + ~ScopedGLBinding() { BindFunc(Target, mPrevBoundObj); } + + private: + GLint mPrevBoundObj; +}; + +using ScopedTextureBind = ScopedGLBinding; +using ScopedBufferBind = ScopedGLBinding; +using ScopedRenderbufferBind = + ScopedGLBinding; +using ScopedFBOBind = ScopedGLBinding; +using ScopedDrawFBOBind = + ScopedGLBinding; +using ScopedReadFBOBind = + ScopedGLBinding; + +class ScopedProgramBind +{ + public: + ScopedProgramBind(GLuint program) + { + gl::GetIntegerv(GL_CURRENT_PROGRAM, &mPrevProgram); + gl::UseProgram(program); + } + ~ScopedProgramBind() { gl::UseProgram(mPrevProgram); } + + private: + GLint mPrevProgram; +}; + +class ScopedActiveTexture +{ + public: + ScopedActiveTexture(GLenum unit) + { + gl::GetIntegerv(GL_ACTIVE_TEXTURE, &mPrevActiveTexture); + gl::ActiveTexture(unit); + } + ~ScopedActiveTexture() { gl::ActiveTexture(mPrevActiveTexture); } + + private: + GLint mPrevActiveTexture; +}; + +struct ScopedVAOBind +{ + public: + ScopedVAOBind(GLuint vao) + { + gl::GetIntegerv(GL_VERTEX_ARRAY_BINDING_OES, &mPrevVAO); + gl::BindVertexArrayOES(vao); + } + ~ScopedVAOBind() { gl::BindVertexArrayOES(mPrevVAO); } + + private: + GLint mPrevVAO; +}; + +template +class ScopedGLObject +{ + public: + ScopedGLObject() : mObject(0) {} + ScopedGLObject(GLuint object) : mObject(object) {} + ~ScopedGLObject() + { + if (mObject) + { + DeleteFunc(1, &mObject); + } + mObject = 0; + } + + ScopedGLObject &operator=(GLuint object) + { + mObject = object; + return *this; + } + + operator GLuint() const { return get(); } + + const GLuint &get() const { return mObject; } + GLuint &get() { return mObject; } + + private: + GLuint mObject; +}; + +using ScopedTexture = ScopedGLObject; +using ScopedRenderbuffer = ScopedGLObject; +using ScopedFramebuffer = ScopedGLObject; + +class ScopedViewport +{ + public: + ScopedViewport(GLint x, GLint y, GLint width, GLint height) + { + gl::GetIntegerv(GL_VIEWPORT, mPrevViewport); + gl::Viewport(x, y, width, height); + } + ~ScopedViewport() + { + gl::Viewport(mPrevViewport[0], mPrevViewport[1], mPrevViewport[2], mPrevViewport[3]); + } + + private: + GLint mPrevViewport[4]; +}; + +class ScopedReadBuffer +{ + public: + ScopedReadBuffer(GLint buffer, bool readBufferAvail) : mReadBufferAvail(readBufferAvail) + { + if (!mReadBufferAvail) + { + return; + } + gl::GetIntegerv(GL_READ_BUFFER, &mPrevReadBuffer); + gl::ReadBuffer(buffer); + } + ~ScopedReadBuffer() + { + if (mReadBufferAvail) + { + gl::ReadBuffer(mPrevReadBuffer); + } + } + + private: + const bool mReadBufferAvail; + GLint mPrevReadBuffer; +}; + +class ScopedDrawBuffer +{ + public: + ScopedDrawBuffer(GLenum drawbuffer, PFNGLDRAWBUFFERSEXTPROC drawBuffersFunc) + : mDrawBuffersFunc(drawBuffersFunc) + { + if (!mDrawBuffersFunc) + { + return; + } + GLint maxDrawBuffers; + gl::GetIntegerv(GL_MAX_DRAW_BUFFERS, &maxDrawBuffers); + mPrevDrawBuffers.resize(maxDrawBuffers, GL_NONE); + for (int i = 0; i < maxDrawBuffers; ++i) + { + GLint buffer = GL_NONE; + gl::GetIntegerv(GL_DRAW_BUFFER0 + i, &buffer); + mPrevDrawBuffers[i] = buffer; + } + mDrawBuffersFunc(1, &drawbuffer); + } + ~ScopedDrawBuffer() + { + if (!mDrawBuffersFunc) + { + return; + } + GLint currentFBO; + gl::GetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, ¤tFBO); + if (currentFBO == 0) + { + mDrawBuffersFunc(1, mPrevDrawBuffers.data()); + } + else + { + mDrawBuffersFunc(mPrevDrawBuffers.size(), mPrevDrawBuffers.data()); + } + } + + private: + std::vector mPrevDrawBuffers; + const PFNGLDRAWBUFFERSEXTPROC mDrawBuffersFunc; +}; + +void Throw(NSString *msg) +{ + [NSException raise:@"MGLSurfaceException" format:@"%@", msg]; +} + +GLint CompileShader(GLenum target, const GLchar *source, GLuint *shader) +{ + GLint logLength, status; + + *shader = gl::CreateShader(target); + const GLchar *sources[] = {source}; + gl::ShaderSource(*shader, 1, sources, NULL); + gl::CompileShader(*shader); + gl::GetShaderiv(*shader, GL_INFO_LOG_LENGTH, &logLength); + if (logLength > 0) + { + GLchar *log = (GLchar *)malloc(logLength); + gl::GetShaderInfoLog(*shader, logLength, &logLength, log); + NSLog(@"Shader compile log:\n%s", log); + free(log); + } + + gl::GetShaderiv(*shader, GL_COMPILE_STATUS, &status); + if (status == GL_FALSE) + { + NSLog(@"Failed to compile shader:\n"); + NSLog(@"%s", source); + } + + return status && *shader; +} + +GLint LinkProgram(GLuint program) +{ + GLint logLength, status; + + gl::LinkProgram(program); + gl::GetProgramiv(program, GL_INFO_LOG_LENGTH, &logLength); + if (logLength > 0) + { + GLchar *log = (GLchar *)malloc(logLength); + gl::GetProgramInfoLog(program, logLength, &logLength, log); + NSLog(@"Program link log:\n%s", log); + free(log); + } + + gl::GetProgramiv(program, GL_LINK_STATUS, &status); + if (status == 0) + NSLog(@"Failed to link program %d", program); + + return status && program; +} +} + +// MGLLayer implementation +@implementation MGLLayer + +- (id)init +{ + if (self = [super init]) + { + [self constructor]; + } + return self; +} + +- (id)initWithCoder:(NSCoder *)coder +{ + if (self = [super initWithCoder:coder]) + { + [self constructor]; + } + return self; +} + +- (void)constructor +{ + _drawableColorFormat = MGLDrawableColorFormatRGBA8888; + _drawableDepthFormat = MGLDrawableDepthFormatNone; + _drawableStencilFormat = MGLDrawableStencilFormatNone; + _drawableMultisample = MGLDrawableMultisampleNone; + + _display = [MGLDisplay defaultDisplay]; + + _eglSurface = EGL_NO_SURFACE; + + if (rx::IsMetalDisplayAvailable()) + { + _metalLayer = [[CAMetalLayer alloc] init]; + _metalLayer.frame = self.bounds; + [self addSublayer:_metalLayer]; + } + else + { + _legacyGLLayer = [[CALayer alloc] init]; + _legacyGLLayer.frame = self.bounds; + [self addSublayer:_legacyGLLayer]; + } +} + +- (void)dealloc +{ + [self releaseSurface]; + + _display = nil; +} + +- (void)setContentsScale:(CGFloat)contentsScale +{ + [super setContentsScale:contentsScale]; + + if (rx::IsMetalDisplayAvailable()) + { + _metalLayer.contentsScale = contentsScale; + } + else + { + _legacyGLLayer.contentsScale = contentsScale; + } +} + +- (CGSize)drawableSize +{ + if (rx::IsMetalDisplayAvailable()) + { + if (_metalLayer.drawableSize.width == 0 && _metalLayer.drawableSize.height == 0) + { + [self checkLayerSize]; + } + return _metalLayer.drawableSize; + } + + return CGSizeMake(self.bounds.size.width * self.contentsScale, + self.bounds.size.height * self.contentsScale); +} + +- (BOOL)setCurrentContext:(MGLContext *)context +{ + if (eglGetCurrentContext() != context.eglContext || + eglGetCurrentSurface(EGL_READ) != self.eglSurface || + eglGetCurrentSurface(EGL_DRAW) != self.eglSurface) + { + if (!eglMakeCurrent(_display.eglDisplay, self.eglSurface, self.eglSurface, + context.eglContext)) + { + return NO; + } + } + + if (_useOffscreenFBO) + { + GLint currentFBO; + gl::GetIntegerv(GL_FRAMEBUFFER_BINDING, ¤tFBO); + BOOL offscreenFBOWasBound = currentFBO == _defaultOpenGLFrameBufferID; + + if (![self ensureOffscreenFBOCreated]) + { + return NO; + } + + if (offscreenFBOWasBound) + { + // Draw to offscreen texture instead of eglSurface + gl::BindFramebuffer(GL_FRAMEBUFFER, _defaultOpenGLFrameBufferID); + } + } + + return YES; +} + +- (void)bindDefaultFrameBuffer +{ + gl::BindFramebuffer(GL_FRAMEBUFFER, _defaultOpenGLFrameBufferID); +} + +- (BOOL)present +{ + if (_useOffscreenFBO) + { + if (_blitFramebufferAvail) + { + if (![self blitFBO:_defaultOpenGLFrameBufferID + sourceSize:_offscreenFBOSize + toFBO:0 + destinationSize:self.drawableSize + destinationMSAA:NO]) + { + return NO; + } + } + else if (![self blitOffscreenTexture:_offscreenTexture toFBO:0]) + { + return NO; + } + } + + if (!eglSwapBuffers(_display.eglDisplay, self.eglSurface)) + { + return NO; + } + + [self checkLayerSize]; + + return YES; +} + +- (BOOL)blitFBO:(GLuint)srcFbo + sourceSize:(CGSize)srcSize + toFBO:(GLuint)dstFbo + destinationSize:(CGSize)dstSize + destinationMSAA:(BOOL)destinationMSAA +{ + if (srcSize.width != dstSize.width || srcSize.height != dstSize.height || destinationMSAA) + { + // Blit to a temporary texture + ScopedTexture tempTexture; + gl::GenTextures(1, &tempTexture.get()); + ScopedTextureBind bindTexture(tempTexture); + gl::TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + gl::TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + gl::TexImage2D(GL_TEXTURE_2D, 0, _offscreenColorUnsizedFormat, + static_cast(srcSize.width), static_cast(srcSize.height), 0, + _offscreenColorUnsizedFormat, _offscreenColorFormatDataType, 0); + + ScopedFramebuffer tempFBO; + gl::GenFramebuffers(1, &tempFBO.get()); + ScopedFBOBind bindFBO(tempFBO); + gl::FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, tempTexture, + 0); + + if (![self blitFBO:srcFbo + sourceSize:srcSize + toFBO:tempFBO + destinationSize:srcSize + destinationMSAA:NO]) + { + return NO; + } + + // Draw the temporary texture to destination framebuffer + return [self blitOffscreenTexture:tempTexture toFBO:dstFbo]; + } + + // Same size blitting + ASSERT(_blitFramebufferAvail); + auto currentCtx = [MGLContext currentContext]; + auto currentLayer = [MGLContext currentLayer]; + [MGLContext setCurrentContext:_offscreenFBOCreatorContext forLayer:self]; + + ScopedDrawFBOBind bindDrawFBO(dstFbo); + ScopedReadFBOBind bindReadFBO(srcFbo); + ScopedReadBuffer setReadBuffer(GL_COLOR_ATTACHMENT0, _isGLES3Plus); + ScopedDrawBuffer setDrawBuffer(dstFbo ? GL_COLOR_ATTACHMENT0 : GL_BACK, + _isGLES3Plus ? gl::DrawBuffers : gl::DrawBuffersEXT); + ScopedGLEnable disableScissorTest(false); + + auto blitFunc = _isGLES3Plus ? gl::BlitFramebuffer : gl::BlitFramebufferANGLE; + + blitFunc(0, 0, static_cast(srcSize.width), static_cast(srcSize.height), 0, 0, + static_cast(dstSize.width), static_cast(dstSize.height), + GL_COLOR_BUFFER_BIT, GL_NEAREST); + + BOOL re = gl::GetError() == GL_NO_ERROR; + + [MGLContext setCurrentContext:currentCtx forLayer:currentLayer]; + + return re; +} + +- (BOOL)blitOffscreenTexture:(GLuint)texture toFBO:(GLuint)fbo +{ + ASSERT(texture && _offscreenBlitProgram && _offscreenBlitVAO); + + auto currentCtx = [MGLContext currentContext]; + auto currentLayer = [MGLContext currentLayer]; + [MGLContext setCurrentContext:_offscreenFBOCreatorContext forLayer:self]; + + ScopedFBOBind bindFBO(fbo); + ScopedDrawBuffer setDrawBuffer(fbo ? GL_COLOR_ATTACHMENT0 : GL_BACK, + _isGLES3Plus ? gl::DrawBuffers : gl::DrawBuffersEXT); + ScopedProgramBind bindProgram(_offscreenBlitProgram); + ScopedActiveTexture activeTexture(GL_TEXTURE0); + ScopedTextureBind bindTexture(texture); + ScopedVAOBind bindVAO(_offscreenBlitVAO); + + ScopedGLEnable disableCull(false); + ScopedGLEnable disableDepthTest(false); + ScopedGLEnable disableStencilTest(false); + ScopedGLEnable disableBlend(false); + ScopedGLEnable disableScissorTest(false); + + ScopedViewport setViewport(0, 0, static_cast(_offscreenFBOSize.width), + static_cast(_offscreenFBOSize.height)); + + gl::DrawArrays(GL_TRIANGLE_STRIP, 0, 4); + + BOOL re = gl::GetError() == GL_NO_ERROR; + + [MGLContext setCurrentContext:currentCtx forLayer:currentLayer]; + + return re; +} + +- (EGLSurface)eglSurface +{ + [self ensureSurfaceCreated]; + + return _eglSurface; +} + +- (void)setDrawableColorFormat:(MGLDrawableColorFormat)drawableColorFormat +{ + _drawableColorFormat = drawableColorFormat; + [self releaseSurface]; +} + +- (void)setDrawableDepthFormat:(MGLDrawableDepthFormat)drawableDepthFormat +{ + _drawableDepthFormat = drawableDepthFormat; + [self releaseSurface]; +} + +- (void)setDrawableStencilFormat:(MGLDrawableStencilFormat)drawableStencilFormat +{ + _drawableStencilFormat = drawableStencilFormat; + [self releaseSurface]; +} + +- (void)setDrawableMultisample:(MGLDrawableMultisample)drawableMultisample +{ + _drawableMultisample = drawableMultisample; + if (!rx::IsMetalDisplayAvailable() && _drawableMultisample > 0) + { + // Default backbuffer MSAA is not supported in native GL backend yet. + // Use offscreen MSAA buffer. + _useOffscreenFBO = YES; + } + [self releaseSurface]; +} + +- (void)setRetainedBacking:(BOOL)retainedBacking +{ + if (!rx::IsMetalDisplayAvailable()) + { + if (_drawableMultisample > 0) + { + // Default backbuffer MSAA is not supported in native GL backend yet. + // Always use offscreen MSAA buffer. + _useOffscreenFBO = YES; + } + else + { + _useOffscreenFBO = retainedBacking; + } + } + // else Metal back-end already supports preserve swap behavior. + _retainedBacking = retainedBacking; +} + +- (void)releaseSurface +{ + if (_eglSurface == eglGetCurrentSurface(EGL_READ) || + _eglSurface == eglGetCurrentSurface(EGL_DRAW)) + { + eglMakeCurrent(_display.eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + } + if (_eglSurface != EGL_NO_SURFACE) + { + eglDestroySurface(_display.eglDisplay, _eglSurface); + _eglSurface = EGL_NO_SURFACE; + } + [self releaseOffscreenRenderingResources]; +} + +- (void)releaseOffscreenRenderingResources +{ + if (_defaultOpenGLFrameBufferID) + { + auto oldUseOffscreenFBOFlag = _useOffscreenFBO; + // Avoid the buffer being created again inside setCurrentContext: + _useOffscreenFBO = NO; + auto currentCtx = [MGLContext currentContext]; + auto currentLayer = [MGLContext currentLayer]; + [MGLContext setCurrentContext:_offscreenFBOCreatorContext]; + + gl::DeleteFramebuffers(1, &_defaultOpenGLFrameBufferID); + _defaultOpenGLFrameBufferID = 0; + + gl::DeleteTextures(1, &_offscreenTexture); + _offscreenTexture = 0; + gl::DeleteRenderbuffers(1, &_offscreenRenderBuffer); + _offscreenRenderBuffer = 0; + gl::DeleteRenderbuffers(1, &_offscreenDepthStencilBuffer); + _offscreenDepthStencilBuffer = 0; + gl::DeleteVertexArraysOES(1, &_offscreenBlitVAO); + _offscreenBlitVAO = 0; + gl::DeleteBuffers(1, &_offscreenBlitVBO); + _offscreenBlitVBO = 0; + gl::DeleteBuffers(1, &_offscreenBlitProgram); + _offscreenBlitProgram = 0; + + [MGLContext setCurrentContext:currentCtx forLayer:currentLayer]; + + _useOffscreenFBO = oldUseOffscreenFBOFlag; + } + + _offscreenFBOSize.width = _offscreenFBOSize.height = 0; +} + +- (void)checkLayerSize +{ + if (rx::IsMetalDisplayAvailable()) + { + // Resize the metal layer + [CATransaction begin]; + [CATransaction setValue:(id)kCFBooleanTrue + forKey:kCATransactionDisableActions]; + _metalLayer.frame = self.bounds; + _metalLayer.drawableSize = + CGSizeMake(_metalLayer.bounds.size.width * _metalLayer.contentsScale, + _metalLayer.bounds.size.height * _metalLayer.contentsScale); + [CATransaction commit]; + } + else + { + _legacyGLLayer.frame = self.bounds; + } +} + +- (void)ensureSurfaceCreated +{ + if (_eglSurface != EGL_NO_SURFACE) + { + return; + } + + [self checkLayerSize]; + + int red = 8, green = 8, blue = 8, alpha = 8; + int colorSpace; + switch (_drawableColorFormat) + { + case MGLDrawableColorFormatRGBA8888: + // RGB565 default framebuffer is not supported by Metal atm. + // Fallback to RGBA8. + case MGLDrawableColorFormatRGB565: + red = green = blue = alpha = 8; + colorSpace = EGL_GL_COLORSPACE_LINEAR_KHR; + break; + case MGLDrawableColorFormatSRGBA8888: + red = green = blue = alpha = 8; + colorSpace = EGL_GL_COLORSPACE_SRGB_KHR; + break; + default: + UNREACHABLE(); + break; + } + + // Init surface + std::vector surfaceAttribs = { + EGL_RED_SIZE, red, + EGL_GREEN_SIZE, green, + EGL_BLUE_SIZE, blue, + EGL_ALPHA_SIZE, alpha, + EGL_DEPTH_SIZE, _useOffscreenFBO ? 0 : _drawableDepthFormat, + EGL_STENCIL_SIZE, _useOffscreenFBO ? 0 : _drawableStencilFormat, + EGL_SAMPLE_BUFFERS, 0, + EGL_SAMPLES, _useOffscreenFBO ? EGL_DONT_CARE : _drawableMultisample, + }; + surfaceAttribs.push_back(EGL_NONE); + EGLConfig config; + EGLint numConfigs; + if (!eglChooseConfig(_display.eglDisplay, surfaceAttribs.data(), &config, 1, &numConfigs) || + numConfigs < 1) + { + Throw(@"Failed to call eglChooseConfig()"); + } + + EGLint creationAttribs[] = {EGL_FLEXIBLE_SURFACE_COMPATIBILITY_SUPPORTED_ANGLE, EGL_TRUE, + EGL_GL_COLORSPACE_KHR, colorSpace, EGL_NONE}; + + EGLNativeWindowType nativeWindowPtr; + + if (rx::IsMetalDisplayAvailable()) + { + // If metal layer is available, use it directly + nativeWindowPtr = (__bridge EGLNativeWindowType)_metalLayer; + } + else + { + nativeWindowPtr = (__bridge EGLNativeWindowType)_legacyGLLayer; + } + + _eglSurface = + eglCreateWindowSurface(_display.eglDisplay, config, nativeWindowPtr, creationAttribs); + if (_eglSurface == EGL_NO_SURFACE) + { + Throw(@"Failed to call eglCreateWindowSurface()"); + } + + if (_retainedBacking && !_useOffscreenFBO) + { + eglSurfaceAttrib(_display.eglDisplay, _eglSurface, EGL_SWAP_BEHAVIOR, EGL_BUFFER_PRESERVED); + } +} + +- (BOOL)ensureOffscreenFBOCreated +{ + ASSERT(eglGetCurrentContext() != EGL_NO_CONTEXT); + + ScopedTexture oldOffscreenTexture = 0; + ScopedRenderbuffer oldOffscreenRenderbuffer = 0; + CGSize oldOffscreenSize = _offscreenFBOSize; + + if (_offscreenFBOCreatorContext != [MGLContext currentContext] || ! + [self verifyOffscreenFBOSize]) + { + // We need to copy the old texture to current texture, so backup the offscreen + // texture/buffer value and set those instance variables to zero to avoid the texture/buffer + // being released. + oldOffscreenTexture = _offscreenTexture; + oldOffscreenRenderbuffer = _offscreenRenderBuffer; + oldOffscreenSize = _offscreenFBOSize; + _offscreenTexture = 0; + _offscreenRenderBuffer = 0; + [self releaseOffscreenRenderingResources]; + } + + if (_defaultOpenGLFrameBufferID) + { + // Already created. + return YES; + } + + if (![self createOffscreenRenderingResources]) + { + [self releaseOffscreenRenderingResources]; + return NO; + } + + // Copy old content to new offscreen framebuffer + if (oldOffscreenTexture.get() || oldOffscreenRenderbuffer.get()) + { + if (_blitFramebufferAvail) + { + ScopedFramebuffer tempFBO; + gl::GenFramebuffers(1, &tempFBO.get()); + gl::BindFramebuffer(GL_READ_FRAMEBUFFER, tempFBO); + gl::FramebufferRenderbuffer(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, + oldOffscreenRenderbuffer); + + return [self blitFBO:tempFBO + sourceSize:oldOffscreenSize + toFBO:_defaultOpenGLFrameBufferID + destinationSize:_offscreenFBOSize + destinationMSAA:_drawableMultisample]; + } + return [self blitOffscreenTexture:oldOffscreenTexture toFBO:_defaultOpenGLFrameBufferID]; + } + + return YES; +} + +- (BOOL)createOffscreenRenderingResources +{ + auto version = reinterpret_cast(gl::GetString(GL_VERSION)); + auto exts = reinterpret_cast(gl::GetString(GL_EXTENSIONS)); + _isGLES3Plus = strstr(version, "OpenGL ES 3") != nullptr; + _drawBuffersAvail = _isGLES3Plus || strstr(exts, "GL_EXT_draw_buffers") != nullptr; + _blitFramebufferAvail = _isGLES3Plus || strstr(exts, "GL_ANGLE_framebuffer_blit") != nullptr; + + if (![self createOffscreenBlitVBO]) + { + return NO; + } + + if (![self createOffscreenBlitProgram]) + { + return NO; + } + + return [self createOffscreenFBO]; +} + +- (BOOL)createOffscreenFBO +{ + // Clear pending errors + gl::GetError(); + + _offscreenFBOCreatorContext = [MGLContext currentContext]; + _offscreenFBOSize = self.drawableSize; + + gl::GenFramebuffers(1, &_defaultOpenGLFrameBufferID); + + ScopedFBOBind bindFBO(_defaultOpenGLFrameBufferID); + + if (_blitFramebufferAvail) + { + if (![self createOffscreenRenderBuffer]) + { + return NO; + } + } + else + { + if (![self createOffscreenTexture]) + { + return NO; + } + } + + if (![self createOffscreenDepthStencilbuffer]) + { + return NO; + } + + if (gl::CheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) + { + // Fatal error + Throw(@"Offscreen texture is not complete"); + } + + return _defaultOpenGLFrameBufferID && gl::GetError() == GL_NO_ERROR; +} + +- (BOOL)createOffscreenDepthStencilbuffer +{ + // Clear pending errors + gl::GetError(); + + int depthBits = _drawableDepthFormat; + int stencilBits = _drawableStencilFormat; + + if (!depthBits && !stencilBits) + { + // No depth & stencil buffer + return YES; + } + + GLenum depthStencilFormat = 0; + if (depthBits && stencilBits) + { + depthStencilFormat = GL_DEPTH24_STENCIL8_OES; + } + else if (depthBits) + { + depthStencilFormat = GL_DEPTH_COMPONENT24_OES; + } + else if (stencilBits) + { + depthStencilFormat = GL_STENCIL_INDEX8; + } + + gl::GenRenderbuffers(1, &_offscreenDepthStencilBuffer); + ScopedRenderbufferBind bindRenderbuffer(_offscreenDepthStencilBuffer); + + if (_drawableMultisample) + { + gl::RenderbufferStorageMultisampleANGLE(GL_RENDERBUFFER, _drawableMultisample, + depthStencilFormat, + static_cast(_offscreenFBOSize.width), + static_cast(_offscreenFBOSize.height)); + } + else + { + gl::RenderbufferStorage(GL_RENDERBUFFER, depthStencilFormat, + static_cast(_offscreenFBOSize.width), + static_cast(_offscreenFBOSize.height)); + } + + if (depthBits) + { + gl::FramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, + _offscreenDepthStencilBuffer); + } + if (stencilBits) + { + gl::FramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, + _offscreenDepthStencilBuffer); + } + + return _offscreenDepthStencilBuffer && gl::GetError() == GL_NO_ERROR; +} + +// Offscreen renderbuffer is used when glBlitFramebuffer is available. +- (BOOL)createOffscreenRenderBuffer +{ + ASSERT(_blitFramebufferAvail); + + // Clear pending errors + gl::GetError(); + + GLenum sizedFormat; + switch (_drawableColorFormat) + { + case MGLDrawableColorFormatRGBA8888: + case MGLDrawableColorFormatRGB565: + sizedFormat = GL_RGBA8_OES; + _offscreenColorUnsizedFormat = GL_RGBA; + _offscreenColorFormatDataType = GL_UNSIGNED_BYTE; + break; + case MGLDrawableColorFormatSRGBA8888: + sizedFormat = GL_SRGB8_ALPHA8_EXT; + _offscreenColorUnsizedFormat = GL_SRGB_ALPHA_EXT; + _offscreenColorFormatDataType = GL_UNSIGNED_BYTE; + break; + default: + UNREACHABLE(); + break; + } + + gl::GenRenderbuffers(1, &_offscreenRenderBuffer); + ScopedRenderbufferBind bindRenderbuffer(_offscreenRenderBuffer); + + if (_drawableMultisample) + { + gl::RenderbufferStorageMultisampleANGLE(GL_RENDERBUFFER, _drawableMultisample, sizedFormat, + static_cast(_offscreenFBOSize.width), + static_cast(_offscreenFBOSize.height)); + } + else + { + gl::RenderbufferStorage(GL_RENDERBUFFER, sizedFormat, + static_cast(_offscreenFBOSize.width), + static_cast(_offscreenFBOSize.height)); + } + + gl::FramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, + _offscreenRenderBuffer); + + return _offscreenRenderBuffer && gl::GetError() == GL_NO_ERROR; +} + +// Offscreen texture is used when glBlitFramebuffer is NOT available. +- (BOOL)createOffscreenTexture +{ + ASSERT(!_blitFramebufferAvail); + + // Clear pending errors + gl::GetError(); + + gl::GenTextures(1, &_offscreenTexture); + + ScopedTextureBind bindTexture(_offscreenTexture); + + GLenum textureSizedFormat; + GLenum textureFormat; + GLenum type; + switch (_drawableColorFormat) + { + case MGLDrawableColorFormatRGBA8888: + case MGLDrawableColorFormatRGB565: + textureSizedFormat = GL_RGBA8_OES; + textureFormat = GL_RGBA; + type = GL_UNSIGNED_BYTE; + case MGLDrawableColorFormatSRGBA8888: + textureSizedFormat = GL_SRGB8_ALPHA8_EXT; + textureFormat = GL_SRGB_ALPHA_EXT; + type = GL_UNSIGNED_BYTE; + break; + default: + UNREACHABLE(); + break; + } + + _offscreenColorUnsizedFormat = textureFormat; + _offscreenColorFormatDataType = type; + + if (rx::IsMetalDisplayAvailable()) + { + gl::TexStorage2DEXT(GL_TEXTURE_2D, 1, textureSizedFormat, + static_cast(_offscreenFBOSize.width), + static_cast(_offscreenFBOSize.height)); + } + else + { + gl::TexImage2D( + GL_TEXTURE_2D, 0, textureFormat, static_cast(_offscreenFBOSize.width), + static_cast(_offscreenFBOSize.height), 0, textureFormat, type, nullptr); + } + + gl::TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + gl::TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + gl::TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + gl::TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + + if (_drawableMultisample) + { + gl::FramebufferTexture2DMultisampleEXT(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, + _offscreenTexture, 0, _drawableMultisample); + } + else + { + gl::FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, + _offscreenTexture, 0); + } + + return _offscreenTexture && gl::GetError() == GL_NO_ERROR; +} + +- (BOOL)verifyOffscreenFBOSize +{ + if (!_defaultOpenGLFrameBufferID) + { + return YES; + } + + return static_cast(_offscreenFBOSize.width) == + static_cast(self.drawableSize.width) && + static_cast(_offscreenFBOSize.height) == + static_cast(self.drawableSize.height); +} + +- (BOOL)createOffscreenBlitProgram +{ + GLenum vshader, fshader; + if (!CompileShader(GL_VERTEX_SHADER, kBlitVS, &vshader)) + { + return NO; + } + + if (!CompileShader(GL_FRAGMENT_SHADER, kBlitFS, &fshader)) + { + return NO; + } + + _offscreenBlitProgram = gl::CreateProgram(); + gl::AttachShader(_offscreenBlitProgram, vshader); + gl::AttachShader(_offscreenBlitProgram, fshader); + gl::BindAttribLocation(_offscreenBlitProgram, 0, "aPosition"); + + if (!LinkProgram(_offscreenBlitProgram)) + { + return NO; + } + GLint textureLocation = -1; + textureLocation = gl::GetUniformLocation(_offscreenBlitProgram, "uTexture"); + ASSERT(textureLocation != -1); + + ScopedProgramBind bindProgram(_offscreenBlitProgram); + gl::Uniform1i(textureLocation, 0); + + return YES; +} + +- (BOOL)createOffscreenBlitVBO +{ + // Clear pending errors + gl::GetError(); + + constexpr float kBlitVertices[] = {-1, 1, -1, -1, 1, 1, 1, -1}; + + gl::GenVertexArraysOES(1, &_offscreenBlitVAO); + gl::GenBuffers(1, &_offscreenBlitVBO); + ScopedVAOBind bindVAO(_offscreenBlitVAO); + ScopedBufferBind bindVBO(_offscreenBlitVBO); + gl::BufferData(GL_ARRAY_BUFFER, sizeof(kBlitVertices), kBlitVertices, GL_STATIC_DRAW); + + gl::EnableVertexAttribArray(0); + gl::VertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 0, 0); + + return _offscreenBlitVAO && _offscreenBlitVBO && gl::GetError() == GL_NO_ERROR; +} + +@end diff --git a/libs/openFrameworksCompiled/lib/ios/.gitkeep b/libs/openFrameworksCompiled/lib/ios/.gitkeep deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/libs/openFrameworksCompiled/project/ios/CoreOF.xcconfig b/libs/openFrameworksCompiled/project/ios/CoreOF.xcconfig index 2ed8d12c31c..5690515fe68 100644 --- a/libs/openFrameworksCompiled/project/ios/CoreOF.xcconfig +++ b/libs/openFrameworksCompiled/project/ios/CoreOF.xcconfig @@ -25,8 +25,13 @@ HEADER_PUGIXML = "$(OF_PATH)/libs/pugixml/include" HEADER_UNICODE = "$(OF_PATH)/libs/utf8/include" -HEADER_METAL = "$(OF_PATH)/libs/metal/include" -HEADER_METAL_THIRD = "$(OF_PATH)/libs/metal/include_thirdparty" +HEADER_METAL = "$(OF_PATH)/libs/metalangle/include" +HEADER_METAL_THIRD = "$(OF_PATH)/libs/metalangle/include_thirdparty" +HEADER_METAL_SRC = "$(OF_PATH)/libs/metalangle/include/src" +HEADER_METAL_BASE_SRC = "$(OF_PATH)/libs/metalangle/include/src/common/third_party/base" + +HEADER_METAL_GLSLANG_SRC = "$(OF_PATH)/libs/metalangle/include/third_party/glslang/src" +HEADER_METAL_SPIRVCROSS_SRC = "$(OF_PATH)/libs/metalangle/include/third_party/spirv-cross/src" //------- Libraries LIB_OF = "$(OF_PATH)/libs/openFrameworksCompiled/lib/ios/libofxiOS_${PLATFORM_NAME}_${CONFIGURATION}.a" @@ -42,7 +47,7 @@ MISC_FLAGS = "-ObjC" OF_CORE_LIBS = $(MISC_FLAGS) $(LIB_OF) -OF_CORE_HEADERS = $(HEADER_OF) $(HEADER_OFXIOS) $(HEADER_UTF8) $(HEADER_FREETYPE) $(HEADER_FREETYPE2) $(HEADER_GLEW) $(HEADER_FREEIMAGE) $(HEADER_TESS2) $(HEADER_RTAUDIO) $(HEADER_JSON) $(HEADER_GLM) $(HEADER_FMT) $(HEADER_CURL) $(HEADER_URIPARSER) $(HEADER_PUGIXML) $(HEADER_UNICODE) $(HEADER_METAL) $(HEADER_METAL_THIRD) +OF_CORE_HEADERS = $(HEADER_OF) $(HEADER_OFXIOS) $(HEADER_UTF8) $(HEADER_FREETYPE) $(HEADER_FREETYPE2) $(HEADER_GLEW) $(HEADER_FREEIMAGE) $(HEADER_TESS2) $(HEADER_RTAUDIO) $(HEADER_JSON) $(HEADER_GLM) $(HEADER_FMT) $(HEADER_CURL) $(HEADER_URIPARSER) $(HEADER_PUGIXML) $(HEADER_UNICODE) $(HEADER_METAL) $(HEADER_METAL_THIRD) $(HEADER_METAL_SRC) $(HEADER_METAL_BASE_SRC) $(HEADER_METAL_GLSLANG_SRC) $(HEADER_METAL_SPIRVCROSS_SRC) OF_CORE_LIBS = $(MISC_FLAGS) $(LIB_FREEIMAGE) $(LIB_FREETYPE) $(LIB_OPENSSL) $(LIB_TESS) $(LIB_CURL) $(LIB_URIPARSER) $(LIB_PUGIXML) $(LIB_OF) diff --git a/libs/openFrameworksCompiled/project/ios/iOS+OFLib.xcodeproj/project.pbxproj b/libs/openFrameworksCompiled/project/ios/iOS+OFLib.xcodeproj/project.pbxproj index ceb30e13f51..28ab4743efe 100644 --- a/libs/openFrameworksCompiled/project/ios/iOS+OFLib.xcodeproj/project.pbxproj +++ b/libs/openFrameworksCompiled/project/ios/iOS+OFLib.xcodeproj/project.pbxproj @@ -125,6 +125,28 @@ BB24DED110DA7A3F00E9C588 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BB16EBD80F2B2AB500518274 /* QuartzCore.framework */; }; BF2B781A2C7E6CF000EAAD6E /* ES3Renderer.m in Sources */ = {isa = PBXBuildFile; fileRef = BF2B78182C7E6CF000EAAD6E /* ES3Renderer.m */; }; BF2B781B2C7E6CF000EAAD6E /* ES3Renderer.h in Headers */ = {isa = PBXBuildFile; fileRef = BF2B78192C7E6CF000EAAD6E /* ES3Renderer.h */; }; + BF3E028A2CE66D830022E17F /* EAMLKView.h in Headers */ = {isa = PBXBuildFile; fileRef = BF3E02872CE66D830022E17F /* EAMLKView.h */; }; + BF3E028B2CE66D830022E17F /* EAMLKView.mm in Sources */ = {isa = PBXBuildFile; fileRef = BF3E02882CE66D830022E17F /* EAMLKView.mm */; }; + BF443C922CE6F000005B6CCB /* metalangle.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF3E028C2CE66E670022E17F /* metalangle.xcframework */; }; + BF443C942CE6F01B005B6CCB /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF443C932CE6F01B005B6CCB /* Metal.framework */; }; + BF443CA82CE6F0DC005B6CCB /* MGLLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = BF443CA42CE6F0DC005B6CCB /* MGLLayer.h */; }; + BF443CA92CE6F0DC005B6CCB /* MGLContext.h in Headers */ = {isa = PBXBuildFile; fileRef = BF443C952CE6F0DC005B6CCB /* MGLContext.h */; }; + BF443CAA2CE6F0DC005B6CCB /* MGLDisplay.h in Headers */ = {isa = PBXBuildFile; fileRef = BF443C982CE6F0DC005B6CCB /* MGLDisplay.h */; }; + BF443CAB2CE6F0DC005B6CCB /* MGLKViewController+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = BF443CA32CE6F0DC005B6CCB /* MGLKViewController+Private.h */; }; + BF443CAC2CE6F0DC005B6CCB /* MGLKViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = BF443C9F2CE6F0DC005B6CCB /* MGLKViewController.h */; }; + BF443CAD2CE6F0DC005B6CCB /* MGLKit.h in Headers */ = {isa = PBXBuildFile; fileRef = BF443C9A2CE6F0DC005B6CCB /* MGLKit.h */; }; + BF443CAE2CE6F0DC005B6CCB /* MGLContext+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = BF443C972CE6F0DC005B6CCB /* MGLContext+Private.h */; }; + BF443CAF2CE6F0DC005B6CCB /* MGLKitPlatform.h in Headers */ = {isa = PBXBuildFile; fileRef = BF443C9B2CE6F0DC005B6CCB /* MGLKitPlatform.h */; }; + BF443CB02CE6F0DC005B6CCB /* MGLKView.h in Headers */ = {isa = PBXBuildFile; fileRef = BF443C9C2CE6F0DC005B6CCB /* MGLKView.h */; }; + BF443CB12CE6F0DC005B6CCB /* MGLLayer+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = BF443CA62CE6F0DC005B6CCB /* MGLLayer+Private.h */; }; + BF443CB22CE6F0DC005B6CCB /* MGLKView+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = BF443C9E2CE6F0DC005B6CCB /* MGLKView+Private.h */; }; + BF443CB32CE6F0DC005B6CCB /* MGLKViewController+iOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = BF443CA12CE6F0DC005B6CCB /* MGLKViewController+iOS.mm */; }; + BF443CB42CE6F0DC005B6CCB /* MGLContext.mm in Sources */ = {isa = PBXBuildFile; fileRef = BF443C962CE6F0DC005B6CCB /* MGLContext.mm */; }; + BF443CB52CE6F0DC005B6CCB /* MGLLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = BF443CA52CE6F0DC005B6CCB /* MGLLayer.mm */; }; + BF443CB62CE6F0DC005B6CCB /* MGLKViewController+Mac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BF443CA22CE6F0DC005B6CCB /* MGLKViewController+Mac.mm */; platformFilter = maccatalyst; settings = {COMPILER_FLAGS = "-fobjc-arc -fexceptions -fvisibility=default"; }; }; + BF443CB72CE6F0DC005B6CCB /* MGLKView.mm in Sources */ = {isa = PBXBuildFile; fileRef = BF443C9D2CE6F0DC005B6CCB /* MGLKView.mm */; }; + BF443CB82CE6F0DC005B6CCB /* MGLDisplay.mm in Sources */ = {isa = PBXBuildFile; fileRef = BF443C992CE6F0DC005B6CCB /* MGLDisplay.mm */; }; + BF443CB92CE6F0DC005B6CCB /* MGLKViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = BF443CA02CE6F0DC005B6CCB /* MGLKViewController.mm */; settings = {COMPILER_FLAGS = "-fobjc-arc -fexceptions -fvisibility=default"; }; }; BFB0B4042C50E019008FB5A3 /* brotli.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = BFEC5C022C4FFC5900728DEC /* brotli.xcframework */; }; BFB0B4052C50E019008FB5A3 /* openssl.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = BFEC5C002C4FFC3A00728DEC /* openssl.xcframework */; }; BFB0B4062C50E019008FB5A3 /* curl.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF4730B02BA4056B00E6E3C6 /* curl.xcframework */; }; @@ -136,6 +158,10 @@ BFB0B40C2C50E019008FB5A3 /* freetype.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF7E590D2BA204D300E5C52E /* freetype.xcframework */; }; BFB0B40D2C50E019008FB5A3 /* fmt.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF7E590B2BA204BC00E5C52E /* fmt.xcframework */; }; BFB0B40E2C50E019008FB5A3 /* FreeImage.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF7E59052BA203BC00E5C52E /* FreeImage.xcframework */; }; + BFBCA8462D2E2B2000816ADC /* ofxiOSMLKView.mm in Sources */ = {isa = PBXBuildFile; fileRef = BFBCA8432D2E2B2000816ADC /* ofxiOSMLKView.mm */; }; + BFBCA8472D2E2B2000816ADC /* ofxiOSMLKViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = BFBCA8452D2E2B2000816ADC /* ofxiOSMLKViewController.mm */; }; + BFBCA8482D2E2B2000816ADC /* ofxiOSMLKView.h in Headers */ = {isa = PBXBuildFile; fileRef = BFBCA8422D2E2B2000816ADC /* ofxiOSMLKView.h */; }; + BFBCA8492D2E2B2000816ADC /* ofxiOSMLKViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = BFBCA8442D2E2B2000816ADC /* ofxiOSMLKViewController.h */; }; E4F76E19176CB27200798745 /* of3dPrimitives.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76D6F176CB27200798745 /* of3dPrimitives.cpp */; }; E4F76E1A176CB27200798745 /* of3dPrimitives.h in Headers */ = {isa = PBXBuildFile; fileRef = E4F76D70176CB27200798745 /* of3dPrimitives.h */; }; E4F76E1B176CB27200798745 /* of3dUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4F76D71176CB27200798745 /* of3dUtils.cpp */; }; @@ -371,6 +397,28 @@ BBE5EAB70F49AD8400F28951 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; BF2B78182C7E6CF000EAAD6E /* ES3Renderer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ES3Renderer.m; sourceTree = ""; }; BF2B78192C7E6CF000EAAD6E /* ES3Renderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ES3Renderer.h; sourceTree = ""; }; + BF3E02872CE66D830022E17F /* EAMLKView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EAMLKView.h; sourceTree = ""; }; + BF3E02882CE66D830022E17F /* EAMLKView.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = EAMLKView.mm; sourceTree = ""; }; + BF3E028C2CE66E670022E17F /* metalangle.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = metalangle.xcframework; path = ../../../metalangle/lib/macos/metalangle.xcframework; sourceTree = ""; }; + BF443C932CE6F01B005B6CCB /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.1.sdk/System/Library/Frameworks/Metal.framework; sourceTree = DEVELOPER_DIR; }; + BF443C952CE6F0DC005B6CCB /* MGLContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MGLContext.h; sourceTree = ""; }; + BF443C962CE6F0DC005B6CCB /* MGLContext.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLContext.mm; sourceTree = ""; }; + BF443C972CE6F0DC005B6CCB /* MGLContext+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MGLContext+Private.h"; sourceTree = ""; }; + BF443C982CE6F0DC005B6CCB /* MGLDisplay.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MGLDisplay.h; sourceTree = ""; }; + BF443C992CE6F0DC005B6CCB /* MGLDisplay.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLDisplay.mm; sourceTree = ""; }; + BF443C9A2CE6F0DC005B6CCB /* MGLKit.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MGLKit.h; sourceTree = ""; }; + BF443C9B2CE6F0DC005B6CCB /* MGLKitPlatform.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MGLKitPlatform.h; sourceTree = ""; }; + BF443C9C2CE6F0DC005B6CCB /* MGLKView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MGLKView.h; sourceTree = ""; }; + BF443C9D2CE6F0DC005B6CCB /* MGLKView.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLKView.mm; sourceTree = ""; }; + BF443C9E2CE6F0DC005B6CCB /* MGLKView+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MGLKView+Private.h"; sourceTree = ""; }; + BF443C9F2CE6F0DC005B6CCB /* MGLKViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MGLKViewController.h; sourceTree = ""; }; + BF443CA02CE6F0DC005B6CCB /* MGLKViewController.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLKViewController.mm; sourceTree = ""; }; + BF443CA12CE6F0DC005B6CCB /* MGLKViewController+iOS.mm */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; path = "MGLKViewController+iOS.mm"; sourceTree = ""; }; + BF443CA22CE6F0DC005B6CCB /* MGLKViewController+Mac.mm */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; path = "MGLKViewController+Mac.mm"; sourceTree = ""; }; + BF443CA32CE6F0DC005B6CCB /* MGLKViewController+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MGLKViewController+Private.h"; sourceTree = ""; }; + BF443CA42CE6F0DC005B6CCB /* MGLLayer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MGLLayer.h; sourceTree = ""; }; + BF443CA52CE6F0DC005B6CCB /* MGLLayer.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MGLLayer.mm; sourceTree = ""; }; + BF443CA62CE6F0DC005B6CCB /* MGLLayer+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MGLLayer+Private.h"; sourceTree = ""; }; BF4730B02BA4056B00E6E3C6 /* curl.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = curl.xcframework; path = ../../../curl/lib/macos/curl.xcframework; sourceTree = ""; }; BF7E59052BA203BC00E5C52E /* FreeImage.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = FreeImage.xcframework; path = ../../../FreeImage/lib/macos/FreeImage.xcframework; sourceTree = ""; }; BF7E590B2BA204BC00E5C52E /* fmt.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = fmt.xcframework; path = ../../../fmt/lib/macos/fmt.xcframework; sourceTree = ""; }; @@ -380,6 +428,10 @@ BF7E59192BA2054700E5C52E /* tess2.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = tess2.xcframework; path = ../../../tess2/lib/macos/tess2.xcframework; sourceTree = ""; }; BF7E591B2BA2056600E5C52E /* uriparser.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = uriparser.xcframework; path = ../../../uriparser/lib/macos/uriparser.xcframework; sourceTree = ""; }; BF7E591D2BA2057900E5C52E /* zlib.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = zlib.xcframework; path = ../../../zlib/lib/macos/zlib.xcframework; sourceTree = ""; }; + BFBCA8422D2E2B2000816ADC /* ofxiOSMLKView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ofxiOSMLKView.h; sourceTree = ""; }; + BFBCA8432D2E2B2000816ADC /* ofxiOSMLKView.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = ofxiOSMLKView.mm; sourceTree = ""; }; + BFBCA8442D2E2B2000816ADC /* ofxiOSMLKViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ofxiOSMLKViewController.h; sourceTree = ""; }; + BFBCA8452D2E2B2000816ADC /* ofxiOSMLKViewController.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = ofxiOSMLKViewController.mm; sourceTree = ""; }; BFEC5C002C4FFC3A00728DEC /* openssl.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = openssl.xcframework; path = ../../../openssl/lib/macos/openssl.xcframework; sourceTree = ""; }; BFEC5C022C4FFC5900728DEC /* brotli.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = brotli.xcframework; path = ../../../brotli/lib/macos/brotli.xcframework; sourceTree = ""; }; E41D3E9013B38BE900A75A5D /* CoreOF.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = CoreOF.xcconfig; sourceTree = SOURCE_ROOT; }; @@ -502,6 +554,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + BF443C942CE6F01B005B6CCB /* Metal.framework in Frameworks */, + BF443C922CE6F000005B6CCB /* metalangle.xcframework in Frameworks */, 99752D331BF21EEE0026316A /* GameController.framework in Frameworks */, 67D48ED01C10399900F719BC /* CoreMotion.framework in Frameworks */, BB24DECA10DA7A3F00E9C588 /* AudioToolbox.framework in Frameworks */, @@ -642,6 +696,10 @@ 15594F8A15C56A4E00727FF2 /* core */ = { isa = PBXGroup; children = ( + BFBCA8422D2E2B2000816ADC /* ofxiOSMLKView.h */, + BFBCA8432D2E2B2000816ADC /* ofxiOSMLKView.mm */, + BFBCA8442D2E2B2000816ADC /* ofxiOSMLKViewController.h */, + BFBCA8452D2E2B2000816ADC /* ofxiOSMLKViewController.mm */, 15594F8F15C56A8A00727FF2 /* ofxiOSAppDelegate.h */, 15594F8C15C56A8A00727FF2 /* ofxiOSAppDelegate.mm */, 15594F8E15C56A8A00727FF2 /* ofxiOSEAGLView.h */, @@ -725,6 +783,7 @@ BB24E02310DA7C6100E9C588 /* ofxiOS */ = { isa = PBXGroup; children = ( + BF3E02892CE66D830022E17F /* metal */, BB24E02810DA7C6100E9C588 /* src */, ); name = ofxiOS; @@ -756,6 +815,42 @@ name = core; sourceTree = ""; }; + BF3E02892CE66D830022E17F /* metal */ = { + isa = PBXGroup; + children = ( + BF443CA72CE6F0DC005B6CCB /* MGLKit */, + BF3E02872CE66D830022E17F /* EAMLKView.h */, + BF3E02882CE66D830022E17F /* EAMLKView.mm */, + ); + name = metal; + path = src/metal; + sourceTree = ""; + }; + BF443CA72CE6F0DC005B6CCB /* MGLKit */ = { + isa = PBXGroup; + children = ( + BF443C952CE6F0DC005B6CCB /* MGLContext.h */, + BF443C962CE6F0DC005B6CCB /* MGLContext.mm */, + BF443C972CE6F0DC005B6CCB /* MGLContext+Private.h */, + BF443C982CE6F0DC005B6CCB /* MGLDisplay.h */, + BF443C992CE6F0DC005B6CCB /* MGLDisplay.mm */, + BF443C9A2CE6F0DC005B6CCB /* MGLKit.h */, + BF443C9B2CE6F0DC005B6CCB /* MGLKitPlatform.h */, + BF443C9C2CE6F0DC005B6CCB /* MGLKView.h */, + BF443C9D2CE6F0DC005B6CCB /* MGLKView.mm */, + BF443C9E2CE6F0DC005B6CCB /* MGLKView+Private.h */, + BF443C9F2CE6F0DC005B6CCB /* MGLKViewController.h */, + BF443CA02CE6F0DC005B6CCB /* MGLKViewController.mm */, + BF443CA12CE6F0DC005B6CCB /* MGLKViewController+iOS.mm */, + BF443CA22CE6F0DC005B6CCB /* MGLKViewController+Mac.mm */, + BF443CA32CE6F0DC005B6CCB /* MGLKViewController+Private.h */, + BF443CA42CE6F0DC005B6CCB /* MGLLayer.h */, + BF443CA52CE6F0DC005B6CCB /* MGLLayer.mm */, + BF443CA62CE6F0DC005B6CCB /* MGLLayer+Private.h */, + ); + path = MGLKit; + sourceTree = ""; + }; E4F76D69176CB27200798745 /* openFrameworks */ = { isa = PBXGroup; children = ( @@ -995,6 +1090,8 @@ E9F39181299E892200280B58 /* Frameworks */ = { isa = PBXGroup; children = ( + BF443C932CE6F01B005B6CCB /* Metal.framework */, + BF3E028C2CE66E670022E17F /* metalangle.xcframework */, BFEC5C022C4FFC5900728DEC /* brotli.xcframework */, BFEC5C002C4FFC3A00728DEC /* openssl.xcframework */, BF4730B02BA4056B00E6E3C6 /* curl.xcframework */, @@ -1021,8 +1118,11 @@ E4F76E1A176CB27200798745 /* of3dPrimitives.h in Headers */, E4F76E1C176CB27200798745 /* of3dUtils.h in Headers */, E999E70E299D53FC00649F18 /* ofxiOSCoreHaptics.h in Headers */, + BFBCA8482D2E2B2000816ADC /* ofxiOSMLKView.h in Headers */, + BFBCA8492D2E2B2000816ADC /* ofxiOSMLKViewController.h in Headers */, E4F76E1E176CB27200798745 /* ofCamera.h in Headers */, E4F76E20176CB27200798745 /* ofEasyCam.h in Headers */, + BF3E028A2CE66D830022E17F /* EAMLKView.h in Headers */, E4F76E22176CB27200798745 /* ofMesh.h in Headers */, E4F76E24176CB27200798745 /* ofNode.h in Headers */, 67833F8419F8990D00DBE7AA /* ofFpsCounter.h in Headers */, @@ -1033,6 +1133,17 @@ E4F76E37176CB27200798745 /* ofEvents.h in Headers */, E4F76E38176CB27200798745 /* ofEventUtils.h in Headers */, 67D48ED31C103BAE00F719BC /* ofxiOSCoreMotion.h in Headers */, + BF443CA82CE6F0DC005B6CCB /* MGLLayer.h in Headers */, + BF443CA92CE6F0DC005B6CCB /* MGLContext.h in Headers */, + BF443CAA2CE6F0DC005B6CCB /* MGLDisplay.h in Headers */, + BF443CAB2CE6F0DC005B6CCB /* MGLKViewController+Private.h in Headers */, + BF443CAC2CE6F0DC005B6CCB /* MGLKViewController.h in Headers */, + BF443CAD2CE6F0DC005B6CCB /* MGLKit.h in Headers */, + BF443CAE2CE6F0DC005B6CCB /* MGLContext+Private.h in Headers */, + BF443CAF2CE6F0DC005B6CCB /* MGLKitPlatform.h in Headers */, + BF443CB02CE6F0DC005B6CCB /* MGLKView.h in Headers */, + BF443CB12CE6F0DC005B6CCB /* MGLLayer+Private.h in Headers */, + BF443CB22CE6F0DC005B6CCB /* MGLKView+Private.h in Headers */, E4F76E3A176CB27200798745 /* ofFbo.h in Headers */, E4F76E3C176CB27200798745 /* ofGLProgrammableRenderer.h in Headers */, E4F76E3E176CB27200798745 /* ofGLRenderer.h in Headers */, @@ -1246,6 +1357,8 @@ E4F76E41176CB27200798745 /* ofLight.cpp in Sources */, E4F76E43176CB27200798745 /* ofMaterial.cpp in Sources */, E4F76E45176CB27200798745 /* ofShader.cpp in Sources */, + BFBCA8462D2E2B2000816ADC /* ofxiOSMLKView.mm in Sources */, + BFBCA8472D2E2B2000816ADC /* ofxiOSMLKViewController.mm in Sources */, E4F76E49176CB27200798745 /* ofTexture.cpp in Sources */, E999E70F299D53FC00649F18 /* ofxiOSCoreHaptics.mm in Sources */, E4F76E4B176CB27200798745 /* ofVbo.cpp in Sources */, @@ -1258,6 +1371,13 @@ E4F76E59176CB27200798745 /* ofPath.cpp in Sources */, E4F76E5B176CB27200798745 /* ofPixels.cpp in Sources */, E4F76E5F176CB27200798745 /* ofRendererCollection.cpp in Sources */, + BF443CB32CE6F0DC005B6CCB /* MGLKViewController+iOS.mm in Sources */, + BF443CB42CE6F0DC005B6CCB /* MGLContext.mm in Sources */, + BF443CB52CE6F0DC005B6CCB /* MGLLayer.mm in Sources */, + BF443CB62CE6F0DC005B6CCB /* MGLKViewController+Mac.mm in Sources */, + BF443CB72CE6F0DC005B6CCB /* MGLKView.mm in Sources */, + BF443CB82CE6F0DC005B6CCB /* MGLDisplay.mm in Sources */, + BF443CB92CE6F0DC005B6CCB /* MGLKViewController.mm in Sources */, E4F76E61176CB27200798745 /* ofTessellator.cpp in Sources */, E4F76E63176CB27200798745 /* ofTrueTypeFont.cpp in Sources */, E4F76E65176CB27200798745 /* ofMath.cpp in Sources */, @@ -1311,6 +1431,7 @@ 67833F8A19F8996300DBE7AA /* ofBufferObject.cpp in Sources */, 1594366415CF5F420087B684 /* ofxiOSVideoGrabber.mm in Sources */, 1594366515CF5F420087B684 /* ofxiOSVideoPlayer.mm in Sources */, + BF3E028B2CE66D830022E17F /* EAMLKView.mm in Sources */, 678C3D24176F04F800D1CC68 /* ofxiOSSoundStream.mm in Sources */, 678C3D26176F04F800D1CC68 /* ofxiOSSoundStreamDelegate.mm in Sources */, 678C3D28176F04F800D1CC68 /* SoundInputStream.m in Sources */, diff --git a/libs/openFrameworksCompiled/project/ios/iOS+OFLib.xcodeproj/xcshareddata/xcschemes/iPhone+OF Static Library.xcscheme b/libs/openFrameworksCompiled/project/ios/iOS+OFLib.xcodeproj/xcshareddata/xcschemes/iPhone+OF Static Library.xcscheme index e8c1cd4018d..04abf825ae7 100644 --- a/libs/openFrameworksCompiled/project/ios/iOS+OFLib.xcodeproj/xcshareddata/xcschemes/iPhone+OF Static Library.xcscheme +++ b/libs/openFrameworksCompiled/project/ios/iOS+OFLib.xcodeproj/xcshareddata/xcschemes/iPhone+OF Static Library.xcscheme @@ -16,7 +16,7 @@ BuildableIdentifier = "primary" BlueprintIdentifier = "BB24DE5C10DA7A3F00E9C588" BuildableName = "libofxiOS_iphoneos_Debug.a" - BlueprintName = "iPhone+OF Static Library" + BlueprintName = "iOS+OF Static Library" ReferencedContainer = "container:iOS+OFLib.xcodeproj"> @@ -52,7 +52,7 @@ BuildableIdentifier = "primary" BlueprintIdentifier = "BB24DE5C10DA7A3F00E9C588" BuildableName = "libofxiOS_iphoneos_Debug.a" - BlueprintName = "iPhone+OF Static Library" + BlueprintName = "iOS+OF Static Library" ReferencedContainer = "container:iOS+OFLib.xcodeproj"> diff --git a/scripts/templates/ios/emptyExample.xcodeproj/project.pbxproj b/scripts/templates/ios/emptyExample.xcodeproj/project.pbxproj index 389205d11e4..b8dc1fa6519 100644 --- a/scripts/templates/ios/emptyExample.xcodeproj/project.pbxproj +++ b/scripts/templates/ios/emptyExample.xcodeproj/project.pbxproj @@ -1,645 +1,482 @@ +// !$*UTF8*$! { - "classes": {}, - "objectVersion": "46", - "archiveVersion": "1", - "objects": { - "5326AEA710A23A0500278DE6": { - "path": "System/Library/Frameworks/CoreLocation.framework", - "isa": "PBXFileReference", - "name": "CoreLocation.framework", - "lastKnownFileType": "wrapper.framework", - "sourceTree": "SDKROOT" - }, - "BBE5EAB80F49AD8400F28951": { - "isa": "PBXBuildFile", - "fileRef": "BBE5EAB70F49AD8400F28951" - }, - "BB16EBD90F2B2AB500518274": { - "isa": "PBXBuildFile", - "fileRef": "BB16EBD80F2B2AB500518274" - }, - "E41D3EE513B3906D00A75A5D": { - "path": "../../../libs/openFrameworksCompiled/project/ios/CoreOF.xcconfig", - "isa": "PBXFileReference", - "lastKnownFileType": "text.xcconfig", - "name": "CoreOF.xcconfig", - "sourceTree": "SOURCE_ROOT", - "fileEncoding": "4" - }, - "1D6058910D05DD3D006BFB54": { - "path": "emptyExample.app", - "isa": "PBXFileReference", - "includeInIndex": "0", - "explicitFileType": "wrapper.application", - "sourceTree": "BUILT_PRODUCTS_DIR" - }, - "19C28FACFE9D520D11CA2CBB": { - "isa": "PBXGroup", - "name": "Products", - "children": [ - "1D6058910D05DD3D006BFB54" - ], - "sourceTree": "" - }, - "1D60588E0D05DD3D006BFB54": { - "isa": "PBXSourcesBuildPhase", - "buildActionMask": "2147483647", - "files": [ - "E4D8936E11527B74007E1F53", - "E4D8936F11527B74007E1F53" - ], - "runOnlyForDeploymentPostprocessing": "0" - }, - "BB24DDC910DA781C00E9C588": { - "path": "ofxiOS-Info.plist", - "isa": "PBXFileReference", - "lastKnownFileType": "text.plist.xml", - "sourceTree": "", - "fileEncoding": "4" - }, - "1D6058940D05DD3E006BFB54": { - "isa": "XCBuildConfiguration", - "buildSettings": { - "GCC_PREFIX_HEADER": "ofxiOS_Prefix.pch", - "ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME": "", - "TARGETED_DEVICE_FAMILY": "1,2", - "INFOPLIST_FILE": "ofxiOS-Info.plist", - "GCC_WARN_64_TO_32_BIT_CONVERSION[arch=*64]": "NO", - "ALWAYS_SEARCH_USER_PATHS": "NO", - "HEADER_SEARCH_PATHS": [ - "$(OF_CORE_HEADERS)", - "src" - ], - "PRODUCT_NAME": "${TARGET_NAME}", - "VALID_ARCHS": "$(ARCHS_STANDARD)", - "GCC_PRECOMPILE_PREFIX_HEADER": "YES", - "FRAMEWORK_SEARCH_PATHS": [ - "$(inherited)", - "$(PROJECT_DIR)" - ], - "ASSETCATALOG_COMPILER_APPICON_NAME": "AppIcon", - "OTHER_LDFLAGS": [ - "$(OF_CORE_LIBS)", - "$(OF_CORE_FRAMEWORKS)" - ] - }, - "name": "Debug" - }, - "E41D410213B3A0D800A75A5D": { - "path": "libofxiOS_iphoneos_Debug.a", - "isa": "PBXReferenceProxy", - "fileType": "archive.ar", - "remoteRef": "E41D410113B3A0D800A75A5D", - "sourceTree": "BUILT_PRODUCTS_DIR" - }, - "9936F6121BFA65F100891288": { - "isa": "PBXBuildFile", - "fileRef": "9936F6111BFA65F100891288" - }, - "67DFA53619F92A69003B3434": { - "isa": "PBXBuildFile", - "fileRef": "67DFA53419F92A5E003B3434" - }, - "288765FD0DF74451002DB57D": { - "isa": "PBXBuildFile", - "fileRef": "288765FC0DF74451002DB57D" - }, - "E4D8936D11527B74007E1F53": { - "path": "src/ofApp.mm", - "isa": "PBXFileReference", - "lastKnownFileType": "sourcecode.cpp.objcpp", - "name": "ofApp.mm", - "sourceTree": "SOURCE_ROOT", - "fileEncoding": "4" - }, - "C01FCF4F08A954540054247B": { - "baseConfigurationReference": "E41D3ED613B38FB500A75A5D", - "isa": "XCBuildConfiguration", - "buildSettings": { - "VALID_ARCHS": "$(ARCHS_STANDARD)", - "GCC_WARN_ABOUT_RETURN_TYPE": "YES", - "ONLY_ACTIVE_ARCH": "YES", - "GCC_SYMBOLS_PRIVATE_EXTERN": "NO", - "GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO": "NO", - "COMPRESS_PNG_FILES": "NO", - "GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL": "NO", - "GCC_OPTIMIZATION_LEVEL": "0", - "GCC_C_LANGUAGE_STANDARD": "c17", - "TARGETED_DEVICE_FAMILY": "1", - "GCC_WARN_PROTOTYPE_CONVERSION": "NO", - "GCC_WARN_64_TO_32_BIT_CONVERSION[arch=*64]": "NO", - "ALWAYS_SEARCH_USER_PATHS": "YES", - "PROVISIONING_PROFILE[sdk=iphoneos*]": "", - "SDKROOT": "iphoneos", - "CODE_SIGN_IDENTITY[sdk=iphoneos*]": "iPhone Developer", - "CODE_SIGN_IDENTITY": "", - "WARNING_LDFLAGS": "-no_arch_warnings", - "GCC_WARN_ABOUT_POINTER_SIGNEDNESS": "NO", - "CLANG_CXX_LIBRARY": "libc++", - "CODE_SIGN_IDENTITY[sdk=iphonesimulator*]": "", - "GCC_WARN_UNUSED_VARIABLE": "YES" - }, - "name": "Debug" - }, - "901808BF2053636F004A7774": { - "path": "System/Library/Frameworks/GLKit.framework", - "isa": "PBXFileReference", - "name": "GLKit.framework", - "lastKnownFileType": "wrapper.framework", - "sourceTree": "SDKROOT" - }, - "E41D400D13B39D2100A75A5D": { - "isa": "PBXBuildFile", - "fileRef": "E41D400813B39D2100A75A5D" - }, - "53F323EB10A20EDB00E0DAE4": { - "isa": "PBXBuildFile", - "fileRef": "53F323EA10A20EDB00E0DAE4" - }, - "901808C02053638E004A7774": { - "isa": "PBXGroup", - "name": "Frameworks", - "children": [], - "sourceTree": "" - }, - "6948EE371B920CB800B5AC1A": { - "isa": "PBXGroup", - "name": "local_addons", - "children": [], - "sourceTree": "" - }, - "E4D8936A11527B74007E1F53": { - "path": "src", - "isa": "PBXGroup", - "children": [ - "E4D8936B11527B74007E1F53", - "E4D8936D11527B74007E1F53", - "E4D8936C11527B74007E1F53" - ], - "sourceTree": "SOURCE_ROOT" - }, - "29B97313FDCFA39411CA2CEA": { - "projectReferences": [ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; }; + 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; }; + 288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765FC0DF74451002DB57D /* CoreGraphics.framework */; }; + 5326AEA810A23A0500278DE6 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5326AEA710A23A0500278DE6 /* CoreLocation.framework */; }; + 53F323EB10A20EDB00E0DAE4 /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 53F323EA10A20EDB00E0DAE4 /* OpenAL.framework */; }; + 67DFA53619F92A69003B3434 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 67DFA53419F92A5E003B3434 /* Accelerate.framework */; }; + 901808C12053638E004A7774 /* GLKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 901808BF2053636F004A7774 /* GLKit.framework */; }; + 9936F6101BFA4DEE00891288 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9936F60F1BFA4DEE00891288 /* Images.xcassets */; }; + 9936F6121BFA65F100891288 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9936F6111BFA65F100891288 /* LaunchScreen.storyboard */; }; + 9969E7561C782C4500DEF0F6 /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9969E7551C782C4500DEF0F6 /* CoreMotion.framework */; }; + BB16EBD20F2B2A9500518274 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BB16EBD10F2B2A9500518274 /* OpenGLES.framework */; }; + BB16EBD90F2B2AB500518274 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BB16EBD80F2B2AB500518274 /* QuartzCore.framework */; }; + BBE5EAB80F49AD8400F28951 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBE5EAB70F49AD8400F28951 /* AudioToolbox.framework */; }; + BF3E02862CE64C2D0022E17F /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF3E02852CE64C2D0022E17F /* Metal.framework */; }; + BF3E02962CE66F9C0022E17F /* metalangle.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = BF3E02952CE66F9C0022E17F /* metalangle.xcframework */; settings = {ATTRIBUTES = (Required, ); }; }; + E41D400B13B39D2100A75A5D /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E41D400613B39D2100A75A5D /* AVFoundation.framework */; }; + E41D400C13B39D2100A75A5D /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E41D400713B39D2100A75A5D /* CoreMedia.framework */; }; + E41D400D13B39D2100A75A5D /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E41D400813B39D2100A75A5D /* CoreVideo.framework */; }; + E41D400E13B39D2100A75A5D /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E41D400913B39D2100A75A5D /* MapKit.framework */; }; + E4D8936E11527B74007E1F53 /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = E4D8936B11527B74007E1F53 /* main.mm */; }; + E4D8936F11527B74007E1F53 /* ofApp.mm in Sources */ = {isa = PBXBuildFile; fileRef = E4D8936D11527B74007E1F53 /* ofApp.mm */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + E41D410113B3A0D800A75A5D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = E41D40FD13B3A0D800A75A5D /* iOS+OFLib.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = BB24DED610DA7A3F00E9C588; + remoteInfo = "iPhone+OF Static Library"; + }; + E41D410313B3A11300A75A5D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = E41D40FD13B3A0D800A75A5D /* iOS+OFLib.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = BB24DE5C10DA7A3F00E9C588; + remoteInfo = "iPhone+OF Static Library"; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 1D6058910D05DD3D006BFB54 /* emptyExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = emptyExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 288765FC0DF74451002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + 32CA4F630368D1EE00C91783 /* ofxiOS_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxiOS_Prefix.pch; sourceTree = ""; }; + 5326AEA710A23A0500278DE6 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; }; + 53F323EA10A20EDB00E0DAE4 /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; }; + 67DFA53419F92A5E003B3434 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; + 901808BF2053636F004A7774 /* GLKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLKit.framework; path = System/Library/Frameworks/GLKit.framework; sourceTree = SDKROOT; }; + 9936F60F1BFA4DEE00891288 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; + 9936F6111BFA65F100891288 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; }; + 9969E7551C782C4500DEF0F6 /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; }; + BB16EBD10F2B2A9500518274 /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; + BB16EBD80F2B2AB500518274 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; + BB24DDC910DA781C00E9C588 /* ofxiOS-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "ofxiOS-Info.plist"; sourceTree = ""; }; + BBE5EAB70F49AD8400F28951 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; + BF3E02852CE64C2D0022E17F /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = System/Library/Frameworks/Metal.framework; sourceTree = SDKROOT; }; + BF3E02952CE66F9C0022E17F /* metalangle.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = metalangle.xcframework; path = ../../../libs/metalangle/lib/macos/metalangle.xcframework; sourceTree = ""; }; + E41D3ED613B38FB500A75A5D /* Project.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Project.xcconfig; sourceTree = ""; }; + E41D3EE513B3906D00A75A5D /* CoreOF.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = CoreOF.xcconfig; path = ../../../libs/openFrameworksCompiled/project/ios/CoreOF.xcconfig; sourceTree = SOURCE_ROOT; }; + E41D400613B39D2100A75A5D /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; + E41D400713B39D2100A75A5D /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; + E41D400813B39D2100A75A5D /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = System/Library/Frameworks/CoreVideo.framework; sourceTree = SDKROOT; }; + E41D400913B39D2100A75A5D /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; }; + E41D40FD13B3A0D800A75A5D /* iOS+OFLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = "iOS+OFLib.xcodeproj"; path = "../../../libs/openFrameworksCompiled/project/ios/iOS+OFLib.xcodeproj"; sourceTree = SOURCE_ROOT; }; + E4A823A312561BE3002F86A2 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + E4D8936B11527B74007E1F53 /* main.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = main.mm; path = src/main.mm; sourceTree = SOURCE_ROOT; }; + E4D8936C11527B74007E1F53 /* ofApp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ofApp.h; path = src/ofApp.h; sourceTree = SOURCE_ROOT; }; + E4D8936D11527B74007E1F53 /* ofApp.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ofApp.mm; path = src/ofApp.mm; sourceTree = SOURCE_ROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + BF3E02862CE64C2D0022E17F /* Metal.framework in Frameworks */, + 9969E7561C782C4500DEF0F6 /* CoreMotion.framework in Frameworks */, + 901808C12053638E004A7774 /* GLKit.framework in Frameworks */, + 1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */, + 1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */, + 288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */, + BB16EBD20F2B2A9500518274 /* OpenGLES.framework in Frameworks */, + BB16EBD90F2B2AB500518274 /* QuartzCore.framework in Frameworks */, + BF3E02962CE66F9C0022E17F /* metalangle.xcframework in Frameworks */, + BBE5EAB80F49AD8400F28951 /* AudioToolbox.framework in Frameworks */, + 53F323EB10A20EDB00E0DAE4 /* OpenAL.framework in Frameworks */, + 5326AEA810A23A0500278DE6 /* CoreLocation.framework in Frameworks */, + E41D400B13B39D2100A75A5D /* AVFoundation.framework in Frameworks */, + E41D400C13B39D2100A75A5D /* CoreMedia.framework in Frameworks */, + E41D400D13B39D2100A75A5D /* CoreVideo.framework in Frameworks */, + E41D400E13B39D2100A75A5D /* MapKit.framework in Frameworks */, + 67DFA53619F92A69003B3434 /* Accelerate.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 1D6058910D05DD3D006BFB54 /* emptyExample.app */, + ); + name = Products; + sourceTree = ""; + }; + 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { + isa = PBXGroup; + children = ( + 9936F60E1BFA4DEE00891288 /* mediaAssets */, + E4D8936A11527B74007E1F53 /* src */, + BB24E1F710DAA51900E9C588 /* openFrameworks */, + BB16F26B0F2B646B00518274 /* addons */, + BB16E9930F2B1E5900518274 /* libs */, + 19C28FACFE9D520D11CA2CBB /* Products */, + 901808C02053638E004A7774 /* Frameworks */, + ); + name = CustomTemplate; + sourceTree = ""; + }; + 29B97323FDCFA39411CA2CEA /* core frameworks */ = { + isa = PBXGroup; + children = ( + 67DFA53419F92A5E003B3434 /* Accelerate.framework */, + 901808BF2053636F004A7774 /* GLKit.framework */, + BBE5EAB70F49AD8400F28951 /* AudioToolbox.framework */, + E41D400613B39D2100A75A5D /* AVFoundation.framework */, + E4A823A312561BE3002F86A2 /* CoreGraphics.framework */, + 5326AEA710A23A0500278DE6 /* CoreLocation.framework */, + E41D400713B39D2100A75A5D /* CoreMedia.framework */, + 9969E7551C782C4500DEF0F6 /* CoreMotion.framework */, + E41D400813B39D2100A75A5D /* CoreVideo.framework */, + 1D30AB110D05D00D00671497 /* Foundation.framework */, + E41D400913B39D2100A75A5D /* MapKit.framework */, + 53F323EA10A20EDB00E0DAE4 /* OpenAL.framework */, + BB16EBD10F2B2A9500518274 /* OpenGLES.framework */, + BB16EBD80F2B2AB500518274 /* QuartzCore.framework */, + 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */, + 288765FC0DF74451002DB57D /* CoreGraphics.framework */, + ); + name = "core frameworks"; + sourceTree = ""; + }; + 6948EE371B920CB800B5AC1A /* local_addons */ = { + isa = PBXGroup; + children = ( + ); + name = local_addons; + sourceTree = ""; + }; + 901808C02053638E004A7774 /* Frameworks */ = { + isa = PBXGroup; + children = ( + BF3E02952CE66F9C0022E17F /* metalangle.xcframework */, + BF3E02852CE64C2D0022E17F /* Metal.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 9936F60E1BFA4DEE00891288 /* mediaAssets */ = { + isa = PBXGroup; + children = ( + 9936F6111BFA65F100891288 /* LaunchScreen.storyboard */, + 9936F60F1BFA4DEE00891288 /* Images.xcassets */, + ); + path = mediaAssets; + sourceTree = ""; + }; + BB16E9930F2B1E5900518274 /* libs */ = { + isa = PBXGroup; + children = ( + BBE5E94E0F497BD800F28951 /* core */, + ); + name = libs; + sourceTree = ""; + }; + BB16F26B0F2B646B00518274 /* addons */ = { + isa = PBXGroup; + children = ( + ); + name = addons; + path = ../../../addons; + sourceTree = SOURCE_ROOT; + }; + BB24E1F710DAA51900E9C588 /* openFrameworks */ = { + isa = PBXGroup; + children = ( + E41D40FD13B3A0D800A75A5D /* iOS+OFLib.xcodeproj */, + 32CA4F630368D1EE00C91783 /* ofxiOS_Prefix.pch */, + BB24DDC910DA781C00E9C588 /* ofxiOS-Info.plist */, + E41D3EE513B3906D00A75A5D /* CoreOF.xcconfig */, + 6948EE371B920CB800B5AC1A /* local_addons */, + E41D3ED613B38FB500A75A5D /* Project.xcconfig */, + ); + name = openFrameworks; + sourceTree = ""; + }; + BBE5E94E0F497BD800F28951 /* core */ = { + isa = PBXGroup; + children = ( + 29B97323FDCFA39411CA2CEA /* core frameworks */, + ); + name = core; + sourceTree = ""; + }; + E41D40FE13B3A0D800A75A5D /* Products */ = { + isa = PBXGroup; + children = ( + E41D410213B3A0D800A75A5D /* libofxiOS_iphoneos_Debug.a */, + ); + name = Products; + sourceTree = ""; + }; + E4D8936A11527B74007E1F53 /* src */ = { + isa = PBXGroup; + children = ( + E4D8936B11527B74007E1F53 /* main.mm */, + E4D8936D11527B74007E1F53 /* ofApp.mm */, + E4D8936C11527B74007E1F53 /* ofApp.h */, + ); + path = src; + sourceTree = SOURCE_ROOT; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 1D6058900D05DD3D006BFB54 /* emptyExample */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "emptyExample" */; + buildPhases = ( + 1D60588D0D05DD3D006BFB54 /* Resources */, + 1D60588E0D05DD3D006BFB54 /* Sources */, + 1D60588F0D05DD3D006BFB54 /* Frameworks */, + 9255DD331112741900D6945E /* ShellScript */, + ); + buildRules = ( + ); + dependencies = ( + E41D410413B3A11300A75A5D /* PBXTargetDependency */, + ); + name = emptyExample; + productName = iPhone; + productReference = 1D6058910D05DD3D006BFB54 /* emptyExample.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0600; + }; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "emptyExample" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = en; + hasScannedForEncodings = 1; + knownRegions = ( + en, + Base, + ); + mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; + projectDirPath = ""; + projectReferences = ( { - "ProjectRef": "E41D40FD13B3A0D800A75A5D", - "ProductGroup": "E41D40FE13B3A0D800A75A5D" - } - ], - "buildConfigurationList": "C01FCF4E08A954540054247B", - "targets": [ - "1D6058900D05DD3D006BFB54" - ], - "developmentRegion": "en", - "knownRegions": [ - "en", - "Base" - ], - "isa": "PBXProject", - "compatibilityVersion": "Xcode 3.2", - "projectDirPath": "", - "attributes": { - "LastUpgradeCheck": "0600" - }, - "hasScannedForEncodings": "1", - "projectRoot": "", - "mainGroup": "29B97314FDCFA39411CA2CEA" - }, - "9969E7551C782C4500DEF0F6": { - "path": "System/Library/Frameworks/CoreMotion.framework", - "isa": "PBXFileReference", - "name": "CoreMotion.framework", - "lastKnownFileType": "wrapper.framework", - "sourceTree": "SDKROOT" - }, - "29B97323FDCFA39411CA2CEA": { - "isa": "PBXGroup", - "name": "core frameworks", - "children": [ - "67DFA53419F92A5E003B3434", - "901808BF2053636F004A7774", - "BBE5EAB70F49AD8400F28951", - "E41D400613B39D2100A75A5D", - "E4A823A312561BE3002F86A2", - "5326AEA710A23A0500278DE6", - "E41D400713B39D2100A75A5D", - "9969E7551C782C4500DEF0F6", - "E41D400813B39D2100A75A5D", - "1D30AB110D05D00D00671497", - "E41D400913B39D2100A75A5D", - "53F323EA10A20EDB00E0DAE4", - "BB16EBD10F2B2A9500518274", - "BB16EBD80F2B2AB500518274", - "1DF5F4DF0D08C38300B7A737", - "288765FC0DF74451002DB57D" - ], - "sourceTree": "" - }, - "E41D400713B39D2100A75A5D": { - "path": "System/Library/Frameworks/CoreMedia.framework", - "isa": "PBXFileReference", - "name": "CoreMedia.framework", - "lastKnownFileType": "wrapper.framework", - "sourceTree": "SDKROOT" - }, - "9936F6101BFA4DEE00891288": { - "isa": "PBXBuildFile", - "fileRef": "9936F60F1BFA4DEE00891288" - }, - "1DF5F4E00D08C38300B7A737": { - "isa": "PBXBuildFile", - "fileRef": "1DF5F4DF0D08C38300B7A737" - }, - "BB16EBD10F2B2A9500518274": { - "path": "System/Library/Frameworks/OpenGLES.framework", - "isa": "PBXFileReference", - "name": "OpenGLES.framework", - "lastKnownFileType": "wrapper.framework", - "sourceTree": "SDKROOT" - }, - "1D30AB110D05D00D00671497": { - "path": "System/Library/Frameworks/Foundation.framework", - "isa": "PBXFileReference", - "name": "Foundation.framework", - "lastKnownFileType": "wrapper.framework", - "sourceTree": "SDKROOT" - }, - "5326AEA810A23A0500278DE6": { - "isa": "PBXBuildFile", - "fileRef": "5326AEA710A23A0500278DE6" - }, - "1D60588F0D05DD3D006BFB54": { - "isa": "PBXFrameworksBuildPhase", - "buildActionMask": "2147483647", - "files": [ - "9969E7561C782C4500DEF0F6", - "901808C12053638E004A7774", - "1D60589F0D05DD5A006BFB54", - "1DF5F4E00D08C38300B7A737", - "288765FD0DF74451002DB57D", - "BB16EBD20F2B2A9500518274", - "BB16EBD90F2B2AB500518274", - "BBE5EAB80F49AD8400F28951", - "53F323EB10A20EDB00E0DAE4", - "5326AEA810A23A0500278DE6", - "E41D400B13B39D2100A75A5D", - "E41D400C13B39D2100A75A5D", - "E41D400D13B39D2100A75A5D", - "E41D400E13B39D2100A75A5D", - "67DFA53619F92A69003B3434" - ], - "runOnlyForDeploymentPostprocessing": "0" - }, - "1D6058950D05DD3E006BFB54": { - "isa": "XCBuildConfiguration", - "buildSettings": { - "OTHER_LDFLAGS": [ - "$(OF_CORE_LIBS)", - "$(OF_CORE_FRAMEWORKS)" - ], - "ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME": "", - "TARGETED_DEVICE_FAMILY": "1,2", - "INFOPLIST_FILE": "ofxiOS-Info.plist", - "GCC_WARN_64_TO_32_BIT_CONVERSION[arch=*64]": "NO", - "HEADER_SEARCH_PATHS": [ + ProductGroup = E41D40FE13B3A0D800A75A5D /* Products */; + ProjectRef = E41D40FD13B3A0D800A75A5D /* iOS+OFLib.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 1D6058900D05DD3D006BFB54 /* emptyExample */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + E41D410213B3A0D800A75A5D /* libofxiOS_iphoneos_Debug.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libofxiOS_iphoneos_Debug.a; + remoteRef = E41D410113B3A0D800A75A5D /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 1D60588D0D05DD3D006BFB54 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 9936F6101BFA4DEE00891288 /* Images.xcassets in Resources */, + 9936F6121BFA65F100891288 /* LaunchScreen.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 9255DD331112741900D6945E /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "rsync -avz --exclude='.DS_Store' \"${SRCROOT}/bin/data/\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}\"\n"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 1D60588E0D05DD3D006BFB54 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E4D8936E11527B74007E1F53 /* main.mm in Sources */, + E4D8936F11527B74007E1F53 /* ofApp.mm in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + E41D410413B3A11300A75A5D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "iPhone+OF Static Library"; + targetProxy = E41D410313B3A11300A75A5D /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 1D6058940D05DD3E006BFB54 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = ""; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)", + ); + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = ofxiOS_Prefix.pch; + "GCC_WARN_64_TO_32_BIT_CONVERSION[arch=*64]" = NO; + HEADER_SEARCH_PATHS = ( "$(OF_CORE_HEADERS)", - "src" - ], - "PRODUCT_NAME": "${TARGET_NAME}", - "VALID_ARCHS": "$(ARCHS_STANDARD)", - "FRAMEWORK_SEARCH_PATHS": [ + src, + ); + INFOPLIST_FILE = "ofxiOS-Info.plist"; + OTHER_LDFLAGS = ( + "$(OF_CORE_LIBS)", + "$(OF_CORE_FRAMEWORKS)", + ); + PRODUCT_NAME = "${TARGET_NAME}"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALID_ARCHS = "$(ARCHS_STANDARD)"; + }; + name = Debug; + }; + 1D6058950D05DD3E006BFB54 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = ""; + FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", - "$(PROJECT_DIR)" - ], - "GCC_PRECOMPILE_PREFIX_HEADER": "YES", - "ASSETCATALOG_COMPILER_APPICON_NAME": "AppIcon", - "GCC_PREFIX_HEADER": "ofxiOS_Prefix.pch" - }, - "name": "Release" - }, - "E4D8936E11527B74007E1F53": { - "isa": "PBXBuildFile", - "fileRef": "E4D8936B11527B74007E1F53" - }, - "E41D3ED613B38FB500A75A5D": { - "path": "Project.xcconfig", - "isa": "PBXFileReference", - "lastKnownFileType": "text.xcconfig", - "sourceTree": "", - "fileEncoding": "4" - }, - "9255DD331112741900D6945E": { - "inputPaths": [], - "shellPath": "/bin/sh", - "buildActionMask": "2147483647", - "isa": "PBXShellScriptBuildPhase", - "outputPaths": [], - "runOnlyForDeploymentPostprocessing": "0", - "shellScript": "rsync -avz --exclude='.DS_Store' \"${SRCROOT}/bin/data/\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}\"\n", - "files": [] - }, - "32CA4F630368D1EE00C91783": { - "path": "ofxiOS_Prefix.pch", - "isa": "PBXFileReference", - "lastKnownFileType": "sourcecode.c.h", - "sourceTree": "", - "fileEncoding": "4" - }, - "E41D400E13B39D2100A75A5D": { - "isa": "PBXBuildFile", - "fileRef": "E41D400913B39D2100A75A5D" - }, - "901808C12053638E004A7774": { - "isa": "PBXBuildFile", - "fileRef": "901808BF2053636F004A7774" - }, - "E4D8936B11527B74007E1F53": { - "path": "src/main.mm", - "isa": "PBXFileReference", - "lastKnownFileType": "sourcecode.cpp.objcpp", - "name": "main.mm", - "sourceTree": "SOURCE_ROOT", - "fileEncoding": "4" - }, - "29B97314FDCFA39411CA2CEA": { - "isa": "PBXGroup", - "name": "CustomTemplate", - "children": [ - "9936F60E1BFA4DEE00891288", - "E4D8936A11527B74007E1F53", - "BB24E1F710DAA51900E9C588", - "BB16F26B0F2B646B00518274", - "BB16E9930F2B1E5900518274", - "19C28FACFE9D520D11CA2CBB", - "901808C02053638E004A7774" - ], - "sourceTree": "" - }, - "9969E7561C782C4500DEF0F6": { - "isa": "PBXBuildFile", - "fileRef": "9969E7551C782C4500DEF0F6" - }, - "E41D410313B3A11300A75A5D": { - "isa": "PBXContainerItemProxy", - "containerPortal": "E41D40FD13B3A0D800A75A5D", - "remoteGlobalIDString": "BB24DE5C10DA7A3F00E9C588", - "remoteInfo": "iPhone+OF Static Library", - "proxyType": "1" - }, - "E4A823A312561BE3002F86A2": { - "path": "System/Library/Frameworks/CoreGraphics.framework", - "isa": "PBXFileReference", - "name": "CoreGraphics.framework", - "lastKnownFileType": "wrapper.framework", - "sourceTree": "SDKROOT" - }, - "9936F60E1BFA4DEE00891288": { - "path": "mediaAssets", - "isa": "PBXGroup", - "children": [ - "9936F6111BFA65F100891288", - "9936F60F1BFA4DEE00891288" - ], - "sourceTree": "" - }, - "E41D400B13B39D2100A75A5D": { - "isa": "PBXBuildFile", - "fileRef": "E41D400613B39D2100A75A5D" - }, - "E41D400813B39D2100A75A5D": { - "path": "System/Library/Frameworks/CoreVideo.framework", - "isa": "PBXFileReference", - "name": "CoreVideo.framework", - "lastKnownFileType": "wrapper.framework", - "sourceTree": "SDKROOT" - }, - "BBE5E94E0F497BD800F28951": { - "isa": "PBXGroup", - "name": "core", - "children": [ - "29B97323FDCFA39411CA2CEA" - ], - "sourceTree": "" - }, - "C01FCF5008A954540054247B": { - "baseConfigurationReference": "E41D3ED613B38FB500A75A5D", - "isa": "XCBuildConfiguration", - "buildSettings": { - "VALID_ARCHS": "$(ARCHS_STANDARD)", - "GCC_GENERATE_DEBUGGING_SYMBOLS": "NO", - "GCC_WARN_ABOUT_RETURN_TYPE": "YES", - "ONLY_ACTIVE_ARCH": "NO", - "GCC_SYMBOLS_PRIVATE_EXTERN": "NO", - "COMPRESS_PNG_FILES": "NO", - "GCC_OPTIMIZATION_LEVEL": "s", - "GCC_THUMB_SUPPORT": "NO", - "GCC_C_LANGUAGE_STANDARD": "c11", - "TARGETED_DEVICE_FAMILY": "1", - "GCC_WARN_64_TO_32_BIT_CONVERSION[arch=*64]": "NO", - "ALWAYS_SEARCH_USER_PATHS": "YES", - "SDKROOT": "iphoneos", - "WARNING_LDFLAGS": "-no_arch_warnings", - "CODE_SIGN_IDENTITY": "", - "GCC_DYNAMIC_NO_PIC": "NO", - "CODE_SIGN_IDENTITY[sdk=iphoneos*]": "iPhone Developer", - "CLANG_CXX_LIBRARY": "libc++", - "CODE_SIGN_IDENTITY[sdk=iphonesimulator*]": "", - "GCC_WARN_UNUSED_VARIABLE": "YES" - }, - "name": "Release" - }, - "BB16EBD20F2B2A9500518274": { - "isa": "PBXBuildFile", - "fileRef": "BB16EBD10F2B2A9500518274" - }, - "1D60589F0D05DD5A006BFB54": { - "isa": "PBXBuildFile", - "fileRef": "1D30AB110D05D00D00671497" - }, - "1D6058960D05DD3E006BFB54": { - "isa": "XCConfigurationList", - "defaultConfigurationIsVisible": "0", - "defaultConfigurationName": "Release", - "buildConfigurations": [ - "1D6058940D05DD3E006BFB54", - "1D6058950D05DD3E006BFB54" - ] - }, - "E41D40FD13B3A0D800A75A5D": { - "path": "../../../libs/openFrameworksCompiled/project/ios/iOS+OFLib.xcodeproj", - "isa": "PBXFileReference", - "name": "iOS+OFLib.xcodeproj", - "lastKnownFileType": "wrapper.pb-project", - "sourceTree": "SOURCE_ROOT" - }, - "BB16F26B0F2B646B00518274": { - "path": "../../../addons", - "isa": "PBXGroup", - "name": "addons", - "children": [], - "sourceTree": "SOURCE_ROOT" - }, - "E4D8936F11527B74007E1F53": { - "isa": "PBXBuildFile", - "fileRef": "E4D8936D11527B74007E1F53" - }, - "1D60588D0D05DD3D006BFB54": { - "isa": "PBXResourcesBuildPhase", - "buildActionMask": "2147483647", - "files": [ - "9936F6101BFA4DEE00891288", - "9936F6121BFA65F100891288" - ], - "runOnlyForDeploymentPostprocessing": "0" - }, - "BBE5EAB70F49AD8400F28951": { - "path": "System/Library/Frameworks/AudioToolbox.framework", - "isa": "PBXFileReference", - "name": "AudioToolbox.framework", - "lastKnownFileType": "wrapper.framework", - "sourceTree": "SDKROOT" - }, - "BB16EBD80F2B2AB500518274": { - "path": "System/Library/Frameworks/QuartzCore.framework", - "isa": "PBXFileReference", - "name": "QuartzCore.framework", - "lastKnownFileType": "wrapper.framework", - "sourceTree": "SDKROOT" - }, - "1D6058900D05DD3D006BFB54": { - "buildConfigurationList": "1D6058960D05DD3E006BFB54", - "productReference": "1D6058910D05DD3D006BFB54", - "productType": "com.apple.product-type.application", - "productName": "iPhone", - "isa": "PBXNativeTarget", - "buildPhases": [ - "1D60588D0D05DD3D006BFB54", - "1D60588E0D05DD3D006BFB54", - "1D60588F0D05DD3D006BFB54", - "9255DD331112741900D6945E" - ], - "dependencies": [ - "E41D410413B3A11300A75A5D" - ], - "name": "emptyExample", - "buildRules": [] - }, - "BB24E1F710DAA51900E9C588": { - "isa": "PBXGroup", - "name": "openFrameworks", - "children": [ - "E41D40FD13B3A0D800A75A5D", - "32CA4F630368D1EE00C91783", - "BB24DDC910DA781C00E9C588", - "E41D3EE513B3906D00A75A5D", - "6948EE371B920CB800B5AC1A", - "E41D3ED613B38FB500A75A5D" - ], - "sourceTree": "" - }, - "E41D410113B3A0D800A75A5D": { - "isa": "PBXContainerItemProxy", - "containerPortal": "E41D40FD13B3A0D800A75A5D", - "remoteGlobalIDString": "BB24DED610DA7A3F00E9C588", - "remoteInfo": "iPhone+OF Static Library", - "proxyType": "2" - }, - "288765FC0DF74451002DB57D": { - "path": "System/Library/Frameworks/CoreGraphics.framework", - "isa": "PBXFileReference", - "name": "CoreGraphics.framework", - "lastKnownFileType": "wrapper.framework", - "sourceTree": "SDKROOT" - }, - "E4D8936C11527B74007E1F53": { - "path": "src/ofApp.h", - "isa": "PBXFileReference", - "lastKnownFileType": "sourcecode.c.h", - "name": "ofApp.h", - "sourceTree": "SOURCE_ROOT", - "fileEncoding": "4" - }, - "9936F6111BFA65F100891288": { - "path": "LaunchScreen.storyboard", - "isa": "PBXFileReference", - "lastKnownFileType": "file.storyboard", - "sourceTree": "", - "fileEncoding": "4" - }, - "C01FCF4E08A954540054247B": { - "isa": "XCConfigurationList", - "defaultConfigurationIsVisible": "0", - "defaultConfigurationName": "Release", - "buildConfigurations": [ - "C01FCF4F08A954540054247B", - "C01FCF5008A954540054247B" - ] - }, - "9936F60F1BFA4DEE00891288": { - "path": "Images.xcassets", - "isa": "PBXFileReference", - "lastKnownFileType": "folder.assetcatalog", - "sourceTree": "" - }, - "E41D400C13B39D2100A75A5D": { - "isa": "PBXBuildFile", - "fileRef": "E41D400713B39D2100A75A5D" - }, - "E41D400913B39D2100A75A5D": { - "path": "System/Library/Frameworks/MapKit.framework", - "isa": "PBXFileReference", - "name": "MapKit.framework", - "lastKnownFileType": "wrapper.framework", - "sourceTree": "SDKROOT" - }, - "1DF5F4DF0D08C38300B7A737": { - "path": "System/Library/Frameworks/UIKit.framework", - "isa": "PBXFileReference", - "name": "UIKit.framework", - "lastKnownFileType": "wrapper.framework", - "sourceTree": "SDKROOT" - }, - "53F323EA10A20EDB00E0DAE4": { - "path": "System/Library/Frameworks/OpenAL.framework", - "isa": "PBXFileReference", - "name": "OpenAL.framework", - "lastKnownFileType": "wrapper.framework", - "sourceTree": "SDKROOT" - }, - "67DFA53419F92A5E003B3434": { - "path": "System/Library/Frameworks/Accelerate.framework", - "isa": "PBXFileReference", - "name": "Accelerate.framework", - "lastKnownFileType": "wrapper.framework", - "sourceTree": "SDKROOT" - }, - "E41D410413B3A11300A75A5D": { - "isa": "PBXTargetDependency", - "name": "iPhone+OF Static Library", - "targetProxy": "E41D410313B3A11300A75A5D" - }, - "BB16E9930F2B1E5900518274": { - "isa": "PBXGroup", - "name": "libs", - "children": [ - "BBE5E94E0F497BD800F28951" - ], - "sourceTree": "" - }, - "E41D400613B39D2100A75A5D": { - "path": "System/Library/Frameworks/AVFoundation.framework", - "isa": "PBXFileReference", - "name": "AVFoundation.framework", - "lastKnownFileType": "wrapper.framework", - "sourceTree": "SDKROOT" - }, - "E41D40FE13B3A0D800A75A5D": { - "isa": "PBXGroup", - "name": "Products", - "children": [ - "E41D410213B3A0D800A75A5D" - ], - "sourceTree": "" - } - }, - "rootObject": "29B97313FDCFA39411CA2CEA" + "$(PROJECT_DIR)", + ); + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = ofxiOS_Prefix.pch; + "GCC_WARN_64_TO_32_BIT_CONVERSION[arch=*64]" = NO; + HEADER_SEARCH_PATHS = ( + "$(OF_CORE_HEADERS)", + src, + ); + INFOPLIST_FILE = "ofxiOS-Info.plist"; + OTHER_LDFLAGS = ( + "$(OF_CORE_LIBS)", + "$(OF_CORE_FRAMEWORKS)", + ); + PRODUCT_NAME = "${TARGET_NAME}"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALID_ARCHS = "$(ARCHS_STANDARD)"; + }; + name = Release; + }; + C01FCF4F08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = E41D3ED613B38FB500A75A5D /* Project.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + CLANG_CXX_LIBRARY = "libc++"; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphonesimulator*]" = ""; + COMPRESS_PNG_FILES = NO; + GCC_C_LANGUAGE_STANDARD = c17; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + "GCC_WARN_64_TO_32_BIT_CONVERSION[arch=*64]" = NO; + GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = NO; + GCC_WARN_ABOUT_POINTER_SIGNEDNESS = NO; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = NO; + GCC_WARN_PROTOTYPE_CONVERSION = NO; + GCC_WARN_UNUSED_VARIABLE = YES; + ONLY_ACTIVE_ARCH = YES; + "PROVISIONING_PROFILE[sdk=iphoneos*]" = ""; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = 1; + VALID_ARCHS = "$(ARCHS_STANDARD)"; + WARNING_LDFLAGS = "-no_arch_warnings"; + }; + name = Debug; + }; + C01FCF5008A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = E41D3ED613B38FB500A75A5D /* Project.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + CLANG_CXX_LIBRARY = "libc++"; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphonesimulator*]" = ""; + COMPRESS_PNG_FILES = NO; + GCC_C_LANGUAGE_STANDARD = c11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_OPTIMIZATION_LEVEL = s; + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_THUMB_SUPPORT = NO; + "GCC_WARN_64_TO_32_BIT_CONVERSION[arch=*64]" = NO; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + ONLY_ACTIVE_ARCH = NO; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = 1; + VALID_ARCHS = "$(ARCHS_STANDARD)"; + WARNING_LDFLAGS = "-no_arch_warnings"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "emptyExample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1D6058940D05DD3E006BFB54 /* Debug */, + 1D6058950D05DD3E006BFB54 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "emptyExample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4F08A954540054247B /* Debug */, + C01FCF5008A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; } From a4d0a3166ae28f8b56575fdd2c1054a9e10ea87e Mon Sep 17 00:00:00 2001 From: Dan Rosser Date: Tue, 14 Jan 2025 03:43:48 +1100 Subject: [PATCH 32/32] OF_METAL --- addons/ofxiOS/src/core/ofxiOSMLKView.mm | 3 + .../src/core/ofxiOSMLKViewController.mm | 2 + addons/ofxiOS/src/metal/EAMLKView.h | 2 +- addons/ofxiOS/src/metal/EAMLKView.mm | 4 +- .../src/metal/MGLKit/MGLContext+Private.h | 3 +- addons/ofxiOS/src/metal/MGLKit/MGLContext.h | 5 +- addons/ofxiOS/src/metal/MGLKit/MGLContext.mm | 4 + addons/ofxiOS/src/metal/MGLKit/MGLDisplay.h | 3 +- addons/ofxiOS/src/metal/MGLKit/MGLDisplay.mm | 3 +- .../src/metal/MGLKit/MGLKView+Private.h | 3 +- addons/ofxiOS/src/metal/MGLKit/MGLKView.h | 3 +- addons/ofxiOS/src/metal/MGLKit/MGLKView.mm | 240 +++++++++--------- .../metal/MGLKit/MGLKViewController+Mac.mm | 4 +- .../metal/MGLKit/MGLKViewController+Private.h | 3 +- .../metal/MGLKit/MGLKViewController+iOS.mm | 4 +- .../src/metal/MGLKit/MGLKViewController.h | 2 + .../src/metal/MGLKit/MGLKViewController.mm | 183 ++++++------- addons/ofxiOS/src/metal/MGLKit/MGLKit.h | 3 +- .../ofxiOS/src/metal/MGLKit/MGLKitPlatform.h | 3 +- .../src/metal/MGLKit/MGLLayer+Private.h | 3 +- addons/ofxiOS/src/metal/MGLKit/MGLLayer.h | 5 +- addons/ofxiOS/src/metal/MGLKit/MGLLayer.mm | 4 +- .../project/ios/CoreOF.xcconfig | 1 + 23 files changed, 263 insertions(+), 227 deletions(-) diff --git a/addons/ofxiOS/src/core/ofxiOSMLKView.mm b/addons/ofxiOS/src/core/ofxiOSMLKView.mm index 5803721d32d..8178437cff1 100644 --- a/addons/ofxiOS/src/core/ofxiOSMLKView.mm +++ b/addons/ofxiOS/src/core/ofxiOSMLKView.mm @@ -4,6 +4,7 @@ // // Created by Dan Rosser on 7/3/18. // +#if defined(OF_METAL) #include "ofxiOSMLKView.h" #include "ofxiOSApp.h" @@ -613,3 +614,5 @@ - (void)updateScaleFactor { @end + +#endif diff --git a/addons/ofxiOS/src/core/ofxiOSMLKViewController.mm b/addons/ofxiOS/src/core/ofxiOSMLKViewController.mm index 0ef11aa65e8..64f390a990d 100644 --- a/addons/ofxiOS/src/core/ofxiOSMLKViewController.mm +++ b/addons/ofxiOS/src/core/ofxiOSMLKViewController.mm @@ -6,6 +6,7 @@ // #include +#if defined(OF_METAL) #if TARGET_OS_IOS || (TARGET_OS_IPHONE && !TARGET_OS_TV) #import "ofxiOSMLKViewController.h" @@ -645,4 +646,5 @@ - (UIImage*)getSnapshot { +#endif #endif diff --git a/addons/ofxiOS/src/metal/EAMLKView.h b/addons/ofxiOS/src/metal/EAMLKView.h index fb9a8197bbf..819065fc668 100644 --- a/addons/ofxiOS/src/metal/EAMLKView.h +++ b/addons/ofxiOS/src/metal/EAMLKView.h @@ -79,4 +79,4 @@ @end -//#endif +#endif diff --git a/addons/ofxiOS/src/metal/EAMLKView.mm b/addons/ofxiOS/src/metal/EAMLKView.mm index bfeaae2e168..6790e815a18 100644 --- a/addons/ofxiOS/src/metal/EAMLKView.mm +++ b/addons/ofxiOS/src/metal/EAMLKView.mm @@ -6,7 +6,7 @@ // #include - +#if defined(OF_METAL) #import "EAMLKView.h" #import @@ -318,3 +318,5 @@ - (BOOL)canBecomeFirstResponder @end + +#endif diff --git a/addons/ofxiOS/src/metal/MGLKit/MGLContext+Private.h b/addons/ofxiOS/src/metal/MGLKit/MGLContext+Private.h index 6128090b9c0..30e0051a650 100644 --- a/addons/ofxiOS/src/metal/MGLKit/MGLContext+Private.h +++ b/addons/ofxiOS/src/metal/MGLKit/MGLContext+Private.h @@ -3,7 +3,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // - +#if defined(OF_METAL) #ifndef MGLContext_Private_h #define MGLContext_Private_h @@ -22,3 +22,4 @@ @end #endif /* MGLContext_Private_h */ +#endif diff --git a/addons/ofxiOS/src/metal/MGLKit/MGLContext.h b/addons/ofxiOS/src/metal/MGLKit/MGLContext.h index 6bd8b5dfa5c..7f484a6c821 100644 --- a/addons/ofxiOS/src/metal/MGLKit/MGLContext.h +++ b/addons/ofxiOS/src/metal/MGLKit/MGLContext.h @@ -6,6 +6,8 @@ #import "MGLLayer.h" +#if defined(OF_METAL) + #include "EGL/egl.h" NS_ASSUME_NONNULL_BEGIN @@ -50,5 +52,6 @@ typedef enum MGLRenderingAPI : int + (BOOL)setCurrentContext:(MGLContext *_Nullable)context forLayer:(MGLLayer *_Nullable)layer; @end - NS_ASSUME_NONNULL_END +#endif + diff --git a/addons/ofxiOS/src/metal/MGLKit/MGLContext.mm b/addons/ofxiOS/src/metal/MGLKit/MGLContext.mm index 01e37da2b03..4022c835f81 100644 --- a/addons/ofxiOS/src/metal/MGLKit/MGLContext.mm +++ b/addons/ofxiOS/src/metal/MGLKit/MGLContext.mm @@ -9,6 +9,8 @@ #import "MGLContext.h" #import "MGLContext+Private.h" +#if defined(OF_METAL) + #include #include @@ -314,3 +316,5 @@ - (BOOL)setCurrentContextForLayer:(MGLLayer *_Nullable)layer } @end + +#endif diff --git a/addons/ofxiOS/src/metal/MGLKit/MGLDisplay.h b/addons/ofxiOS/src/metal/MGLKit/MGLDisplay.h index b9109d8e24e..fa62af37733 100644 --- a/addons/ofxiOS/src/metal/MGLKit/MGLDisplay.h +++ b/addons/ofxiOS/src/metal/MGLKit/MGLDisplay.h @@ -3,7 +3,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // - +#if defined(OF_METAL) #ifndef MGLKitCommon_h #define MGLKitCommon_h @@ -23,3 +23,4 @@ @end #endif /* MGLKitCommon_h */ +#endif diff --git a/addons/ofxiOS/src/metal/MGLKit/MGLDisplay.mm b/addons/ofxiOS/src/metal/MGLKit/MGLDisplay.mm index 3417eebc255..68517c38c23 100644 --- a/addons/ofxiOS/src/metal/MGLKit/MGLDisplay.mm +++ b/addons/ofxiOS/src/metal/MGLKit/MGLDisplay.mm @@ -3,7 +3,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // - +#if defined(OF_METAL) #import "MGLDisplay.h" namespace @@ -89,3 +89,4 @@ - (id)init } @end +#endif diff --git a/addons/ofxiOS/src/metal/MGLKit/MGLKView+Private.h b/addons/ofxiOS/src/metal/MGLKit/MGLKView+Private.h index 217b25a1d2f..dc5ed79d9b0 100644 --- a/addons/ofxiOS/src/metal/MGLKit/MGLKView+Private.h +++ b/addons/ofxiOS/src/metal/MGLKit/MGLKView+Private.h @@ -3,7 +3,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // - +#if defined(OF_METAL) #ifndef MGLKView_Private_h #define MGLKView_Private_h @@ -19,3 +19,4 @@ @end #endif /* MGLKView_Private_h */ +#endif diff --git a/addons/ofxiOS/src/metal/MGLKit/MGLKView.h b/addons/ofxiOS/src/metal/MGLKit/MGLKView.h index 807de0f4d00..17f62e86814 100644 --- a/addons/ofxiOS/src/metal/MGLKit/MGLKView.h +++ b/addons/ofxiOS/src/metal/MGLKit/MGLKView.h @@ -3,7 +3,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // - +#if defined(OF_METAL) #ifndef MGLKView_h #define MGLKView_h @@ -66,3 +66,4 @@ //#define MGLKView ofxiOSMGLKView #endif /* MLKView_h */ +#endif diff --git a/addons/ofxiOS/src/metal/MGLKit/MGLKView.mm b/addons/ofxiOS/src/metal/MGLKit/MGLKView.mm index e6bfd6036df..873edead9ac 100644 --- a/addons/ofxiOS/src/metal/MGLKit/MGLKView.mm +++ b/addons/ofxiOS/src/metal/MGLKit/MGLKView.mm @@ -3,7 +3,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // - +#if defined(OF_METAL) #import "MGLKView+Private.h" #import "MGLKViewController+Private.h" @@ -175,125 +175,127 @@ - (uint32_t)defaultOpenGLFrameBufferID #if TARGET_OS_OSX - (void)viewDidMoveToWindow { - [super viewDidMoveToWindow]; + [super viewDidMoveToWindow]; #else -- (void)didMoveToWindow -{ - [super didMoveToWindow]; + - (void)didMoveToWindow + { + [super didMoveToWindow]; #endif - - // notify view controller - if (_controller) - { - [_controller viewDidMoveToWindow]; - } -} - -- (void)drawRect:(CGRect)rect -{ - if (_delegate) - { - [_delegate mglkView:self drawInRect:rect]; - } -} - -- (void)displayAndCapture:(uint8_t **)pPixels -{ - _drawing = YES; - if (_context) - { - if (![MGLContext setCurrentContext:_context forLayer:self.glLayer]) - { - Throw(@"Failed to setCurrentContext"); - } - } - - [self drawRect:self.bounds]; - - if (pPixels) - { - // Frame capture request - int width = static_cast(self.drawableSize.width); - int height = static_cast(self.drawableSize.height); - if (width && height) - { - // Capture framebuffer's content - *pPixels = new uint8_t[4 * width * height]; - GLint prevPackAlignment; - gl::GetIntegerv(GL_PACK_ALIGNMENT, &prevPackAlignment); - gl::PixelStorei(GL_PACK_ALIGNMENT, 1); - - // Clear errors - gl::GetError(); - - gl::ReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, *pPixels); - - gl::PixelStorei(GL_PACK_ALIGNMENT, prevPackAlignment); - - // Clear errors - gl::GetError(); - } - else - { - *pPixels = nullptr; - } - } // if (pPixels) - - if (![_context present:self.glLayer]) - { - Throw(@"Failed to present framebuffer"); - } - _drawing = NO; -} - + + // notify view controller + if (_controller) + { + [_controller viewDidMoveToWindow]; + } + } + + - (void)drawRect:(CGRect)rect + { + if (_delegate) + { + [_delegate mglkView:self drawInRect:rect]; + } + } + + - (void)displayAndCapture:(uint8_t **)pPixels + { + _drawing = YES; + if (_context) + { + if (![MGLContext setCurrentContext:_context forLayer:self.glLayer]) + { + Throw(@"Failed to setCurrentContext"); + } + } + + [self drawRect:self.bounds]; + + if (pPixels) + { + // Frame capture request + int width = static_cast(self.drawableSize.width); + int height = static_cast(self.drawableSize.height); + if (width && height) + { + // Capture framebuffer's content + *pPixels = new uint8_t[4 * width * height]; + GLint prevPackAlignment; + gl::GetIntegerv(GL_PACK_ALIGNMENT, &prevPackAlignment); + gl::PixelStorei(GL_PACK_ALIGNMENT, 1); + + // Clear errors + gl::GetError(); + + gl::ReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, *pPixels); + + gl::PixelStorei(GL_PACK_ALIGNMENT, prevPackAlignment); + + // Clear errors + gl::GetError(); + } + else + { + *pPixels = nullptr; + } + } // if (pPixels) + + if (![_context present:self.glLayer]) + { + Throw(@"Failed to present framebuffer"); + } + _drawing = NO; + } + #if TARGET_OS_IOS || TARGET_OS_TV -static void freeImageData(void *info, const void *data, size_t size) -{ - delete[] static_cast(info); -} - -- (UIImage *)snapshot -{ - uint8_t *pixels = nullptr; - [self displayAndCapture:&pixels]; - - if (!pixels) - { - return nil; - } - - int width = static_cast(self.drawableSize.width); - int height = static_cast(self.drawableSize.height); - size_t dataLen = width * height * 4; - - uint8_t *flippedPixels = new uint8_t[dataLen]; - for (int y1 = 0; y1 < height; y1++) - { - for (int x1 = 0; x1 < width * 4; x1++) - { - flippedPixels[(height - 1 - y1) * width * 4 + x1] = pixels[y1 * 4 * width + x1]; - } - } - delete[] pixels; - - CGDataProviderRef provider = - CGDataProviderCreateWithData(flippedPixels, flippedPixels, dataLen, freeImageData); - int bitsPerComponent = 8; - int bitsPerPixel = 32; - int bytesPerRow = 4 * width; - CGColorSpaceRef colorSpaceRef = CGColorSpaceCreateDeviceRGB(); - CGBitmapInfo bitmapInfo = kCGBitmapByteOrderDefault | kCGImageAlphaNoneSkipLast; - CGColorRenderingIntent renderingIntent = kCGRenderingIntentDefault; - CGImageRef imageRef = - CGImageCreate(width, height, bitsPerComponent, bitsPerPixel, bytesPerRow, colorSpaceRef, - bitmapInfo, provider, NULL, NO, renderingIntent); - CGColorSpaceRelease(colorSpaceRef); - CGDataProviderRelease(provider); - UIImage *image = [UIImage imageWithCGImage:imageRef scale:1 orientation:UIImageOrientationUp]; - - CGImageRelease(imageRef); - return image; -} + static void freeImageData(void *info, const void *data, size_t size) + { + delete[] static_cast(info); + } + + - (UIImage *)snapshot + { + uint8_t *pixels = nullptr; + [self displayAndCapture:&pixels]; + + if (!pixels) + { + return nil; + } + + int width = static_cast(self.drawableSize.width); + int height = static_cast(self.drawableSize.height); + size_t dataLen = width * height * 4; + + uint8_t *flippedPixels = new uint8_t[dataLen]; + for (int y1 = 0; y1 < height; y1++) + { + for (int x1 = 0; x1 < width * 4; x1++) + { + flippedPixels[(height - 1 - y1) * width * 4 + x1] = pixels[y1 * 4 * width + x1]; + } + } + delete[] pixels; + + CGDataProviderRef provider = + CGDataProviderCreateWithData(flippedPixels, flippedPixels, dataLen, freeImageData); + int bitsPerComponent = 8; + int bitsPerPixel = 32; + int bytesPerRow = 4 * width; + CGColorSpaceRef colorSpaceRef = CGColorSpaceCreateDeviceRGB(); + CGBitmapInfo bitmapInfo = kCGBitmapByteOrderDefault | kCGImageAlphaNoneSkipLast; + CGColorRenderingIntent renderingIntent = kCGRenderingIntentDefault; + CGImageRef imageRef = + CGImageCreate(width, height, bitsPerComponent, bitsPerPixel, bytesPerRow, colorSpaceRef, + bitmapInfo, provider, NULL, NO, renderingIntent); + CGColorSpaceRelease(colorSpaceRef); + CGDataProviderRelease(provider); + UIImage *image = [UIImage imageWithCGImage:imageRef scale:1 orientation:UIImageOrientationUp]; + + CGImageRelease(imageRef); + return image; + } #endif // TARGET_OS_IOS || TARGET_OS_TV - -@end + + @end + +#endif diff --git a/addons/ofxiOS/src/metal/MGLKit/MGLKViewController+Mac.mm b/addons/ofxiOS/src/metal/MGLKit/MGLKViewController+Mac.mm index 983c6fe9322..941c1a4675a 100644 --- a/addons/ofxiOS/src/metal/MGLKit/MGLKViewController+Mac.mm +++ b/addons/ofxiOS/src/metal/MGLKit/MGLKViewController+Mac.mm @@ -3,7 +3,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // - +#if defined(OF_METAL) - (void)initImpl {} - (void)releaseTimer @@ -199,3 +199,5 @@ - (void)resume _paused = NO; } + +#endif diff --git a/addons/ofxiOS/src/metal/MGLKit/MGLKViewController+Private.h b/addons/ofxiOS/src/metal/MGLKit/MGLKViewController+Private.h index dc59d369169..7256422d9bb 100644 --- a/addons/ofxiOS/src/metal/MGLKit/MGLKViewController+Private.h +++ b/addons/ofxiOS/src/metal/MGLKit/MGLKViewController+Private.h @@ -3,7 +3,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // - +#if defined(OF_METAL) #ifndef MGLKViewController_Private_h #define MGLKViewController_Private_h @@ -41,3 +41,4 @@ @end #endif /* MGLKViewController_Private_h */ +#endif diff --git a/addons/ofxiOS/src/metal/MGLKit/MGLKViewController+iOS.mm b/addons/ofxiOS/src/metal/MGLKit/MGLKViewController+iOS.mm index 3dfbf16bb9d..9067195feb1 100644 --- a/addons/ofxiOS/src/metal/MGLKit/MGLKViewController+iOS.mm +++ b/addons/ofxiOS/src/metal/MGLKit/MGLKViewController+iOS.mm @@ -3,7 +3,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // - +#if defined(OF_METAL) - (void)initImpl {} - (void)deallocImpl {} - (void)viewDidMoveToWindow {} @@ -88,3 +88,5 @@ - (void)resume _paused = NO; } + +#endif diff --git a/addons/ofxiOS/src/metal/MGLKit/MGLKViewController.h b/addons/ofxiOS/src/metal/MGLKit/MGLKViewController.h index 238b4cf9589..a503c527706 100644 --- a/addons/ofxiOS/src/metal/MGLKit/MGLKViewController.h +++ b/addons/ofxiOS/src/metal/MGLKit/MGLKViewController.h @@ -4,6 +4,7 @@ // found in the LICENSE file. // +#if defined(OF_METAL) #import "MGLKView.h" NS_ASSUME_NONNULL_BEGIN @@ -40,3 +41,4 @@ NS_ASSUME_NONNULL_BEGIN @end NS_ASSUME_NONNULL_END +#endif diff --git a/addons/ofxiOS/src/metal/MGLKit/MGLKViewController.mm b/addons/ofxiOS/src/metal/MGLKit/MGLKViewController.mm index aea44e7ca0c..f2143f033d9 100644 --- a/addons/ofxiOS/src/metal/MGLKit/MGLKViewController.mm +++ b/addons/ofxiOS/src/metal/MGLKit/MGLKViewController.mm @@ -3,7 +3,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // - +#if defined(OF_METAL) #import "MGLKViewController+Private.h" #include @@ -145,97 +145,98 @@ - (void)viewDidAppear:(BOOL)animated // viewDidDisappear callback #if TARGET_OS_OSX - (void)viewDidDisappear -{ - [super viewDidDisappear]; + { + [super viewDidDisappear]; #else // TARGET_OS_OSX -- (void)viewDidDisappear:(BOOL)animated -{ - [super viewDidDisappear:animated]; + - (void)viewDidDisappear:(BOOL)animated + { + [super viewDidDisappear:animated]; #endif // TARGET_OS_OSX - NSLog(@"MGLKViewController viewDidDisappear"); - _appWasInBackground = YES; - - // Implementation dependent - [self pause]; - - // Unregister callbacks that are called when app enters/exits background - [[NSNotificationCenter defaultCenter] removeObserver:self - name:MGLKApplicationWillResignActiveNotification - object:nil]; - - [[NSNotificationCenter defaultCenter] removeObserver:self - name:MGLKApplicationDidBecomeActiveNotification - object:nil]; -} - -- (void)appWillPause:(NSNotification *)note -{ - NSLog(@"MGLKViewController appWillPause:"); - if (_pauseOnWillResignActive) { - _appWasInBackground = YES; - self.paused = YES; - } -} - -- (void)appDidBecomeActive:(NSNotification *)note -{ - NSLog(@"MGLKViewController appDidBecomeActive:"); - if (_resumeOnDidBecomeActive) { - self.paused = NO; - } -} - -- (void)handleAppWasInBackground -{ - if (!_appWasInBackground) - { - return; - } - // To avoid time jump when the app goes to background - // for a long period of time. - _lastUpdateTime = CACurrentMediaTime(); - - _appWasInBackground = NO; -} - -- (void)frameStep -{ - [self handleAppWasInBackground]; - - CFTimeInterval now = CACurrentMediaTime(); - _timeSinceLastUpdate = now - _lastUpdateTime; - - [self update]; - [_glView display]; - - if (_needDisableVsync) - { - eglSwapInterval([MGLDisplay defaultDisplay].eglDisplay, 0); - _needDisableVsync = NO; - } - else if (_needEnableVsync) - { - eglSwapInterval([MGLDisplay defaultDisplay].eglDisplay, 1); - _needEnableVsync = NO; - } - - _framesDisplayed++; - _lastUpdateTime = now; - + NSLog(@"MGLKViewController viewDidDisappear"); + _appWasInBackground = YES; + + // Implementation dependent + [self pause]; + + // Unregister callbacks that are called when app enters/exits background + [[NSNotificationCenter defaultCenter] removeObserver:self + name:MGLKApplicationWillResignActiveNotification + object:nil]; + + [[NSNotificationCenter defaultCenter] removeObserver:self + name:MGLKApplicationDidBecomeActiveNotification + object:nil]; + } + + - (void)appWillPause:(NSNotification *)note + { + NSLog(@"MGLKViewController appWillPause:"); + if (_pauseOnWillResignActive) { + _appWasInBackground = YES; + self.paused = YES; + } + } + + - (void)appDidBecomeActive:(NSNotification *)note + { + NSLog(@"MGLKViewController appDidBecomeActive:"); + if (_resumeOnDidBecomeActive) { + self.paused = NO; + } + } + + - (void)handleAppWasInBackground + { + if (!_appWasInBackground) + { + return; + } + // To avoid time jump when the app goes to background + // for a long period of time. + _lastUpdateTime = CACurrentMediaTime(); + + _appWasInBackground = NO; + } + + - (void)frameStep + { + [self handleAppWasInBackground]; + + CFTimeInterval now = CACurrentMediaTime(); + _timeSinceLastUpdate = now - _lastUpdateTime; + + [self update]; + [_glView display]; + + if (_needDisableVsync) + { + eglSwapInterval([MGLDisplay defaultDisplay].eglDisplay, 0); + _needDisableVsync = NO; + } + else if (_needEnableVsync) + { + eglSwapInterval([MGLDisplay defaultDisplay].eglDisplay, 1); + _needEnableVsync = NO; + } + + _framesDisplayed++; + _lastUpdateTime = now; + #if 0 - if (_timeSinceLastUpdate > 2 * _displayLink.duration) - { - NSLog(@"frame was jump by %fs", _timeSinceLastUpdate); - } + if (_timeSinceLastUpdate > 2 * _displayLink.duration) + { + NSLog(@"frame was jump by %fs", _timeSinceLastUpdate); + } +#endif + } + + - (void)update + { + if (_delegate) + { + [_delegate mglkViewControllerUpdate:self]; + } + } + + @end #endif -} - -- (void)update -{ - if (_delegate) - { - [_delegate mglkViewControllerUpdate:self]; - } -} - -@end diff --git a/addons/ofxiOS/src/metal/MGLKit/MGLKit.h b/addons/ofxiOS/src/metal/MGLKit/MGLKit.h index 731c45f48d7..ae0134b6a96 100644 --- a/addons/ofxiOS/src/metal/MGLKit/MGLKit.h +++ b/addons/ofxiOS/src/metal/MGLKit/MGLKit.h @@ -3,7 +3,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // - +#if defined(OF_METAL) #ifndef MGLKit_h #define MGLKit_h @@ -12,3 +12,4 @@ #import "MGLKViewController.h" #endif /* MGLKit_h */ +#endif diff --git a/addons/ofxiOS/src/metal/MGLKit/MGLKitPlatform.h b/addons/ofxiOS/src/metal/MGLKit/MGLKitPlatform.h index bed4a412165..440ce60b1e7 100644 --- a/addons/ofxiOS/src/metal/MGLKit/MGLKitPlatform.h +++ b/addons/ofxiOS/src/metal/MGLKit/MGLKitPlatform.h @@ -3,7 +3,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // - +#if defined(OF_METAL) #ifndef MGLKitPlatform_h #define MGLKitPlatform_h @@ -31,3 +31,4 @@ #endif #endif /* MGLKitPlatform_h */ +#endif diff --git a/addons/ofxiOS/src/metal/MGLKit/MGLLayer+Private.h b/addons/ofxiOS/src/metal/MGLKit/MGLLayer+Private.h index 99245bab92e..2e6c36e35d5 100644 --- a/addons/ofxiOS/src/metal/MGLKit/MGLLayer+Private.h +++ b/addons/ofxiOS/src/metal/MGLKit/MGLLayer+Private.h @@ -3,7 +3,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // - +#if defined(OF_METAL) #ifndef MGLLayer_Private_h #define MGLLayer_Private_h @@ -48,3 +48,4 @@ @end #endif /* MGLLayer_Private_h */ +#endif diff --git a/addons/ofxiOS/src/metal/MGLKit/MGLLayer.h b/addons/ofxiOS/src/metal/MGLKit/MGLLayer.h index f720923941a..18ee8047916 100644 --- a/addons/ofxiOS/src/metal/MGLKit/MGLLayer.h +++ b/addons/ofxiOS/src/metal/MGLKit/MGLLayer.h @@ -3,7 +3,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // - +#if defined(OF_METAL) // We don't use GLES from Apple framework. // Instead we use GLES provided by MetalANGLE. #define GLES_SILENCE_DEPRECATION @@ -69,5 +69,6 @@ typedef enum MGLDrawableMultisample : int - (void)bindDefaultFrameBuffer; @end - NS_ASSUME_NONNULL_END + +#endif diff --git a/addons/ofxiOS/src/metal/MGLKit/MGLLayer.mm b/addons/ofxiOS/src/metal/MGLKit/MGLLayer.mm index e2f33eeb9f9..004ee86b103 100644 --- a/addons/ofxiOS/src/metal/MGLKit/MGLLayer.mm +++ b/addons/ofxiOS/src/metal/MGLKit/MGLLayer.mm @@ -3,7 +3,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // - +#if defined(OF_METAL) #import "MGLLayer+Private.h" #include @@ -1131,3 +1131,5 @@ - (BOOL)createOffscreenBlitVBO } @end + +#endif diff --git a/libs/openFrameworksCompiled/project/ios/CoreOF.xcconfig b/libs/openFrameworksCompiled/project/ios/CoreOF.xcconfig index 5690515fe68..75fbe5857d1 100644 --- a/libs/openFrameworksCompiled/project/ios/CoreOF.xcconfig +++ b/libs/openFrameworksCompiled/project/ios/CoreOF.xcconfig @@ -119,3 +119,4 @@ CLANG_CXX_LANGUAGE_STANDARD = c++17 IPHONEOS_DEPLOYMENT_TARGET = 13.0 CLANG_ENABLE_OBJC_ARC = YES +OF_METAL = YES