Updated to latest ocornut imgui.

This commit is contained in:
Branimir Karadžić 2015-01-22 21:01:09 -08:00
parent 0516b5603b
commit bbeb0a3ffe
22 changed files with 2863 additions and 1158 deletions
examples/common

View file

@ -18,7 +18,7 @@ namespace stl = tinystl;
#include "bgfx_utils.h"
void* load(bx::FileReaderI* _reader, const char* _filePath)
void* load(bx::FileReaderI* _reader, const char* _filePath, uint32_t* _size)
{
if (0 == bx::open(_reader, _filePath) )
{
@ -26,15 +26,23 @@ void* load(bx::FileReaderI* _reader, const char* _filePath)
void* data = malloc(size);
bx::read(_reader, data, size);
bx::close(_reader);
if (NULL != _size)
{
*_size = size;
}
return data;
}
if (NULL != _size)
{
*_size = 0;
}
return NULL;
}
void* load(const char* _filePath)
void* load(const char* _filePath, uint32_t* _size)
{
return load(entry::getFileReader(), _filePath);
return load(entry::getFileReader(), _filePath, _size);
}
static const bgfx::Memory* loadMem(bx::FileReaderI* _reader, const char* _filePath)