2015-07-25 03:29:45 +00:00
|
|
|
//
|
|
|
|
// CRTFrame.h
|
|
|
|
// Clock Signal
|
|
|
|
//
|
|
|
|
// Created by Thomas Harte on 24/07/2015.
|
|
|
|
// Copyright © 2015 Thomas Harte. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef CRTFrame_h
|
|
|
|
#define CRTFrame_h
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2015-07-26 19:13:46 +00:00
|
|
|
typedef struct {
|
2015-07-25 03:29:45 +00:00
|
|
|
uint8_t *data;
|
|
|
|
int depth;
|
2015-07-26 19:13:46 +00:00
|
|
|
} CRTBuffer;
|
2015-07-25 03:29:45 +00:00
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
int width, height;
|
|
|
|
} CRTSize;
|
|
|
|
|
2015-07-26 19:13:46 +00:00
|
|
|
typedef struct {
|
2015-07-25 03:29:45 +00:00
|
|
|
CRTSize size, dirty_size;
|
|
|
|
|
|
|
|
int number_of_buffers;
|
|
|
|
CRTBuffer *buffers;
|
|
|
|
|
|
|
|
int number_of_runs;
|
2015-08-06 01:12:33 +00:00
|
|
|
uint8_t *runs;
|
2015-07-26 19:13:46 +00:00
|
|
|
} CRTFrame;
|
2015-07-25 03:29:45 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2015-08-06 01:12:33 +00:00
|
|
|
|
|
|
|
typedef uint16_t kCRTPositionType;
|
|
|
|
typedef uint16_t kCRTTexCoordType;
|
|
|
|
typedef uint8_t kCRTLateralType;
|
|
|
|
typedef uint8_t kCRTPhaseType;
|
|
|
|
|
|
|
|
static const size_t kCRTVertexOffsetOfPosition = 0;
|
|
|
|
static const size_t kCRTVertexOffsetOfTexCoord = 4;
|
|
|
|
static const size_t kCRTVertexOffsetOfLateral = 8;
|
|
|
|
static const size_t kCRTVertexOffsetOfPhase = 9;
|
|
|
|
|
|
|
|
static const int kCRTSizeOfVertex = 10;
|
2015-08-02 18:25:21 +00:00
|
|
|
|
2015-07-25 03:29:45 +00:00
|
|
|
#endif /* CRTFrame_h */
|