SOPHIA_ASSERT

This commit is contained in:
2026-09-09 02:02:03 -07:00
parent 73d2121bc1
commit 9aef3f57fc
8 changed files with 57 additions and 26 deletions
+5 -5
View File
@@ -1,7 +1,7 @@
#include "render_context.hpp"
#include <cassert>
#include <limits>
#include <sophia/util/assert.hpp>
#include <sophia/util/logger.hpp>
#include <stdexcept>
@@ -16,8 +16,8 @@ RenderContext::RenderContext(Window& window, Device& device)
RenderContext::~RenderContext() { this->device.waitIdle(); }
vk::CommandBuffer RenderContext::beginFrame() {
assert(!this->isFrameStarted &&
"Can't call beginFrame while already in progress");
SOPHIA_ASSERT(!this->isFrameStarted,
"Can't call beginFrame while already in progress");
FrameData& frame = this->frames[this->currentFrameIndex];
@@ -71,8 +71,8 @@ vk::CommandBuffer RenderContext::beginFrame() {
}
void RenderContext::endFrame() {
assert(this->isFrameStarted &&
"Can't call endFrame while no frame is in progress");
SOPHIA_ASSERT(this->isFrameStarted,
"Can't call endFrame while no frame is in progress");
FrameData& frame = this->frames[this->currentFrameIndex];
frame.commandBuffer.end();