Simplifed allocator.

This commit is contained in:
Branimir Karadžić 2015-11-06 22:03:06 -08:00
parent d46b05500b
commit 40d526744a
9 changed files with 82 additions and 92 deletions
examples/common

View file

@ -22,7 +22,7 @@ namespace stl = tinystl;
#include "bgfx_utils.h"
void* load(bx::FileReaderI* _reader, bx::ReallocatorI* _allocator, const char* _filePath, uint32_t* _size)
void* load(bx::FileReaderI* _reader, bx::AllocatorI* _allocator, const char* _filePath, uint32_t* _size)
{
if (0 == bx::open(_reader, _filePath) )
{
@ -69,7 +69,7 @@ static const bgfx::Memory* loadMem(bx::FileReaderI* _reader, const char* _filePa
return NULL;
}
static void* loadMem(bx::FileReaderI* _reader, bx::ReallocatorI* _allocator, const char* _filePath, uint32_t* _size)
static void* loadMem(bx::FileReaderI* _reader, bx::AllocatorI* _allocator, const char* _filePath, uint32_t* _size)
{
if (0 == bx::open(_reader, _filePath) )
{
@ -175,7 +175,7 @@ bgfx::TextureHandle loadTexture(bx::FileReaderI* _reader, const char* _name, uin
}
bgfx::TextureHandle handle = BGFX_INVALID_HANDLE;
bx::ReallocatorI* allocator = entry::getAllocator();
bx::AllocatorI* allocator = entry::getAllocator();
uint32_t size = 0;
void* data = loadMem(_reader, allocator, filePath, &size);
@ -399,7 +399,7 @@ struct Mesh
Group group;
bx::ReallocatorI* allocator = entry::getAllocator();
bx::AllocatorI* allocator = entry::getAllocator();
uint32_t chunk;
while (4 == bx::read(_reader, chunk) )