2014-12-23 11:29:37 +01:00
|
|
|
namespace Rw {
|
2014-12-24 11:38:25 +01:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
2014-12-24 11:38:25 +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
|
|
|
};
|
|
|
|
|
2014-12-24 11:38:25 +01:00
|
|
|
void *DestroyNativeData(void *object, int32, int32);
|
2014-12-27 23:18:10 +01:00
|
|
|
void ReadNativeData(Stream *stream, int32 len, void *object, int32, int32);
|
|
|
|
void WriteNativeData(Stream *stream, int32 len, void *object, int32, int32);
|
2014-12-24 11:38:25 +01:00
|
|
|
int32 GetSizeNativeData(void *object, int32, int32);
|
|
|
|
|
2014-12-25 11:14:36 +01:00
|
|
|
void Instance(Atomic *atomic);
|
|
|
|
|
|
|
|
// only RW_OPENGL
|
2014-12-24 11:38:25 +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
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
2014-12-23 11:29:37 +01:00
|
|
|
}
|
2014-12-24 11:38:25 +01:00
|
|
|
}
|