/* * 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 OF_ASSUME_NONNULL_BEGIN typedef struct OF_BOXABLE { struct { float x, y; } position; struct { float r, g, b, a; } color; } O3DVertex; @protocol O3DRenderer @property (nonatomic) bool syncsToVerticalBlank; + (unsigned int)numAvailableDevices; - (instancetype)initWithResolution: (OFSize)resolution bitsPerPixel: (uint8_t)bitsPerPixel refreshRate: (float)refreshRate options: (nullable OFDictionary *)options; - (void)beginFrame; - (void)drawPolygonWithVertices: (const O3DVertex *)vertices count: (size_t)count; - (void)endFrame; @end #ifdef __cplusplus extern "C" { #endif extern OFString *const O3DRendererDeviceIndex; #ifdef __cplusplus } #endif OF_ASSUME_NONNULL_END