From eff24cc040b1a2df382d2036b2fe1e4a42e8853c Mon Sep 17 00:00:00 2001 From: Douglas Cox Date: Wed, 21 May 2014 17:47:57 -0400 Subject: [PATCH] Removed GL_BLEND disable and enable inside glnvg__fill() to prevent performance warning: "Fragment Shader is going to be recompiled because the shader key based on GL state mismatches." --- src/nanovg_gl.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/nanovg_gl.h b/src/nanovg_gl.h index df3f8dc..28be0d0 100644 --- a/src/nanovg_gl.h +++ b/src/nanovg_gl.h @@ -812,7 +812,6 @@ static void glnvg__fill(struct GLNVGcontext* gl, struct GLNVGcall* call) int i, npaths = call->pathCount; // Draw shapes - glDisable(GL_BLEND); glEnable(GL_STENCIL_TEST); glStencilMask(0xff); glStencilFunc(GL_ALWAYS, 0, ~0L); @@ -831,7 +830,6 @@ static void glnvg__fill(struct GLNVGcontext* gl, struct GLNVGcall* call) // Draw aliased off-pixels glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); - glEnable(GL_BLEND); glnvg__setUniforms(gl, call->uniformOffset + gl->fragSize, call->image); glnvg__checkError("fill fill");