diff options
Diffstat (limited to '3rdparty/bgfx/examples/common/nanovg/nanovg.cpp')
-rw-r--r-- | 3rdparty/bgfx/examples/common/nanovg/nanovg.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/3rdparty/bgfx/examples/common/nanovg/nanovg.cpp b/3rdparty/bgfx/examples/common/nanovg/nanovg.cpp index 1cbb58b5794..bb0e6bb3571 100644 --- a/3rdparty/bgfx/examples/common/nanovg/nanovg.cpp +++ b/3rdparty/bgfx/examples/common/nanovg/nanovg.cpp @@ -296,7 +296,7 @@ void nvgDeleteInternal(NVGcontext* ctx) free(ctx); } -void nvgBeginFrame(NVGcontext* ctx, int windowWidth, int windowHeight, float devicePixelRatio) +void nvgBeginFrameScaled(NVGcontext* ctx, int windowWidth, int windowHeight, int surfaceWidth, int surfaceHeight, float devicePixelRatio) { /* printf("Tris: draws:%d fill:%d stroke:%d text:%d TOT:%d\n", ctx->drawCallCount, ctx->fillTriCount, ctx->strokeTriCount, ctx->textTriCount, @@ -307,8 +307,8 @@ void nvgBeginFrame(NVGcontext* ctx, int windowWidth, int windowHeight, float dev nvgReset(ctx); nvg__setDevicePixelRatio(ctx, devicePixelRatio); - - ctx->params.renderViewport(ctx->params.userPtr, windowWidth, windowHeight); + + ctx->params.renderViewport(ctx->params.userPtr, windowWidth, windowHeight, surfaceWidth, surfaceHeight); ctx->drawCallCount = 0; ctx->fillTriCount = 0; @@ -316,6 +316,11 @@ void nvgBeginFrame(NVGcontext* ctx, int windowWidth, int windowHeight, float dev ctx->textTriCount = 0; } +void nvgBeginFrame(NVGcontext* ctx, int windowWidth, int windowHeight, float devicePixelRatio) +{ + nvgBeginFrameScaled(ctx, windowWidth, windowHeight, windowWidth, windowHeight, devicePixelRatio); +} + void nvgCancelFrame(NVGcontext* ctx) { ctx->params.renderCancel(ctx->params.userPtr); |