Only supports querying resolutions so far. FossilOrigin-Name: c504ea5dd9a25bfe49c16f256d64f3bf8c16fc78fa03c2cad2561fbbb10eb720
39 lines
1.1 KiB
Objective-C
39 lines
1.1 KiB
Objective-C
/*
|
|
* Copyright (c) 2022 Jonathan Schleifer <js@nil.im>
|
|
*
|
|
* 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 <ObjFW/ObjFW.h>
|
|
|
|
#import "O3DEngine.h"
|
|
|
|
@interface TestsAppDelegate: OFObject <OFApplicationDelegate>
|
|
@end
|
|
|
|
OF_APPLICATION_DELEGATE(TestsAppDelegate)
|
|
|
|
@implementation TestsAppDelegate
|
|
- (void)applicationDidFinishLaunching: (OFNotification *)notification
|
|
{
|
|
Class <O3DRenderer> renderer =
|
|
[O3DEngine availableRenderers].firstObject;
|
|
O3DEngine *engine =
|
|
[[[O3DEngine alloc] initWithRenderer: renderer
|
|
options: nil] autorelease];
|
|
|
|
[OFStdOut writeFormat: @"Available resolutions: %@",
|
|
engine.renderer.availableResolutions];
|
|
|
|
[OFApplication terminate];
|
|
}
|
|
@end
|