diff options
| author | Lioncash <mathew1800@gmail.com> | 2019-12-05 10:01:33 -0500 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2019-12-05 10:49:32 -0500 |
| commit | 10f76746515a9a7bd8122f40c33b65813aa17b38 (patch) | |
| tree | 19bb4406998cf8ab523874a5ef7dec6f83fb9ffa /Source/Core/VideoCommon/VertexLoaderManager.cpp | |
| parent | 159947ab68deea502b6a75cc7b38e461122111c9 (diff) | |
VideoCommon/IndexGenerator: Eliminate static state
Now that we've extracted all of the stateless functions that can be
hidden, it's time to make the index generator a regular class with
active data members.
This can just be a member that sits within the vertex manager base
class. By deglobalizing the state of the index generator we also get rid
of the wonky dual-initializing that was going on within the OpenGL
backend.
Since the renderer is always initialized before the vertex manager, we
now only call Init() once throughout the execution lifecycle.
Diffstat (limited to 'Source/Core/VideoCommon/VertexLoaderManager.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/VertexLoaderManager.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/VertexLoaderManager.cpp b/Source/Core/VideoCommon/VertexLoaderManager.cpp index 81b537c297..bcbf64d3d4 100644 --- a/Source/Core/VideoCommon/VertexLoaderManager.cpp +++ b/Source/Core/VideoCommon/VertexLoaderManager.cpp @@ -283,8 +283,7 @@ int RunVertices(int vtx_attr_group, int primitive, int count, DataReader src, bo count = loader->RunVertices(src, dst, count); - IndexGenerator::AddIndices(primitive, count); - + g_vertex_manager->AddIndices(primitive, count); g_vertex_manager->FlushData(count, loader->m_native_vtx_decl.stride); ADDSTAT(g_stats.this_frame.num_prims, count); |
