Revert "Set VBO hints in more places"

This commit is contained in:
Gregor Parzefall 2024-09-12 19:28:37 +02:00 committed by SmallJoker
parent 73c29e7763
commit a8e7e261b9
4 changed files with 0 additions and 15 deletions

@ -817,18 +817,6 @@ 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);

@ -139,7 +139,6 @@ 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); // FIXME: incorrectly stack allocated, not safe!
}
void Hud::readScalingSetting()

@ -571,7 +571,6 @@ scene::SMeshBuffer *Minimap::getMinimapMeshBuffer()
buf->Indices[4] = 3;
buf->Indices[5] = 0;
buf->setHardwareMappingHint(scene::EHM_STATIC);
return buf;
}

@ -1046,7 +1046,6 @@ void CGUITTFont::createSharedPlane()
buf->append(vertices, 4, indices, 6);
shared_plane_.addMeshBuffer( buf );
shared_plane_.setHardwareMappingHint(EHM_STATIC);
shared_plane_ptr_ = &shared_plane_;
buf->drop(); //the addMeshBuffer method will grab it, so we can drop this ptr.