Backport to Glide 2

Most games were using Glide 2, meaning there is more wrappers for Glide
2 available than for Glide 3. In particular, it seems there is no open
source Glide 3 wrapper.

FossilOrigin-Name: 16bb6bc399e5b4db4f5117199f6b534231c42072555575b70f40795651805648
This commit is contained in:
Jonathan Schleifer 2023-01-10 01:12:33 +00:00
parent c322610fe4
commit 4ea8389306
10 changed files with 255 additions and 543 deletions

View file

@ -17,23 +17,22 @@
OF_ASSUME_NONNULL_BEGIN
typedef OFPair OF_GENERIC(OFValue *, OFNumber *) *O3DResolution;
typedef struct OF_BOXABLE {
float x, y;
} O3DVertex;
@protocol O3DRenderer <OFObject>
@property (readonly, nonatomic) OFArray OF_GENERIC(OFPair OF_GENERIC(OFValue *,
OFNumber *) *) *availableResolutions;
@property (nonatomic) bool syncsToVerticalBlank;
- (instancetype)initWithOptions:
(nullable OFDictionary OF_GENERIC(OFString *, id) *)options;
- (void)createWithResolution: (O3DResolution)resolution;
+ (unsigned int)numAvailableDevices;
- (instancetype)initWithResolution: (OFSize)resolution
bitsPerPixel: (uint8_t)bitsPerPixel
refreshRate: (float)refreshRate
options: (nullable OFDictionary *)options;
- (void)beginFrame;
- (void)setColor: (OFColor *)color;
- (void)drawVertices: (OFData *)vertices;
- (void)drawPolygonVertices: (const O3DVertex *)vertices count: (size_t)count;
- (void)endFrame;
@end
@ -41,8 +40,6 @@ typedef struct OF_BOXABLE {
extern "C" {
#endif
extern OFString *const O3DRendererDeviceIndex;
extern OFComparisonResult O3DCompareResolution(id _Nullable left,
id _Nullable right, void *_Nullable context);
#ifdef __cplusplus
}
#endif