diff --git a/private/sdl_gpu_test/3_textured_quad/app.cpp b/private/sdl_gpu_test/3_textured_quad/app.cpp index 9efcd5c..c430212 100644 --- a/private/sdl_gpu_test/3_textured_quad/app.cpp +++ b/private/sdl_gpu_test/3_textured_quad/app.cpp @@ -128,7 +128,7 @@ void TexturedQuadApp::update(const AppUpdateArgs& args) renderPass.bindFragmentSampler({.texture = mTexture, .sampler = mSampler}); renderPass.bindGraphicsPipeline(mPipeline); renderPass.bindVertexBuffer({.buffer = mVertexBuffer}); - renderPass.drawPrimitives({.numVertices = VERTICES.size()}); + renderPass.drawPrimitives({.numVertices = static_cast(VERTICES.size())}); renderPass.end(); cmdBuffer.submit(); } diff --git a/private/sdl_gpu_test/application.cpp b/private/sdl_gpu_test/application.cpp index 785f15b..8206118 100644 --- a/private/sdl_gpu_test/application.cpp +++ b/private/sdl_gpu_test/application.cpp @@ -49,13 +49,13 @@ void Application::update(const AppUpdateArgs&) void Application::run(std::span args) { - using clock_t = std::chrono::steady_clock; + using app_clock_t = std::chrono::steady_clock; init({ .programArgs = args }); - const clock_t::time_point startTime = clock_t::now(); - clock_t::time_point lastFrameTime = startTime; + const app_clock_t::time_point startTime = app_clock_t::now(); + app_clock_t::time_point lastFrameTime = startTime; while (mRunning) { std::optional event; @@ -71,7 +71,7 @@ void Application::run(std::span args) }, *event); } - const clock_t::time_point frameTime = clock_t::now(); + const app_clock_t::time_point frameTime = app_clock_t::now(); update({ .secondsSinceStart = std::chrono::duration_cast>(frameTime - startTime).count(), .tickSeconds = std::chrono::duration_cast>(frameTime - lastFrameTime).count() diff --git a/private/sdl_gpu_test/sdlpp/gpu.hpp b/private/sdl_gpu_test/sdlpp/gpu.hpp index b4bcf4d..813de24 100644 --- a/private/sdl_gpu_test/sdlpp/gpu.hpp +++ b/private/sdl_gpu_test/sdlpp/gpu.hpp @@ -849,7 +849,7 @@ public: /* command_buffer = */ mHandle, /* slot_index = */ slotIndex, /* data = */ data.data(), - /* length = */ data.size_bytes() + /* length = */ static_cast(data.size_bytes()) ); } @@ -860,7 +860,7 @@ public: /* command_buffer = */ mHandle, /* slot_index = */ slotIndex, /* data = */ data.data(), - /* length = */ data.size_bytes() + /* length = */ static_cast(data.size_bytes()) ); }