Draw vertices / triangles

FossilOrigin-Name: 4f4baa85c1fdb1d605305a137e9beb1aff7d09304d565d73f1ae5bdab3f49c34
This commit is contained in:
Jonathan Schleifer 2023-01-09 22:39:01 +00:00
parent 40756ef329
commit c322610fe4
4 changed files with 119 additions and 1 deletions

View file

@ -19,13 +19,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;
- (void)beginFrame;
- (void)setColor: (OFColor *)color;
- (void)drawVertices: (OFData *)vertices;
- (void)endFrame;
@end
#ifdef __cplusplus