librw/src/rwogl.h

39 lines
873 B
C
Raw Normal View History

namespace Rw {
2014-12-24 11:38:25 +01:00
namespace Gl {
2014-12-24 11:38:25 +01:00
struct AttribDesc
{
// arguments to glVertexAttribPointer (should use OpenGL types here)
// Vertex = 0, TexCoord, Normal, Color, Weight, Bone Index, Extra Color
uint32 index;
2014-12-23 16:15:11 +01:00
// float = 0, byte, ubyte, short, ushort
int32 type;
bool32 normalized;
int32 size;
uint32 stride;
uint32 offset;
};
2014-12-24 11:38:25 +01:00
struct InstanceDataHeader : Rw::InstanceDataHeader
{
int32 numAttribs;
2014-12-24 11:38:25 +01:00
AttribDesc *attribs;
uint32 dataSize;
uint8 *data;
2014-12-24 11:38:25 +01:00
// needed for rendering
uint32 vbo;
uint32 ibo;
};
2014-12-24 11:38:25 +01:00
void *DestroyNativeData(void *object, int32, int32);
void ReadNativeData(std::istream &stream, int32 len, void *object, int32, int32);
void WriteNativeData(std::ostream &stream, int32 len, void *object, int32, int32);
int32 GetSizeNativeData(void *object, int32, int32);
void UploadGeo(Geometry *geo);
void SetAttribPointers(InstanceDataHeader *inst);
}
2014-12-24 11:38:25 +01:00
}