Merge pull request #477 from olliwang/size
Fixes the type of view size.
This commit is contained in:
commit
6fa3b3d519
@ -363,7 +363,7 @@ void nvgDeleteInternal(NVGcontext* ctx)
|
||||
free(ctx);
|
||||
}
|
||||
|
||||
void nvgBeginFrame(NVGcontext* ctx, int windowWidth, int windowHeight, float devicePixelRatio)
|
||||
void nvgBeginFrame(NVGcontext* ctx, float windowWidth, float windowHeight, float devicePixelRatio)
|
||||
{
|
||||
/* printf("Tris: draws:%d fill:%d stroke:%d text:%d TOT:%d\n",
|
||||
ctx->drawCallCount, ctx->fillTriCount, ctx->strokeTriCount, ctx->textTriCount,
|
||||
|
@ -152,7 +152,7 @@ enum NVGimageFlags {
|
||||
// For example, GLFW returns two dimension for an opened window: window size and
|
||||
// frame buffer size. In that case you would set windowWidth/Height to the window size
|
||||
// devicePixelRatio to: frameBufferWidth / windowWidth.
|
||||
void nvgBeginFrame(NVGcontext* ctx, int windowWidth, int windowHeight, float devicePixelRatio);
|
||||
void nvgBeginFrame(NVGcontext* ctx, float windowWidth, float windowHeight, float devicePixelRatio);
|
||||
|
||||
// Cancels drawing the current frame.
|
||||
void nvgCancelFrame(NVGcontext* ctx);
|
||||
@ -653,7 +653,7 @@ struct NVGparams {
|
||||
int (*renderDeleteTexture)(void* uptr, int image);
|
||||
int (*renderUpdateTexture)(void* uptr, int image, int x, int y, int w, int h, const unsigned char* data);
|
||||
int (*renderGetTextureSize)(void* uptr, int image, int* w, int* h);
|
||||
void (*renderViewport)(void* uptr, int width, int height, float devicePixelRatio);
|
||||
void (*renderViewport)(void* uptr, float width, float height, float devicePixelRatio);
|
||||
void (*renderCancel)(void* uptr);
|
||||
void (*renderFlush)(void* uptr);
|
||||
void (*renderFill)(void* uptr, NVGpaint* paint, NVGcompositeOperationState compositeOperation, NVGscissor* scissor, float fringe, const float* bounds, const NVGpath* paths, int npaths);
|
||||
|
@ -989,12 +989,12 @@ static void glnvg__setUniforms(GLNVGcontext* gl, int uniformOffset, int image)
|
||||
}
|
||||
}
|
||||
|
||||
static void glnvg__renderViewport(void* uptr, int width, int height, float devicePixelRatio)
|
||||
static void glnvg__renderViewport(void* uptr, float width, float height, float devicePixelRatio)
|
||||
{
|
||||
NVG_NOTUSED(devicePixelRatio);
|
||||
GLNVGcontext* gl = (GLNVGcontext*)uptr;
|
||||
gl->view[0] = (float)width;
|
||||
gl->view[1] = (float)height;
|
||||
gl->view[0] = width;
|
||||
gl->view[1] = height;
|
||||
}
|
||||
|
||||
static void glnvg__fill(GLNVGcontext* gl, GLNVGcall* call)
|
||||
|
Loading…
x
Reference in New Issue
Block a user