Browse Source

Merge pull request #405 from Joshua-Ashton/master

Fix MSVC 2017 compiler warning
shared-context
Mikko Mononen GitHub 7 years ago
parent
commit
e3033362e5
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      src/nanovg_gl.h

+ 7
- 0
src/nanovg_gl.h View File

@@ -945,10 +945,17 @@ static int glnvg__convertPaint(GLNVGcontext* gl, GLNVGfragUniforms* frag, NVGpai
}
frag->type = NSVG_SHADER_FILLIMG;

#if NANOVG_GL_USE_UNIFORMBUFFER
if (tex->type == NVG_TEXTURE_RGBA)
frag->texType = (tex->flags & NVG_IMAGE_PREMULTIPLIED) ? 0 : 1;
else
frag->texType = 2;
#else
if (tex->type == NVG_TEXTURE_RGBA)
frag->texType = (tex->flags & NVG_IMAGE_PREMULTIPLIED) ? 0.0f : 1.0f;
else
frag->texType = 2.0f;
#endif
// printf("frag->texType = %d\n", frag->texType);
} else {
frag->type = NSVG_SHADER_FILLGRAD;


Loading…
Cancel
Save