diff --git a/src/api/graphics.c b/src/api/graphics.c index 5f5c2974..4ad79fe1 100644 --- a/src/api/graphics.c +++ b/src/api/graphics.c @@ -374,7 +374,7 @@ int l_lovrGraphicsGetStats(lua_State* L) { lua_createtable(L, 0, 2); } - GpuStats stats = lovrGraphicsGetStats(); + GraphicsStats stats = lovrGraphicsGetStats(); lua_pushinteger(L, stats.drawCalls); lua_setfield(L, 1, "drawcalls"); diff --git a/src/graphics/gpu.h b/src/graphics/gpu.h index b3f77b3d..f52bf280 100644 --- a/src/graphics/gpu.h +++ b/src/graphics/gpu.h @@ -15,7 +15,7 @@ typedef struct { int shaderSwitches; int drawCalls; -} GpuStats; +} GraphicsStats; typedef enum { BLEND_ALPHA, @@ -120,7 +120,6 @@ void gpuDestroy(); void gpuClear(Canvas** canvas, int canvasCount, Color* color, float* depth, int* stencil); void gpuDraw(GpuDrawCommand* command); void gpuPresent(); -GpuStats gpuGetStats(); // Ephemeral void gpuBindFramebuffer(uint32_t framebuffer); diff --git a/src/graphics/graphics.c b/src/graphics/graphics.c index ddb4fa70..b13cb47b 100644 --- a/src/graphics/graphics.c +++ b/src/graphics/graphics.c @@ -144,10 +144,6 @@ void lovrGraphicsGetDimensions(int* width, int* height) { glfwGetFramebufferSize(state.window, width, height); } -GpuStats lovrGraphicsGetStats() { - return gpuGetStats(); -} - // State Color lovrGraphicsGetBackgroundColor() { diff --git a/src/graphics/graphics.h b/src/graphics/graphics.h index 33d8cff0..1b02d7c2 100644 --- a/src/graphics/graphics.h +++ b/src/graphics/graphics.h @@ -72,7 +72,7 @@ void lovrGraphicsClear(Color* color, float* depth, int* stencil); void lovrGraphicsPresent(); void lovrGraphicsCreateWindow(int w, int h, bool fullscreen, int msaa, const char* title, const char* icon); void lovrGraphicsGetDimensions(int* width, int* height); -GpuStats lovrGraphicsGetStats(); +GraphicsStats lovrGraphicsGetStats(); // State Color lovrGraphicsGetBackgroundColor(); diff --git a/src/graphics/opengl/gpu.c b/src/graphics/opengl/gpu.c index 572478e0..6aea2a59 100644 --- a/src/graphics/opengl/gpu.c +++ b/src/graphics/opengl/gpu.c @@ -29,7 +29,7 @@ static struct { uint32_t vertexBuffer; uint32_t viewport[4]; bool srgb; - GpuStats stats; + GraphicsStats stats; } state; static void gammaCorrectColor(Color* color) { @@ -353,7 +353,7 @@ void gpuPresent() { memset(&state.stats, 0, sizeof(state.stats)); } -GpuStats gpuGetStats() { +GraphicsStats lovrGraphicsGetStats() { return state.stats; }