Skip to content

Commit

Permalink
fix #724
Browse files Browse the repository at this point in the history
  • Loading branch information
mehah committed Apr 1, 2024
1 parent 2587db2 commit b610d9d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/framework/graphics/drawpoolmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ void DrawPoolManager::preDraw(const DrawPoolType type, const std::function<void(
select(type);
const auto pool = getCurrentPool();

if (pool->hasFrameBuffer() && pool->m_repaint.load())
if (pool->m_repaint.load())
return;

pool->resetState();
Expand All @@ -190,6 +190,8 @@ bool DrawPoolManager::drawPool(DrawPool* pool) {
return false;

if (!pool->hasFrameBuffer()) {
pool->m_repaint.store(false);

for (const auto& obj : pool->m_objectsDraw) {
drawObject(obj);
}
Expand Down
2 changes: 1 addition & 1 deletion src/framework/graphics/drawpoolmanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class DrawPoolManager
DrawPool* get(const DrawPoolType type) const { return m_pools[static_cast<uint8_t>(type)]; }

void select(DrawPoolType type);
void preDraw(const DrawPoolType type, const std::function<void()>& f) { return preDraw(type, f, {}, {}); }
void preDraw(const DrawPoolType type, const std::function<void()>& f) { preDraw(type, f, {}, {}); }
void preDraw(DrawPoolType type, const std::function<void()>& f, const Rect& dest, const Rect& src, const Color& colorClear = Color::alpha);

void addTexturedPoint(const TexturePtr& texture, const Point& point, const Color& color = Color::white) const
Expand Down

0 comments on commit b610d9d

Please sign in to comment.