/* * Copyright (c) 2022 Jonathan Schleifer * * All rights reserved. * * This file is part of Obj3DEngine. It may be distributed under the terms of * the Q Public License 1.0, which can be found in the file LICENSE.QPL * included in the packaging of this file. * * Alternatively, it may be distributed under the terms of the GNU General * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of * this file. */ #import #import "O3DEngine.h" @interface TestsAppDelegate: OFObject @end OF_APPLICATION_DELEGATE(TestsAppDelegate) @implementation TestsAppDelegate - (void)applicationDidFinishLaunching: (OFNotification *)notification { Class renderer = [O3DEngine availableRenderers].firstObject; O3DEngine *engine = [[[O3DEngine alloc] initWithRenderer: renderer options: nil] autorelease]; [OFStdOut writeFormat: @"Available resolutions: %@\n", engine.renderer.availableResolutions]; O3DResolution resolution = [OFPair pairWithFirstObject: [OFValue valueWithSize: OFMakeSize(800, 600)] secondObject: [OFNumber numberWithFloat: 60]]; [engine.renderer createWithResolution: resolution]; [OFThread sleepForTimeInterval: 5]; [OFApplication terminate]; } @end