2016-06-16 14:08:09 +02:00
|
|
|
namespace rw {
|
|
|
|
|
2016-06-21 23:16:09 +02:00
|
|
|
// TODO: move more stuff into this
|
|
|
|
|
2016-06-16 14:08:09 +02:00
|
|
|
struct Engine
|
2016-06-21 23:16:09 +02:00
|
|
|
{
|
2016-06-23 16:39:34 +02:00
|
|
|
void *currentCamera;
|
|
|
|
void *currentWorld;
|
2016-06-21 23:16:09 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
extern Engine engine;
|
|
|
|
|
|
|
|
|
|
|
|
struct Driver
|
2016-06-16 14:08:09 +02:00
|
|
|
{
|
|
|
|
ObjPipeline *defaultPipeline;
|
|
|
|
int32 rasterNativeOffset;
|
|
|
|
|
2016-06-21 23:16:09 +02:00
|
|
|
void (*beginUpdate)(Camera*);
|
|
|
|
void (*endUpdate)(Camera*);
|
|
|
|
|
2016-06-16 14:08:09 +02:00
|
|
|
void (*rasterCreate)(Raster*);
|
|
|
|
uint8 *(*rasterLock)(Raster*, int32 level);
|
|
|
|
void (*rasterUnlock)(Raster*, int32 level);
|
|
|
|
int32 (*rasterNumLevels)(Raster*);
|
|
|
|
void (*rasterFromImage)(Raster*, Image*);
|
|
|
|
};
|
|
|
|
|
2016-06-21 23:16:09 +02:00
|
|
|
extern Driver driver[NUM_PLATFORMS];
|
|
|
|
#define DRIVER driver[rw::platform]
|
2016-06-16 14:08:09 +02:00
|
|
|
|
|
|
|
namespace null {
|
2016-06-21 23:16:09 +02:00
|
|
|
void beginUpdate(Camera*);
|
|
|
|
void endUpdate(Camera*);
|
|
|
|
|
2016-06-16 14:08:09 +02:00
|
|
|
void rasterCreate(Raster*);
|
|
|
|
uint8 *rasterLock(Raster*, int32 level);
|
|
|
|
void rasterUnlock(Raster*, int32 level);
|
|
|
|
int32 rasterNumLevels(Raster*);
|
|
|
|
void rasterFromImage(Raster*, Image*);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|