mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Set VBO hints in more places
This commit is contained in:
parent
fbec378869
commit
5280863300
5 changed files with 19 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue