Code movin' and cleanup again, in the GL plugin. Planning to turn NativeVertexFormat into something cachable, instead of locked to each VertexLoader.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@948 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard
2008-10-24 23:08:46 +00:00
parent a03f39ac36
commit 72d8c3344b
30 changed files with 591 additions and 474 deletions

View File

@ -23,7 +23,7 @@
// ==============================================================================
// Direct
// ==============================================================================
void LOADERDECL Pos_ReadDirect_UByte(void* _p)
void LOADERDECL Pos_ReadDirect_UByte(const void *_p)
{
TVtxAttr* pVtxAttr = (TVtxAttr*)_p;
((float*)VertexManager::s_pCurBufferPointer)[0] = (float)DataReadU8() * posScale;
@ -36,7 +36,7 @@ void LOADERDECL Pos_ReadDirect_UByte(void* _p)
VertexManager::s_pCurBufferPointer += 12;
}
void LOADERDECL Pos_ReadDirect_Byte(void* _p)
void LOADERDECL Pos_ReadDirect_Byte(const void *_p)
{
TVtxAttr* pVtxAttr = (TVtxAttr*)_p;
((float*)VertexManager::s_pCurBufferPointer)[0] = (float)(s8)DataReadU8() * posScale;
@ -49,7 +49,7 @@ void LOADERDECL Pos_ReadDirect_Byte(void* _p)
VertexManager::s_pCurBufferPointer += 12;
}
void LOADERDECL Pos_ReadDirect_UShort(void* _p)
void LOADERDECL Pos_ReadDirect_UShort(const void *_p)
{
TVtxAttr* pVtxAttr = (TVtxAttr*)_p;
((float*)VertexManager::s_pCurBufferPointer)[0] = (float)DataReadU16() * posScale;
@ -62,7 +62,7 @@ void LOADERDECL Pos_ReadDirect_UShort(void* _p)
VertexManager::s_pCurBufferPointer += 12;
}
void LOADERDECL Pos_ReadDirect_Short(void* _p)
void LOADERDECL Pos_ReadDirect_Short(const void *_p)
{
TVtxAttr* pVtxAttr = (TVtxAttr*)_p;
((float*)VertexManager::s_pCurBufferPointer)[0] = (float)(s16)DataReadU16() * posScale;
@ -75,7 +75,7 @@ void LOADERDECL Pos_ReadDirect_Short(void* _p)
VertexManager::s_pCurBufferPointer += 12;
}
void LOADERDECL Pos_ReadDirect_Float(void* _p)
void LOADERDECL Pos_ReadDirect_Float(const void *_p)
{
TVtxAttr* pVtxAttr = (TVtxAttr*)_p;
((float*)VertexManager::s_pCurBufferPointer)[0] = DataReadF32();
@ -127,35 +127,35 @@ void LOADERDECL Pos_ReadDirect_Float(void* _p)
// ==============================================================================
// Index 8
// ==============================================================================
void LOADERDECL Pos_ReadIndex8_UByte(void* _p)
void LOADERDECL Pos_ReadIndex8_UByte(const void *_p)
{
TVtxAttr* pVtxAttr = (TVtxAttr*)_p;
u8 Index = DataReadU8();
Pos_ReadIndex_Byte(u8);
}
void LOADERDECL Pos_ReadIndex8_Byte(void* _p)
void LOADERDECL Pos_ReadIndex8_Byte(const void *_p)
{
TVtxAttr* pVtxAttr = (TVtxAttr*)_p;
u8 Index = DataReadU8();
Pos_ReadIndex_Byte(s8);
}
void LOADERDECL Pos_ReadIndex8_UShort(void* _p)
void LOADERDECL Pos_ReadIndex8_UShort(const void *_p)
{
TVtxAttr* pVtxAttr = (TVtxAttr*)_p;
u8 Index = DataReadU8();
Pos_ReadIndex_Short(u16);
}
void LOADERDECL Pos_ReadIndex8_Short(void* _p)
void LOADERDECL Pos_ReadIndex8_Short(const void *_p)
{
TVtxAttr* pVtxAttr = (TVtxAttr*)_p;
u8 Index = DataReadU8();
Pos_ReadIndex_Short(s16);
}
void LOADERDECL Pos_ReadIndex8_Float(void* _p)
void LOADERDECL Pos_ReadIndex8_Float(const void *_p)
{
TVtxAttr* pVtxAttr = (TVtxAttr*)_p;
u8 Index = DataReadU8();
@ -166,32 +166,32 @@ void LOADERDECL Pos_ReadIndex8_Float(void* _p)
// Index 16
// ==============================================================================
void LOADERDECL Pos_ReadIndex16_UByte(void* _p){
void LOADERDECL Pos_ReadIndex16_UByte(const void *_p){
TVtxAttr* pVtxAttr = (TVtxAttr*)_p;
u16 Index = DataReadU16();
Pos_ReadIndex_Byte(u8);
}
void LOADERDECL Pos_ReadIndex16_Byte(void* _p){
void LOADERDECL Pos_ReadIndex16_Byte(const void *_p){
TVtxAttr* pVtxAttr = (TVtxAttr*)_p;
u16 Index = DataReadU16();
Pos_ReadIndex_Byte(s8);
}
void LOADERDECL Pos_ReadIndex16_UShort(void* _p){
void LOADERDECL Pos_ReadIndex16_UShort(const void *_p){
TVtxAttr* pVtxAttr = (TVtxAttr*)_p;
u16 Index = DataReadU16();
Pos_ReadIndex_Short(u16);
}
void LOADERDECL Pos_ReadIndex16_Short(void* _p)
void LOADERDECL Pos_ReadIndex16_Short(const void *_p)
{
TVtxAttr* pVtxAttr = (TVtxAttr*)_p;
u16 Index = DataReadU16();
Pos_ReadIndex_Short(s16);
}
void LOADERDECL Pos_ReadIndex16_Float(void* _p)
void LOADERDECL Pos_ReadIndex16_Float(const void *_p)
{
TVtxAttr* pVtxAttr = (TVtxAttr*)_p;
u16 Index = DataReadU16();