Avoid skipping of vertex buffer update if called more than once per frame
This commit is contained in:
parent
22f8095cb0
commit
c3354923db
@ -137,7 +137,14 @@ public:
|
|||||||
return m_texture_trans;
|
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; }
|
bool isVisible() const { return m_visible; }
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user