Fix adjust issue at Texture2DGL::initWithZeros

This commit is contained in:
halx99 2020-02-17 00:13:56 +08:00 committed by GitHub
parent ab322c8641
commit 584ee96a89
1 changed files with 1 additions and 1 deletions

View File

@ -153,7 +153,7 @@ void Texture2DGL::initWithZeros()
{
// Ensure the final data size at least 1 byte
_width = (std::max)(_width, (uint32_t)1);
_width = (std::max)(_height, (uint32_t)1);
_height = (std::max)(_height, (uint32_t)1);
_bitsPerElement = (std::max)(_bitsPerElement, (uint8_t)8);
auto size = _width * _height * _bitsPerElement / 8;