librw/src/rwpipeline.h

57 lines
1.3 KiB
C
Raw Normal View History

2015-07-12 22:57:05 +02:00
namespace rw {
struct PipeAttribute
{
const char *name;
uint32 attrib;
};
struct Atomic;
2015-08-01 23:03:10 +02:00
class Pipeline
2015-07-12 22:57:05 +02:00
{
2015-08-01 23:03:10 +02:00
public:
2015-07-12 22:57:05 +02:00
uint32 pluginID;
uint32 pluginData;
uint32 platform;
Pipeline(uint32 platform);
Pipeline(Pipeline *p);
~Pipeline(void);
2015-08-01 23:03:10 +02:00
virtual void dump(void);
2015-08-02 19:31:01 +02:00
};
class ObjPipeline : public Pipeline
{
public:
ObjPipeline(uint32 platform) : Pipeline(platform) {}
2015-07-12 22:57:05 +02:00
virtual void instance(Atomic *atomic);
virtual void uninstance(Atomic *atomic);
virtual void render(Atomic *atomic);
};
void findMinVertAndNumVertices(uint16 *indices, uint32 numIndices, uint32 *minVert, int32 *numVertices);
// 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,
VERT_ARGB,
VERT_COMPNORM
};
void instV3d(int type, uint8 *dst, float *src, uint32 numVertices, uint32 stride);
2015-09-07 23:00:28 +02:00
void uninstV3d(int type, float *dst, uint8 *src, uint32 numVertices, uint32 stride);
void instV2d(int type, uint8 *dst, float *src, uint32 numVertices, uint32 stride);
2015-09-07 23:00:28 +02:00
void uninstV2d(int type, float *dst, uint8 *src, uint32 numVertices, uint32 stride);
bool32 instColor(int type, uint8 *dst, uint8 *src, uint32 numVertices, uint32 stride);
2015-09-07 23:00:28 +02:00
void uninstColor(int type, uint8 *dst, uint8 *src, uint32 numVertices, uint32 stride);
2015-07-12 22:57:05 +02:00
}