texturec: Fixed uninitialized texture layer.
This commit is contained in:
Родитель
57d34f557b
Коммит
ce20d3ab08
|
@ -395,7 +395,7 @@ namespace bgfx
|
|||
void imageDecodeToRgba32f(bx::AllocatorI* _allocator, void* _dst, const void* _src, uint32_t _width, uint32_t _height, uint32_t _pitch, TextureFormat::Enum _format);
|
||||
|
||||
///
|
||||
bool imageGetRawData(const ImageContainer& _imageContainer, uint16_t _side, uint8_t _index, const void* _data, uint32_t _size, ImageMip& _mip);
|
||||
bool imageGetRawData(const ImageContainer& _imageContainer, uint16_t _side, uint8_t _lod, const void* _data, uint32_t _size, ImageMip& _mip);
|
||||
|
||||
} // namespace bgfx
|
||||
|
||||
|
|
|
@ -207,19 +207,20 @@ namespace bgfx
|
|||
|
||||
if (loaded)
|
||||
{
|
||||
_imageContainer.m_data = *_out;
|
||||
_imageContainer.m_size = width*height*bpp/8;
|
||||
_imageContainer.m_offset = 0;
|
||||
_imageContainer.m_width = width;
|
||||
_imageContainer.m_height = height;
|
||||
_imageContainer.m_depth = 1;
|
||||
_imageContainer.m_format = format;
|
||||
_imageContainer.m_numMips = 1;
|
||||
_imageContainer.m_hasAlpha = true;
|
||||
_imageContainer.m_cubeMap = false;
|
||||
_imageContainer.m_ktx = false;
|
||||
_imageContainer.m_ktxLE = false;
|
||||
_imageContainer.m_srgb = false;
|
||||
_imageContainer.m_data = *_out;
|
||||
_imageContainer.m_size = width*height*bpp/8;
|
||||
_imageContainer.m_offset = 0;
|
||||
_imageContainer.m_width = width;
|
||||
_imageContainer.m_height = height;
|
||||
_imageContainer.m_depth = 1;
|
||||
_imageContainer.m_numLayers = 1;
|
||||
_imageContainer.m_format = format;
|
||||
_imageContainer.m_numMips = 1;
|
||||
_imageContainer.m_hasAlpha = true;
|
||||
_imageContainer.m_cubeMap = false;
|
||||
_imageContainer.m_ktx = false;
|
||||
_imageContainer.m_ktxLE = false;
|
||||
_imageContainer.m_srgb = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -852,6 +853,11 @@ int main(int _argc, const char* _argv[])
|
|||
|
||||
imageFree(output);
|
||||
}
|
||||
else
|
||||
{
|
||||
help("No output generated.");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче