From 56db83dab0c8a70f1177425c557b7b664e06fb47 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 8 Jul 2019 06:16:29 +0200 Subject: iOS: IOSUtil_CreateGLViewDemoA0 tests native UIWindow parenting (works) --- src/nativewindow/native/ios/IOSmisc.m | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src') 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 */ } -- cgit v1.2.3