fixed assert

This commit is contained in:
Mikulas Florek 2020-05-31 14:38:41 +02:00
parent 700d5cba92
commit 60b210767a
2 changed files with 3 additions and 1 deletions

View file

@ -235,7 +235,7 @@ function tonemap(hdr_buffer)
beginBlock("tonemap")
local rb
if APP ~= nil or PREVIEW ~= nil then
if APP ~= nil or PREVIEW ~= nil or screenshot_request == 1 then
rb = createRenderbuffer(1, 1, true, "rgba8", "tonemap")
else
rb = createRenderbuffer(1, 1, true, "rgba16f", "tonemap")

View file

@ -36,6 +36,8 @@ Resource::~Resource() = default;
void Resource::refresh() {
if (m_current_state == State::EMPTY) return;
const State old_state = m_current_state;
m_current_state = State::EMPTY;
m_cb.invoke(old_state, m_current_state, *this);