mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-12 16:15:20 +02:00
Set VBO hints in more places
This commit is contained in:
@@ -818,6 +818,18 @@ void GenericCAO::addToScene(ITextureSource *tsrc, scene::ISceneManager *smgr)
|
||||
<<"\" not supported"<<std::endl;
|
||||
}
|
||||
|
||||
/* Set VBO hint */
|
||||
// - if shaders are disabled we modify the mesh often
|
||||
// - sprites are also modified often
|
||||
// - the wieldmesh sets its own hint
|
||||
// - bone transformations do not need to modify the vertex data
|
||||
if (m_enable_shaders && (m_meshnode || m_animated_meshnode)) {
|
||||
if (m_meshnode)
|
||||
m_meshnode->getMesh()->setHardwareMappingHint(scene::EHM_STATIC);
|
||||
if (m_animated_meshnode)
|
||||
m_animated_meshnode->getMesh()->setHardwareMappingHint(scene::EHM_STATIC);
|
||||
}
|
||||
|
||||
/* don't update while punch texture modifier is active */
|
||||
if (m_reset_textures_timer < 0)
|
||||
updateTextures(m_current_texture_modifier);
|
||||
|
Reference in New Issue
Block a user