forked from Mirrorlandia_minetest/minetest
Allow using VBOs for meshes all the way down to 4 vertices (#14366)
This may improve performance substantially if there are many meshes with "few" vertices that would otherwise be retransmitted to the GPU every frame. In testing, this does not seem to decrease performance, even if as few as 4 vertices are used (e.g. particles).
This commit is contained in:
parent
a14320fc44
commit
e2ccd14c05
@ -114,12 +114,6 @@ bool ClientLauncher::run(GameStartData &start_data, const Settings &cmd_args)
|
|||||||
|
|
||||||
m_rendering_engine->setupTopLevelWindow();
|
m_rendering_engine->setupTopLevelWindow();
|
||||||
|
|
||||||
/*
|
|
||||||
This changes the minimum allowed number of vertices in a VBO.
|
|
||||||
Default is 500.
|
|
||||||
*/
|
|
||||||
//driver->setMinHardwareBufferVertexCount(50);
|
|
||||||
|
|
||||||
// Create game callback for menus
|
// Create game callback for menus
|
||||||
g_gamecallback = new MainGameCallback();
|
g_gamecallback = new MainGameCallback();
|
||||||
|
|
||||||
|
@ -152,6 +152,9 @@ RenderingEngine::RenderingEngine(IEventReceiver *receiver)
|
|||||||
driver = m_device->getVideoDriver();
|
driver = m_device->getVideoDriver();
|
||||||
infostream << "Using the " << RenderingEngine::getVideoDriverInfo(driver->getDriverType()).friendly_name << " video driver" << std::endl;
|
infostream << "Using the " << RenderingEngine::getVideoDriverInfo(driver->getDriverType()).friendly_name << " video driver" << std::endl;
|
||||||
|
|
||||||
|
// This changes the minimum allowed number of vertices in a VBO. Default is 500.
|
||||||
|
driver->setMinHardwareBufferVertexCount(4);
|
||||||
|
|
||||||
s_singleton = this;
|
s_singleton = this;
|
||||||
|
|
||||||
auto skin = createSkin(m_device->getGUIEnvironment(),
|
auto skin = createSkin(m_device->getGUIEnvironment(),
|
||||||
|
Loading…
Reference in New Issue
Block a user