diff --git a/ios/ViewController.mm b/ios/ViewController.mm index 8194b3235b..996ba92c50 100644 --- a/ios/ViewController.mm +++ b/ios/ViewController.mm @@ -34,6 +34,8 @@ InputState input_state; extern std::string ram_temp_file; +ViewController* sharedViewController; + @interface ViewController () @property (strong, nonatomic) EAGLContext *context; @@ -50,6 +52,7 @@ extern std::string ram_temp_file; { self = [super init]; if (self) { + sharedViewController = self; self.touches = [[[NSMutableArray alloc] init] autorelease]; self.documentsPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]; @@ -230,11 +233,21 @@ extern std::string ram_temp_file; } } +- (void)bindDefaultFBO +{ + [(GLKView*)self.view bindDrawable]; +} + void LaunchBrowser(char const* url) { [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithCString:url encoding:NSStringEncodingConversionAllowLossy]]]; } +void bindDefaultFBO() +{ + [sharedViewController bindDefaultFBO]; +} + void EnableFZ(){}; void DisableFZ(){}; diff --git a/native b/native index 9c183fcca8..318e75a665 160000 --- a/native +++ b/native @@ -1 +1 @@ -Subproject commit 9c183fcca8416a34d510880d483ccf5f2ec573f4 +Subproject commit 318e75a66544ef7a1ddbc2423603d3d7a8116d24