diff options
| author | Pierre Bourdon <delroth@gmail.com> | 2014-07-26 01:10:44 +0200 |
|---|---|---|
| committer | Pierre Bourdon <delroth@gmail.com> | 2014-07-26 01:35:09 +0200 |
| commit | 73f9a22e2ef8af906a116ad67f1054cc964ae3f0 (patch) | |
| tree | 1dbe03370573168a47d0449df248408f47c747ed /Source/Core/VideoBackends/OGL/VertexManager.cpp | |
| parent | 78c3a220600b6cbbd063693d89d423a985125408 (diff) | |
VertexLoader: Remove global state dependency on g_nativeVertexFmt
Diffstat (limited to 'Source/Core/VideoBackends/OGL/VertexManager.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/OGL/VertexManager.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/Core/VideoBackends/OGL/VertexManager.cpp b/Source/Core/VideoBackends/OGL/VertexManager.cpp index 0ac59041b7..6dce46c239 100644 --- a/Source/Core/VideoBackends/OGL/VertexManager.cpp +++ b/Source/Core/VideoBackends/OGL/VertexManager.cpp @@ -24,7 +24,7 @@ #include "VideoCommon/IndexGenerator.h" #include "VideoCommon/PixelShaderManager.h" #include "VideoCommon/Statistics.h" -#include "VideoCommon/VertexLoader.h" +#include "VideoCommon/VertexLoaderManager.h" #include "VideoCommon/VertexShaderGen.h" #include "VideoCommon/VertexShaderManager.h" #include "VideoCommon/VideoConfig.h" @@ -126,7 +126,7 @@ void VertexManager::Draw(u32 stride) void VertexManager::vFlush(bool useDstAlpha) { - GLVertexFormat *nativeVertexFmt = (GLVertexFormat*)g_nativeVertexFmt; + GLVertexFormat *nativeVertexFmt = (GLVertexFormat*)VertexLoaderManager::GetCurrentVertexFormat(); u32 stride = nativeVertexFmt->GetVertexStride(); if (m_last_vao != nativeVertexFmt->VAO) { @@ -144,18 +144,18 @@ void VertexManager::vFlush(bool useDstAlpha) // the same pass as regular rendering. if (useDstAlpha && dualSourcePossible) { - ProgramShaderCache::SetShader(DSTALPHA_DUAL_SOURCE_BLEND, g_nativeVertexFmt->m_components); + ProgramShaderCache::SetShader(DSTALPHA_DUAL_SOURCE_BLEND, nativeVertexFmt->m_components); } else { - ProgramShaderCache::SetShader(DSTALPHA_NONE,g_nativeVertexFmt->m_components); + ProgramShaderCache::SetShader(DSTALPHA_NONE, nativeVertexFmt->m_components); } // upload global constants ProgramShaderCache::UploadConstants(); // setup the pointers - g_nativeVertexFmt->SetupVertexPointers(); + nativeVertexFmt->SetupVertexPointers(); GL_REPORT_ERRORD(); Draw(stride); @@ -163,7 +163,7 @@ void VertexManager::vFlush(bool useDstAlpha) // run through vertex groups again to set alpha if (useDstAlpha && !dualSourcePossible) { - ProgramShaderCache::SetShader(DSTALPHA_ALPHA_PASS,g_nativeVertexFmt->m_components); + ProgramShaderCache::SetShader(DSTALPHA_ALPHA_PASS, nativeVertexFmt->m_components); // only update alpha glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_TRUE); |
