This commit is contained in:
Andrew Belt 2017-09-22 14:24:25 -04:00
commit bfd5d11f27
3 changed files with 9 additions and 2 deletions

View File

@ -873,7 +873,8 @@ error:
int fonsAddFont(FONScontext* stash, const char* name, const char* path)
{
FILE* fp = 0;
int dataSize = 0, readed;
int dataSize = 0;
size_t readed;
unsigned char* data = NULL;
// Read in the font data.

View File

@ -390,7 +390,6 @@ void nvgCancelFrame(NVGcontext* ctx)
void nvgEndFrame(NVGcontext* ctx)
{
NVGstate* state = nvg__getState(ctx);
ctx->params.renderFlush(ctx->params.userPtr);
if (ctx->fontImageIdx != 0) {
int fontImage = ctx->fontImages[ctx->fontImageIdx];

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;