Merge branch 'master' of https://github.com/memononen/nanovg
This commit is contained in:
commit
bfd5d11f27
@ -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.
|
||||
|
@ -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];
|
||||
|
@ -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…
x
Reference in New Issue
Block a user