mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-05 19:31: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);
|
||||
|
|
|
@ -135,6 +135,7 @@ Hud::Hud(Client *client, LocalPlayer *player,
|
|||
|
||||
m_rotation_mesh_buffer.getMaterial().Lighting = false;
|
||||
m_rotation_mesh_buffer.getMaterial().MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL;
|
||||
m_rotation_mesh_buffer.setHardwareMappingHint(scene::EHM_STATIC);
|
||||
}
|
||||
|
||||
Hud::~Hud()
|
||||
|
|
|
@ -571,6 +571,7 @@ scene::SMeshBuffer *Minimap::getMinimapMeshBuffer()
|
|||
buf->Indices[4] = 3;
|
||||
buf->Indices[5] = 0;
|
||||
|
||||
buf->setHardwareMappingHint(scene::EHM_STATIC);
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue