|
|
@@ -155,7 +155,7 @@ static void imageReleaseCb(void* _ptr, void* _userData)
|
|
|
bimg::imageFree(imageContainer);
|
|
|
}
|
|
|
|
|
|
-bgfx::TextureHandle loadTexture(bx::FileReaderI* _reader, const char* _filePath, uint32_t _flags, uint8_t _skip, bgfx::TextureInfo* _info)
|
|
|
+bgfx::TextureHandle loadTexture(bx::FileReaderI* _reader, const char* _filePath, uint32_t _flags, uint8_t _skip, bgfx::TextureInfo* _info, bimg::Orientation::Enum* _orientation)
|
|
|
{
|
|
|
BX_UNUSED(_skip);
|
|
|
bgfx::TextureHandle handle = BGFX_INVALID_HANDLE;
|
|
|
@@ -168,6 +168,11 @@ bgfx::TextureHandle loadTexture(bx::FileReaderI* _reader, const char* _filePath,
|
|
|
|
|
|
if (NULL != imageContainer)
|
|
|
{
|
|
|
+ if (NULL != _orientation)
|
|
|
+ {
|
|
|
+ *_orientation = imageContainer->m_orientation;
|
|
|
+ }
|
|
|
+
|
|
|
const bgfx::Memory* mem = bgfx::makeRef(
|
|
|
imageContainer->m_data
|
|
|
, imageContainer->m_size
|
|
|
@@ -231,9 +236,9 @@ bgfx::TextureHandle loadTexture(bx::FileReaderI* _reader, const char* _filePath,
|
|
|
return handle;
|
|
|
}
|
|
|
|
|
|
-bgfx::TextureHandle loadTexture(const char* _name, uint32_t _flags, uint8_t _skip, bgfx::TextureInfo* _info)
|
|
|
+bgfx::TextureHandle loadTexture(const char* _name, uint32_t _flags, uint8_t _skip, bgfx::TextureInfo* _info, bimg::Orientation::Enum* _orientation)
|
|
|
{
|
|
|
- return loadTexture(entry::getFileReader(), _name, _flags, _skip, _info);
|
|
|
+ return loadTexture(entry::getFileReader(), _name, _flags, _skip, _info, _orientation);
|
|
|
}
|
|
|
|
|
|
bimg::ImageContainer* imageLoad(const char* _filePath, bgfx::TextureFormat::Enum _dstFormat)
|