mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-01 13:09:42 +00:00
Terrain: change index buffer flags to unsigned
This commit is contained in:
parent
41b3a9dba9
commit
f7bac58b39
3 changed files with 4 additions and 4 deletions
|
@ -39,7 +39,7 @@ namespace Terrain
|
||||||
return buffer;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
Ogre::HardwareIndexBufferSharedPtr BufferCache::getIndexBuffer(int flags)
|
Ogre::HardwareIndexBufferSharedPtr BufferCache::getIndexBuffer(unsigned int flags)
|
||||||
{
|
{
|
||||||
unsigned int verts = mNumVerts;
|
unsigned int verts = mNumVerts;
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ namespace Terrain
|
||||||
|
|
||||||
/// @param flags first 4*4 bits are LOD deltas on each edge, respectively (4 bits each)
|
/// @param flags first 4*4 bits are LOD deltas on each edge, respectively (4 bits each)
|
||||||
/// next 4 bits are LOD level of the index buffer (LOD 0 = don't omit any vertices)
|
/// next 4 bits are LOD level of the index buffer (LOD 0 = don't omit any vertices)
|
||||||
Ogre::HardwareIndexBufferSharedPtr getIndexBuffer (int flags);
|
Ogre::HardwareIndexBufferSharedPtr getIndexBuffer (unsigned int flags);
|
||||||
|
|
||||||
Ogre::HardwareVertexBufferSharedPtr getUVBuffer ();
|
Ogre::HardwareVertexBufferSharedPtr getUVBuffer ();
|
||||||
|
|
||||||
|
|
|
@ -415,7 +415,7 @@ void QuadTreeNode::updateIndexBuffers()
|
||||||
// Fetch a suitable index buffer (which may be shared)
|
// Fetch a suitable index buffer (which may be shared)
|
||||||
size_t ourLod = getActualLodLevel();
|
size_t ourLod = getActualLodLevel();
|
||||||
|
|
||||||
int flags = 0;
|
unsigned int flags = 0;
|
||||||
|
|
||||||
for (int i=0; i<4; ++i)
|
for (int i=0; i<4; ++i)
|
||||||
{
|
{
|
||||||
|
@ -436,7 +436,7 @@ void QuadTreeNode::updateIndexBuffers()
|
||||||
if (lod > 0)
|
if (lod > 0)
|
||||||
{
|
{
|
||||||
assert (lod - ourLod < (1 << 4));
|
assert (lod - ourLod < (1 << 4));
|
||||||
flags |= int(lod - ourLod) << (4*i);
|
flags |= static_cast<unsigned int>(lod - ourLod) << (4*i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
flags |= 0 /*((int)mAdditionalLod)*/ << (4*4);
|
flags |= 0 /*((int)mAdditionalLod)*/ << (4*4);
|
||||||
|
|
Loading…
Reference in a new issue