diff options
| author | memberTwo.mb2 <memberTwo.mb2@gmail.com> | 2008-09-29 17:29:25 +0000 |
|---|---|---|
| committer | memberTwo.mb2 <memberTwo.mb2@gmail.com> | 2008-09-29 17:29:25 +0000 |
| commit | df9eba79b2f9efd451bee3fdfb683b3b2976bb1b (patch) | |
| tree | d46276e4cc4008fea6cca21c9226273d3a1a0671 /Source/Plugins/Plugin_VideoOGL/Src/VertexLoader.cpp | |
| parent | d80178bd89294b64ec961e81e909c7b5e03d01e8 (diff) | |
DataReader migration to faster one: first step.
TODO: doing it for DX9, move DataReader to VideoCommon, remove dirty debug #def if ok
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@729 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Plugins/Plugin_VideoOGL/Src/VertexLoader.cpp')
| -rw-r--r-- | Source/Plugins/Plugin_VideoOGL/Src/VertexLoader.cpp | 37 |
1 files changed, 5 insertions, 32 deletions
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/VertexLoader.cpp b/Source/Plugins/Plugin_VideoOGL/Src/VertexLoader.cpp index 594d8b2b61..983bb845ac 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/VertexLoader.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/VertexLoader.cpp @@ -61,34 +61,6 @@ static int colIndex; #undef inline
#define inline
#endif
-inline u8 ReadBuffer8()
-{
- return g_pDataReader->Read8();
-}
-
-inline u16 ReadBuffer16()
-{
- //PowerPC byte ordering :(
- return g_pDataReader->Read16();
-}
-
-inline u32 ReadBuffer32()
-{
- //PowerPC byte ordering :(
- return g_pDataReader->Read32();
-}
-
-inline float ReadBuffer32F()
-{
- u32 temp = g_pDataReader->Read32();
- return *(float*)(&temp);
-}
-
-
-inline int GetBufferPosition()
-{
- return g_pDataReader->GetPosition();
-}
// ==============================================================================
// Direct
@@ -98,7 +70,7 @@ static int s_texmtxwrite = 0, s_texmtxread = 0; void LOADERDECL PosMtx_ReadDirect_UByte(void* _p)
{
- s_curposmtx = ReadBuffer8()&0x3f;
+ s_curposmtx = DataReadU8()&0x3f;
PRIM_LOG("posmtx: %d, ", s_curposmtx);
}
@@ -112,7 +84,7 @@ void LOADERDECL PosMtx_Write(void* _p) void LOADERDECL TexMtx_ReadDirect_UByte(void* _p)
{
- s_curtexmtx[s_texmtxread] = ReadBuffer8()&0x3f;
+ s_curtexmtx[s_texmtxread] = DataReadU8()&0x3f;
PRIM_LOG("texmtx%d: %d, ", s_texmtxread, s_curtexmtx[s_texmtxread]);
s_texmtxread++;
}
@@ -704,9 +676,10 @@ void VertexLoader::RunVertices(int primitive, int count) if( fnSetupVertexPointers != NULL && fnSetupVertexPointers != (void (*)())(void*)m_compiledCode )
VertexManager::Flush();
- if( bpmem.genMode.cullmode == 3 && primitive < 5) {
+ if( bpmem.genMode.cullmode == 3 && primitive < 5)
+ {
// if cull mode is none, ignore triangles and quads
- g_pDataReader->Skip(count*m_VertexSize);
+ DataSkip(count*m_VertexSize);
return;
}
|
