Add initial O3DEngine and O3DRenderer

Only supports querying resolutions so far.

FossilOrigin-Name: c504ea5dd9a25bfe49c16f256d64f3bf8c16fc78fa03c2cad2561fbbb10eb720
This commit is contained in:
Jonathan Schleifer 2022-12-25 16:37:58 +00:00
parent 1c7dfe8b27
commit 3902165c96
8 changed files with 355 additions and 0 deletions

37
src/O3DRenderer.h Normal file
View file

@ -0,0 +1,37 @@
/*
* 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>
OF_ASSUME_NONNULL_BEGIN
#ifdef __cplusplus
extern "C" {
#endif
extern OFString *const O3DRendererDeviceIndex;
#ifdef __cplusplus
}
#endif
@protocol O3DRenderer <OFObject>
@property (readonly, nonatomic) OFSet OF_GENERIC(OFPair OF_GENERIC(OFValue *,
OFNumber *) *) *availableResolutions;
+ (instancetype)alloc;
- (instancetype)initWithOptions:
(nullable OFDictionary OF_GENERIC(OFString *, id) *)options;
@end
OF_ASSUME_NONNULL_END