aboutsummaryrefslogtreecommitdiffstats
path: root/src/nativewindow/native
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2019-07-08 06:16:29 +0200
committerSven Gothel <[email protected]>2019-07-08 06:16:29 +0200
commit56db83dab0c8a70f1177425c557b7b664e06fb47 (patch)
tree99214a5b54d5a5cd4d9b7901f679697478e2516f /src/nativewindow/native
parent29ad35ab598b6d97367e2e9763f0d2a96c52bcaa (diff)
iOS: IOSUtil_CreateGLViewDemoA0 tests native UIWindow parenting (works)
Diffstat (limited to 'src/nativewindow/native')
-rw-r--r--src/nativewindow/native/ios/IOSmisc.m15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/nativewindow/native/ios/IOSmisc.m b/src/nativewindow/native/ios/IOSmisc.m
index 9a1bbfd7f..1a663b889 100644
--- a/src/nativewindow/native/ios/IOSmisc.m
+++ b/src/nativewindow/native/ios/IOSmisc.m
@@ -809,15 +809,22 @@ JNIEXPORT void JNICALL Java_jogamp_nativewindow_ios_IOSUtil_CreateGLViewDemoA0
(JNIEnv *env, jclass unused)
{
#ifdef EAGL_TEST
- CGRect boundsW2 = CGRectMake(500, 10, 320, 320);
- CGRect boundsV2 = CGRectMake(0, 0, 320, 320);
+ CGRect boundsW2 = CGRectMake(64, 64, 640, 640);
UIWindow* window2 = [[[[UIWindow alloc] initWithFrame:boundsW2] autorelease] retain];
window2.rootViewController = [[[UIViewController alloc] initWithNibName:nil bundle:nil] autorelease];
[window2 setBackgroundColor: [UIColor redColor]];
[window2 makeKeyAndVisible];
- GLView *glView = [[GLView alloc] initWithFrame:boundsV2];
- [window2 addSubview:glView];
+ CGRect boundsW3 = CGRectMake(64, 64, 320, 320);
+ CGRect boundsV3 = CGRectMake(20, 20, 280, 280);
+ UIWindow* window3 = [[[[UIWindow alloc] initWithFrame:boundsW3] autorelease] retain];
+ window3.rootViewController = [[[UIViewController alloc] initWithNibName:nil bundle:nil] autorelease];
+ [window3 setBackgroundColor: [UIColor greenColor]];
+ [window2 addSubview: window3]; // native parenting test!
+ [window3 makeKeyAndVisible];
+
+ GLView *glView = [[GLView alloc] initWithFrame:boundsV3];
+ [window3 addSubview:glView];
#endif /* EAGL_TEST */
}