Some gfx code reorg, make the two OpcodeDecoding.cpp identical - next change will move them to videocommon

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1659 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard
2008-12-25 20:07:13 +00:00
parent dcc48d6c41
commit 65e702030a
15 changed files with 197 additions and 194 deletions

View File

@ -360,4 +360,40 @@ void VertexLoader::RunVertices(int count)
this->m_counter = count;
((void (*)())((void*)&m_compiledCode[0]))();
}*/
}
DecodedVArray tempvarray;
namespace VertexLoaderManager
{
void Init()
{
tempvarray.Create(65536*3, 1, 8, 3, 2, 8);
}
void Shutdown()
{
tempvarray.Destroy();
}
int GetVertexSize(int vat)
{
VertexLoader& vtxLoader = g_VertexLoaders[vat];
vtxLoader.Setup();
return vtxLoader.GetVertexSize();
}
void RunVertices(int vat, int primitive, int num_vertices)
{
tempvarray.Reset();
VertexLoader::SetVArray(&tempvarray);
VertexLoader& vtxLoader = g_VertexLoaders[vat];
vtxLoader.Setup();
vtxLoader.PrepareRun();
int vsize = vtxLoader.GetVertexSize();
vtxLoader.RunVertices(num_vertices);
VertexManager::AddVertices(primitive, num_vertices, &tempvarray);
}
}