mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 20:28:56 +00:00
VideoCommon: small VertexLoader(Manager)? refactoring
This commit is contained in:
parent
010a0d481a
commit
3437c7f060
5 changed files with 31 additions and 38 deletions
|
@ -96,7 +96,7 @@ void MarkAllDirty()
|
|||
s_attr_dirty = 0xff;
|
||||
}
|
||||
|
||||
static void RefreshLoader(int vtx_attr_group)
|
||||
static VertexLoader* RefreshLoader(int vtx_attr_group)
|
||||
{
|
||||
if ((s_attr_dirty >> vtx_attr_group) & 1)
|
||||
{
|
||||
|
@ -116,21 +116,27 @@ static void RefreshLoader(int vtx_attr_group)
|
|||
}
|
||||
}
|
||||
s_attr_dirty &= ~(1 << vtx_attr_group);
|
||||
return g_VertexLoaders[vtx_attr_group];
|
||||
}
|
||||
|
||||
void RunVertices(int vtx_attr_group, int primitive, int count)
|
||||
{
|
||||
if (!count)
|
||||
return;
|
||||
RefreshLoader(vtx_attr_group)->RunVertices(vtx_attr_group, primitive, count);
|
||||
}
|
||||
|
||||
RefreshLoader(vtx_attr_group);
|
||||
g_VertexLoaders[vtx_attr_group]->RunVertices(vtx_attr_group, primitive, count);
|
||||
void SkipVertices(int vtx_attr_group, int count)
|
||||
{
|
||||
if (!count)
|
||||
return;
|
||||
u32 stride = RefreshLoader(vtx_attr_group)->GetVertexSize();
|
||||
DataSkip(count * stride);
|
||||
}
|
||||
|
||||
int GetVertexSize(int vtx_attr_group)
|
||||
{
|
||||
RefreshLoader(vtx_attr_group);
|
||||
return g_VertexLoaders[vtx_attr_group]->GetVertexSize();
|
||||
return RefreshLoader(vtx_attr_group)->GetVertexSize();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue