2015-01-25 22:27:03 +01:00
|
|
|
namespace rw {
|
|
|
|
namespace gl {
|
2014-12-23 11:29:37 +01:00
|
|
|
|
2014-12-24 11:38:25 +01:00
|
|
|
struct AttribDesc
|
2014-12-23 11:29:37 +01:00
|
|
|
{
|
|
|
|
// arguments to glVertexAttribPointer (should use OpenGL types here)
|
2014-12-24 23:52:03 +01:00
|
|
|
// Vertex = 0, TexCoord, Normal, Color, Weight, Bone Index, Extra Color
|
2014-12-23 11:29:37 +01:00
|
|
|
uint32 index;
|
2014-12-23 16:15:11 +01:00
|
|
|
// float = 0, byte, ubyte, short, ushort
|
2014-12-23 11:29:37 +01:00
|
|
|
int32 type;
|
|
|
|
bool32 normalized;
|
|
|
|
int32 size;
|
|
|
|
uint32 stride;
|
|
|
|
uint32 offset;
|
|
|
|
};
|
|
|
|
|
2015-01-25 22:27:03 +01:00
|
|
|
struct InstanceDataHeader : rw::InstanceDataHeader
|
2014-12-23 11:29:37 +01:00
|
|
|
{
|
|
|
|
int32 numAttribs;
|
2014-12-24 11:38:25 +01:00
|
|
|
AttribDesc *attribs;
|
2014-12-23 11:29:37 +01:00
|
|
|
uint32 dataSize;
|
|
|
|
uint8 *data;
|
2014-12-24 11:38:25 +01:00
|
|
|
|
|
|
|
// needed for rendering
|
|
|
|
uint32 vbo;
|
|
|
|
uint32 ibo;
|
2014-12-23 11:29:37 +01:00
|
|
|
};
|
|
|
|
|
2015-01-25 22:27:03 +01:00
|
|
|
void *destroyNativeData(void *object, int32, int32);
|
|
|
|
void readNativeData(Stream *stream, int32 len, void *object, int32, int32);
|
|
|
|
void writeNativeData(Stream *stream, int32 len, void *object, int32, int32);
|
|
|
|
int32 getSizeNativeData(void *object, int32, int32);
|
2014-12-24 11:38:25 +01:00
|
|
|
|
2015-01-25 22:27:03 +01:00
|
|
|
void instance(Atomic *atomic);
|
2014-12-25 11:14:36 +01:00
|
|
|
|
|
|
|
// only RW_OPENGL
|
2015-01-25 22:27:03 +01:00
|
|
|
void uploadGeo(Geometry *geo);
|
|
|
|
void setAttribPointers(InstanceDataHeader *inst);
|
2014-12-23 11:29:37 +01:00
|
|
|
|
2015-01-10 16:55:13 +01:00
|
|
|
// Skin plugin
|
|
|
|
|
2015-01-25 22:27:03 +01:00
|
|
|
void readNativeSkin(Stream *stream, int32, void *object, int32 offset);
|
|
|
|
void writeNativeSkin(Stream *stream, int32 len, void *object, int32 offset);
|
|
|
|
int32 getSizeNativeSkin(void *object, int32 offset);
|
2015-01-10 16:55:13 +01:00
|
|
|
|
2015-01-20 14:48:18 +01:00
|
|
|
// Raster
|
|
|
|
|
2015-01-25 22:27:03 +01:00
|
|
|
struct Texture : rw::Texture
|
2015-01-20 14:48:18 +01:00
|
|
|
{
|
|
|
|
void upload(void);
|
|
|
|
void bind(int n);
|
|
|
|
};
|
|
|
|
|
2015-01-25 22:27:03 +01:00
|
|
|
extern int32 nativeRasterOffset;
|
|
|
|
void registerNativeRaster(void);
|
2015-01-20 14:48:18 +01:00
|
|
|
|
2014-12-23 11:29:37 +01:00
|
|
|
}
|
2014-12-24 11:38:25 +01:00
|
|
|
}
|