From 7397867b21883aa586ae627f7fc00e5f23160e21 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Mon, 16 Sep 2013 15:43:57 +0000 Subject: [PATCH] [GLES3] Enable support for primitive restart. --- Source/Plugins/Plugin_VideoOGL/Src/Render.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp index 5c4073fb0f..a5a50d28ff 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp @@ -373,7 +373,7 @@ Renderer::Renderer() WARN_LOG(VIDEO, "Running the OpenGL ES 3 backend!"); g_Config.backend_info.bSupportsDualSourceBlend = false; g_Config.backend_info.bSupportsGLSLUBO = true; - g_Config.backend_info.bSupportsPrimitiveRestart = false; + g_Config.backend_info.bSupportsPrimitiveRestart = true; g_Config.backend_info.bSupportsEarlyZ = false; g_ogl_config.bSupportsGLSLCache = true; @@ -603,9 +603,11 @@ Renderer::Renderer() glBlendColor(0, 0, 0, 0.5f); glClearDepthf(1.0f); -#ifndef USE_GLES3 if(g_ActiveConfig.backend_info.bSupportsPrimitiveRestart) { +#ifdef USE_GLES3 + glEnable(GL_PRIMITIVE_RESTART_FIXED_INDEX); +#else if(g_ogl_config.bSupportOGL31) { glEnable(GL_PRIMITIVE_RESTART); @@ -616,8 +618,8 @@ Renderer::Renderer() glEnableClientState(GL_PRIMITIVE_RESTART_NV); glPrimitiveRestartIndexNV(65535); } - } #endif + } UpdateActiveConfig(); }