diff --git a/example/demo.c b/example/demo.c index e952428..145165c 100644 --- a/example/demo.c +++ b/example/demo.c @@ -862,7 +862,12 @@ void updateFPS(struct FPScounter* fps, float frameTime) #define AVG_SIZE 20 -void renderFPS(struct NVGcontext* vg, float x, float y, struct FPScounter* fps, enum FPSRenderStyle style, const char* name) +void renderFPS(struct NVGcontext* vg, float x, float y, struct FPScounter* fps) +{ + renderFPSEx(vg,x,y,fps,RENDER_FPS,NULL); +} + +void renderFPSEx(struct NVGcontext* vg, float x, float y, struct FPScounter* fps, enum FPSRenderStyle style, const char* name) { int i, head; float avg, w, h; diff --git a/example/demo.h b/example/demo.h index 271cc9f..0134e12 100644 --- a/example/demo.h +++ b/example/demo.h @@ -29,7 +29,8 @@ struct FPScounter void initFPS(struct FPScounter* fps); void updateFPS(struct FPScounter* fps, float frameTime); -void renderFPS(struct NVGcontext* vg, float x, float y, struct FPScounter* fps, enum FPSRenderStyle style, const char* name ); +void renderFPSEx(struct NVGcontext* vg, float x, float y, struct FPScounter* fps, enum FPSRenderStyle style, const char* name ); +void renderFPS(struct NVGcontext* vg, float x, float y, struct FPScounter* fps); #ifdef __cplusplus } diff --git a/example/example_gl3.c b/example/example_gl3.c index 83a7411..b0b4b73 100644 --- a/example/example_gl3.c +++ b/example/example_gl3.c @@ -159,9 +159,9 @@ int main() nvgBeginFrame(vg, winWidth, winHeight, pxRatio); renderDemo(vg, mx,my, winWidth,winHeight, t, blowup, &data); - renderFPS(vg, 5,5, &fps, RENDER_FPS, NULL ); - renderFPS(vg, 310,5, &cpuTimes, RENDER_MS, "CPU Time"); - renderFPS(vg, 615,5, &gpuTimes, RENDER_MS, "GPU Time"); + renderFPS(vg, 5,5, &fps); + renderFPSEx(vg, 310,5, &cpuTimes, RENDER_MS, "CPU Time"); + renderFPSEx(vg, 615,5, &gpuTimes, RENDER_MS, "GPU Time"); nvgEndFrame(vg);