summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/OGL/VertexManager.cpp
diff options
context:
space:
mode:
authorMarkus Wick <degasus@users.noreply.github.com>2017-03-16 21:39:17 +0100
committerGitHub <noreply@github.com>2017-03-16 21:39:17 +0100
commita0acdfc070d5bed422d3cdafd7675fc28af4eed5 (patch)
tree0edd5873022cafad1caf3c9588ae6fda8e201d75 /Source/Core/VideoBackends/OGL/VertexManager.cpp
parentb2ab713ad93f8734fc65e104f4dc6c1c9a3e9411 (diff)
parent134317e07f7c371000389e7c3f45ceaf046eea69 (diff)
Merge pull request #5029 from ligfx/bboximagemask
OGL: implement Bounding Box on systems w/o SSBO
Diffstat (limited to 'Source/Core/VideoBackends/OGL/VertexManager.cpp')
-rw-r--r--Source/Core/VideoBackends/OGL/VertexManager.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/Source/Core/VideoBackends/OGL/VertexManager.cpp b/Source/Core/VideoBackends/OGL/VertexManager.cpp
index bd9878b692..58d7b19ad9 100644
--- a/Source/Core/VideoBackends/OGL/VertexManager.cpp
+++ b/Source/Core/VideoBackends/OGL/VertexManager.cpp
@@ -14,9 +14,11 @@
#include "Common/GL/GLExtensions/GLExtensions.h"
#include "Common/StringUtil.h"
+#include "VideoBackends/OGL/BoundingBox.h"
#include "VideoBackends/OGL/ProgramShaderCache.h"
#include "VideoBackends/OGL/Render.h"
#include "VideoBackends/OGL/StreamBuffer.h"
+#include "VideoCommon/BoundingBox.h"
#include "VideoCommon/IndexGenerator.h"
#include "VideoCommon/Statistics.h"
@@ -156,8 +158,19 @@ void VertexManager::vFlush()
// setup the pointers
nativeVertexFmt->SetupVertexPointers();
+ if (::BoundingBox::active && !g_Config.BBoxUseFragmentShaderImplementation())
+ {
+ glEnable(GL_STENCIL_TEST);
+ }
+
Draw(stride);
+ if (::BoundingBox::active && !g_Config.BBoxUseFragmentShaderImplementation())
+ {
+ OGL::BoundingBox::StencilWasUpdated();
+ glDisable(GL_STENCIL_TEST);
+ }
+
#if defined(_DEBUG) || defined(DEBUGFAST)
if (g_ActiveConfig.iLog & CONF_SAVESHADERS)
{
@@ -177,7 +190,6 @@ void VertexManager::vFlush()
}
#endif
g_Config.iSaveTargetId++;
-
ClearEFBCache();
}