mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-05-10 20:46:55 +03:00
Terrain: create 4x4 terrain chunks per ESM::Cell to improve performance
Improves performance because the number of splatting layers per chunk is reduced, and finer grained frustum culling can be done.
This commit is contained in:
parent
95cf13e3f2
commit
ef18f4217f
6 changed files with 199 additions and 110 deletions
|
@ -1,6 +1,7 @@
|
|||
#include "buffercache.hpp"
|
||||
|
||||
#include <cassert>
|
||||
#include <iostream>
|
||||
|
||||
#include <osg/PrimitiveSet>
|
||||
|
||||
|
@ -208,6 +209,8 @@ namespace Terrain
|
|||
{
|
||||
unsigned int verts = mNumVerts;
|
||||
|
||||
std::cout << "getting index buffer for " << verts << std::endl;
|
||||
|
||||
if (mIndexBufferMap.find(flags) != mIndexBufferMap.end())
|
||||
{
|
||||
return mIndexBufferMap[flags];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue