diff options
| author | rodolfoosvaldobogado <rodolfoosvaldobogado@gmail.com> | 2012-10-26 23:18:09 -0300 |
|---|---|---|
| committer | rodolfoosvaldobogado <rodolfoosvaldobogado@gmail.com> | 2012-10-26 23:18:09 -0300 |
| commit | ee72852491dfa2c6246d9e2808b782444e2ce4ca (patch) | |
| tree | b3e09f6aa07fcbab30c449952b3cf159772976c1 /Source/Core/VideoCommon | |
| parent | eaa1ea71c1b5abda68ab46d1039b06b56a0bd074 (diff) | |
implement some code to reduce the amounts of calls to setup vertex format, in d3d9 it gives no noticeable speedup, in opengl it still does not work right.
thanks to neobrain for the idea
Diffstat (limited to 'Source/Core/VideoCommon')
| -rw-r--r-- | Source/Core/VideoCommon/Src/VertexManagerBase.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/Src/VertexManagerBase.cpp b/Source/Core/VideoCommon/Src/VertexManagerBase.cpp index 4118e3dcbd..7c1fe9ff6c 100644 --- a/Source/Core/VideoCommon/Src/VertexManagerBase.cpp +++ b/Source/Core/VideoCommon/Src/VertexManagerBase.cpp @@ -159,6 +159,9 @@ void VertexManager::AddVertices(int primitive, int numVertices) void VertexManager::Flush() { + if (LocalVBuffer == s_pCurBufferPointer) return; + if (Flushed) return; + Flushed = true; g_vertex_manager->vFlush(); } |
