2015-07-12 21:57:05 +01:00
|
|
|
namespace rw {
|
|
|
|
|
|
|
|
struct Atomic;
|
|
|
|
|
2015-08-01 22:03:10 +01:00
|
|
|
class Pipeline
|
2015-07-12 21:57:05 +01:00
|
|
|
{
|
2015-08-01 22:03:10 +01:00
|
|
|
public:
|
2015-07-12 21:57:05 +01:00
|
|
|
uint32 pluginID;
|
|
|
|
uint32 pluginData;
|
2016-01-10 19:10:53 +00:00
|
|
|
int32 platform;
|
2015-07-12 21:57:05 +01:00
|
|
|
|
|
|
|
Pipeline(uint32 platform);
|
2015-08-02 18:31:01 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
class ObjPipeline : public Pipeline
|
|
|
|
{
|
|
|
|
public:
|
2016-02-13 23:52:45 +00:00
|
|
|
ObjPipeline(uint32 platform);
|
|
|
|
// not the most beautiful way of doing things but still
|
|
|
|
// better than virtual methods (i hope?).
|
|
|
|
struct {
|
|
|
|
void (*instance)(ObjPipeline *pipe, Atomic *atomic);
|
|
|
|
void (*uninstance)(ObjPipeline *pipe, Atomic *atomic);
|
|
|
|
void (*render)(ObjPipeline *pipe, Atomic *atomic);
|
|
|
|
} impl;
|
|
|
|
// just for convenience
|
|
|
|
void instance(Atomic *atomic) { this->impl.instance(this, atomic); }
|
|
|
|
void uninstance(Atomic *atomic) { this->impl.uninstance(this, atomic); }
|
|
|
|
void render(Atomic *atomic) { this->impl.render(this, atomic); }
|
2015-07-12 21:57:05 +01:00
|
|
|
};
|
|
|
|
|
2015-09-07 13:50:10 +01:00
|
|
|
void findMinVertAndNumVertices(uint16 *indices, uint32 numIndices, uint32 *minVert, int32 *numVertices);
|
2015-09-06 12:31:42 +01:00
|
|
|
|
|
|
|
// everything xbox, d3d8 and d3d9 may want to use
|
|
|
|
enum {
|
|
|
|
VERT_BYTE2 = 1,
|
|
|
|
VERT_BYTE3,
|
|
|
|
VERT_SHORT2,
|
|
|
|
VERT_SHORT3,
|
|
|
|
VERT_NORMSHORT2,
|
|
|
|
VERT_NORMSHORT3,
|
|
|
|
VERT_FLOAT2,
|
|
|
|
VERT_FLOAT3,
|
2016-07-11 19:27:21 +01:00
|
|
|
VERT_FLOAT4,
|
2015-09-06 12:31:42 +01:00
|
|
|
VERT_ARGB,
|
2016-06-21 22:16:09 +01:00
|
|
|
VERT_RGBA,
|
2015-09-06 12:31:42 +01:00
|
|
|
VERT_COMPNORM
|
|
|
|
};
|
|
|
|
|
2017-08-05 00:44:37 +01:00
|
|
|
void instV4d(int type, uint8 *dst, V4d *src, uint32 numVertices, uint32 stride);
|
|
|
|
void instV3d(int type, uint8 *dst, V3d *src, uint32 numVertices, uint32 stride);
|
|
|
|
void uninstV3d(int type, V3d *dst, uint8 *src, uint32 numVertices, uint32 stride);
|
|
|
|
void instTexCoords(int type, uint8 *dst, TexCoords *src, uint32 numVertices, uint32 stride);
|
|
|
|
void uninstTexCoords(int type, TexCoords *dst, uint8 *src, uint32 numVertices, uint32 stride);
|
|
|
|
bool32 instColor(int type, uint8 *dst, RGBA *src, uint32 numVertices, uint32 stride);
|
|
|
|
void uninstColor(int type, RGBA *dst, uint8 *src, uint32 numVertices, uint32 stride);
|
2015-09-06 12:31:42 +01:00
|
|
|
|
2015-07-12 21:57:05 +01:00
|
|
|
}
|