-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Mac] Made Mac apps launchable without command line terminal.
- Examples on macOS can finally be launched by double clicking the .app packages from Finder. - Added same NSBundle resource file loading as for iOS. - Removed old command buffer encoding with two queue submissions from ClothPhysics example (Originally added to fix issue with Metal backend). - Fixed loading compute shaders and ShaderErrors test for Mac.
- Loading branch information
1 parent
e774985
commit 68265ce
Showing
12 changed files
with
144 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* | ||
* AppUtils.h | ||
* | ||
* Copyright (c) 2015 Lukas Hermanns. All rights reserved. | ||
* Licensed under the terms of the BSD 3-Clause license (see LICENSE.txt). | ||
*/ | ||
|
||
#include <string> | ||
|
||
// Tries to find the specified filename in the main NSBundle. | ||
std::string FindNSResourcePath(const std::string& filename); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
* AppUtils.mm | ||
* | ||
* Copyright (c) 2015 Lukas Hermanns. All rights reserved. | ||
* Licensed under the terms of the BSD 3-Clause license (see LICENSE.txt). | ||
*/ | ||
|
||
#import "AppUtils.h" | ||
#import <Foundation/Foundation.h> | ||
|
||
|
||
std::string FindNSResourcePath(const std::string& filename) | ||
{ | ||
NSString* filenameNS = [[NSString alloc] initWithCString:filename.c_str() encoding:NSASCIIStringEncoding]; | ||
NSString* path = [[NSBundle mainBundle] pathForResource:filenameNS ofType:nil]; | ||
[filenameNS release]; | ||
return (path != nil ? std::string([path UTF8String]) : ""); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters