diff --git a/src/graphics/sp/sp_dynamic_draw_call.hpp b/src/graphics/sp/sp_dynamic_draw_call.hpp index 16fc21bcc..13f648075 100644 --- a/src/graphics/sp/sp_dynamic_draw_call.hpp +++ b/src/graphics/sp/sp_dynamic_draw_call.hpp @@ -137,7 +137,14 @@ public: return m_texture_trans; } // ------------------------------------------------------------------------ - void setUpdateOffset(int offset) { m_update_offset = offset; } + void setUpdateOffset(int offset) + { + // Avoid skipping of vertex buffer update if this function is called + // more than once per frame + if (m_update_offset != -1 && offset > m_update_offset) + return; + m_update_offset = offset; + } // ------------------------------------------------------------------------ bool isVisible() const { return m_visible; } // ------------------------------------------------------------------------