1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Split CIndexBuffer from CMeshBuffer

This commit is contained in:
sfan5 2024-08-27 17:40:29 +02:00
parent 5d6e15bc49
commit 47e4c33a50
13 changed files with 197 additions and 104 deletions

View file

@ -1358,11 +1358,8 @@ video::SMaterial &ClientMap::DrawDescriptor::getMaterial()
u32 ClientMap::DrawDescriptor::draw(video::IVideoDriver* driver)
{
if (m_use_partial_buffer) {
m_partial_buffer->beforeDraw();
driver->drawMeshBuffer(m_partial_buffer->getBuffer());
auto count = m_partial_buffer->getBuffer()->getVertexCount();
m_partial_buffer->afterDraw();
return count;
m_partial_buffer->draw(driver);
return m_partial_buffer->getBuffer()->getVertexCount();
} else {
driver->drawMeshBuffer(m_buffer);
return m_buffer->getVertexCount();