Browse Source

Clear frag uniforms before filling

shared-context
Mikko Mononen 11 years ago
parent
commit
8f16ad0e07
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      src/nanovg_gl3buf.h

+ 3
- 0
src/nanovg_gl3buf.h View File

@@ -708,6 +708,8 @@ static int glnvg__convertPaint(struct GLNVGcontext* gl, struct GLNVGfragUniforms
struct GLNVGtexture* tex = NULL;
float invxform[6];

memset(frag, 0, sizeof(*frag));

frag->innerCol = paint->innerColor;
frag->outerCol = paint->outerColor;

@@ -1098,6 +1100,7 @@ static void glnvg__renderFill(void* uptr, struct NVGpaint* paint, struct NVGscis
call->uniformOffset = glnvg__allocFragUniforms(gl, 2);
// Simple shader for stencil
frag = nvg__fragUniformPtr(gl, call->uniformOffset);
memset(frag, 0, sizeof(*frag));
frag->type = NSVG_SHADER_SIMPLE;
// Fill shader
glnvg__convertPaint(gl, nvg__fragUniformPtr(gl, call->uniformOffset + gl->fragSize), paint, scissor, fringe, fringe);


Loading…
Cancel
Save