Made use of lambda functions

Former-commit-id: d7d81da2a9fc73c9b3e44d292bda9fd47ac561f3
This commit is contained in:
Lynix 2013-10-09 10:10:04 +02:00
parent 14eda38cac
commit a88fe446bd
1 changed files with 1 additions and 6 deletions

View File

@ -67,11 +67,6 @@ namespace
bool textureUpdated = true;
};
NzAbstractBuffer* HardwareBufferFunction(NzBuffer* parent, nzBufferType type)
{
return new NzHardwareBuffer(parent, type);
}
using VAO_Key = std::tuple<const NzIndexBuffer*, const NzVertexBuffer*, const NzVertexDeclaration*, const NzVertexDeclaration*>;
using VAO_Map = std::unordered_map<const NzContext*, std::map<VAO_Key, unsigned int>>;
@ -655,7 +650,7 @@ bool NzRenderer::Initialize()
return false;
}
NzBuffer::SetBufferFunction(nzBufferStorage_Hardware, HardwareBufferFunction);
NzBuffer::SetBufferFunction(nzBufferStorage_Hardware, [](NzBuffer* parent, nzBufferType type) -> NzAbstractBuffer* { return new NzHardwareBuffer(parent, type); } );
for (unsigned int i = 0; i <= nzMatrixType_Max; ++i)
{