fixed texture loading
This commit is contained in:
@@ -37,7 +37,8 @@ namespace Game
|
||||
long fileSize = ftell(file);
|
||||
fseek(file, 0, SEEK_SET);
|
||||
|
||||
const bgfx::Memory* mem = bgfx::alloc(fileSize + 1);
|
||||
void* rawMem = AllocateScratch(fileSize + 1);
|
||||
const bgfx::Memory* mem = bgfx::makeRef(rawMem, fileSize + 1);
|
||||
fread(mem->data, 1, fileSize, file);
|
||||
if (appendZero)
|
||||
{
|
||||
@@ -126,7 +127,9 @@ namespace Game
|
||||
*_orientation = imageContainer.m_orientation;
|
||||
}
|
||||
|
||||
const bgfx::Memory* mem = bgfx::makeRef(imageContainer.m_data, imageContainer.m_size);
|
||||
const bgfx::Memory* mem =
|
||||
bgfx::makeRef(data->data + imageContainer.m_offset, data->size - imageContainer.m_offset);
|
||||
// const bgfx::Memory* mem = bgfx::makeRef(imageContainer.m_data, imageContainer.m_size);
|
||||
|
||||
if (NULL != _info)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user