Added immutable vertex and index buffers.

This commit is contained in:
Dušan Jocić 2016-02-20 21:28:18 +01:00
parent d08c0df85d
commit 28d303c5ea
13 changed files with 98 additions and 32 deletions

View file

@ -80,3 +80,16 @@ void GFXPrimitiveBufferHandle::set(GFXDevice *theDevice, U32 indexCount, U32 pri
getPointer()->mDebugCreationPath = desc;
#endif
}
//-----------------------------------------------------------------------------
// immutable
//-----------------------------------------------------------------------------
void GFXPrimitiveBufferHandle::immutable(GFXDevice *theDevice, U32 indexCount, U32 primitiveCount, void* data, String desc)
{
StrongRefPtr<GFXPrimitiveBuffer>::operator=( theDevice->allocPrimitiveBuffer(indexCount, primitiveCount, GFXBufferTypeImmutable, data) );
#ifdef TORQUE_DEBUG
if( desc.isNotEmpty() )
getPointer()->mDebugCreationPath = desc;
#endif
}