From ee72852491dfa2c6246d9e2808b782444e2ce4ca Mon Sep 17 00:00:00 2001 From: rodolfoosvaldobogado Date: Fri, 26 Oct 2012 23:18:09 -0300 Subject: 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 --- Source/Core/VideoCommon/Src/VertexManagerBase.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Source/Core/VideoCommon/Src/VertexManagerBase.cpp') 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(); } -- cgit v1.2.3