Fixed compilation with MSVC.
This commit is contained in:
parent
6768be18f0
commit
2819104b6a
@ -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<Uint32>(VERTICES.size())});
|
||||
renderPass.end();
|
||||
cmdBuffer.submit();
|
||||
}
|
||||
|
@ -49,13 +49,13 @@ void Application::update(const AppUpdateArgs&)
|
||||
|
||||
void Application::run(std::span<const char*> 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<sdlpp::sdl_event_t> event;
|
||||
@ -71,7 +71,7 @@ void Application::run(std::span<const char*> 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<std::chrono::duration<float>>(frameTime - startTime).count(),
|
||||
.tickSeconds = std::chrono::duration_cast<std::chrono::duration<float>>(frameTime - lastFrameTime).count()
|
||||
|
@ -849,7 +849,7 @@ public:
|
||||
/* command_buffer = */ mHandle,
|
||||
/* slot_index = */ slotIndex,
|
||||
/* data = */ data.data(),
|
||||
/* length = */ data.size_bytes()
|
||||
/* length = */ static_cast<Uint32>(data.size_bytes())
|
||||
);
|
||||
}
|
||||
|
||||
@ -860,7 +860,7 @@ public:
|
||||
/* command_buffer = */ mHandle,
|
||||
/* slot_index = */ slotIndex,
|
||||
/* data = */ data.data(),
|
||||
/* length = */ data.size_bytes()
|
||||
/* length = */ static_cast<Uint32>(data.size_bytes())
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user