summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/OGL/VertexManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/VideoBackends/OGL/VertexManager.cpp')
-rw-r--r--Source/Core/VideoBackends/OGL/VertexManager.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/Source/Core/VideoBackends/OGL/VertexManager.cpp b/Source/Core/VideoBackends/OGL/VertexManager.cpp
index e696aca536..1a162b1cde 100644
--- a/Source/Core/VideoBackends/OGL/VertexManager.cpp
+++ b/Source/Core/VideoBackends/OGL/VertexManager.cpp
@@ -101,9 +101,11 @@ void VertexManager::Draw(u32 stride)
{
case PRIMITIVE_POINTS:
primitive_mode = GL_POINTS;
+ glDisable(GL_CULL_FACE);
break;
case PRIMITIVE_LINES:
primitive_mode = GL_LINES;
+ glDisable(GL_CULL_FACE);
break;
case PRIMITIVE_TRIANGLES:
primitive_mode = g_ActiveConfig.backend_info.bSupportsPrimitiveRestart ? GL_TRIANGLE_STRIP : GL_TRIANGLES;
@@ -120,6 +122,9 @@ void VertexManager::Draw(u32 stride)
}
INCSTAT(stats.thisFrame.numDrawCalls);
+
+ if (current_primitive_type != PRIMITIVE_TRIANGLES)
+ ((OGL::Renderer*)g_renderer)->SetGenerationMode();
}
void VertexManager::vFlush(bool useDstAlpha)
@@ -142,11 +147,11 @@ void VertexManager::vFlush(bool useDstAlpha)
// the same pass as regular rendering.
if (useDstAlpha && dualSourcePossible)
{
- ProgramShaderCache::SetShader(DSTALPHA_DUAL_SOURCE_BLEND, nativeVertexFmt->m_components);
+ ProgramShaderCache::SetShader(DSTALPHA_DUAL_SOURCE_BLEND, nativeVertexFmt->m_components, current_primitive_type);
}
else
{
- ProgramShaderCache::SetShader(DSTALPHA_NONE, nativeVertexFmt->m_components);
+ ProgramShaderCache::SetShader(DSTALPHA_NONE, nativeVertexFmt->m_components, current_primitive_type);
}
// upload global constants
@@ -160,7 +165,7 @@ void VertexManager::vFlush(bool useDstAlpha)
// run through vertex groups again to set alpha
if (useDstAlpha && !dualSourcePossible)
{
- ProgramShaderCache::SetShader(DSTALPHA_ALPHA_PASS, nativeVertexFmt->m_components);
+ ProgramShaderCache::SetShader(DSTALPHA_ALPHA_PASS, nativeVertexFmt->m_components, current_primitive_type);
// only update alpha
glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_TRUE);