fix update bug when compressed texture create with BGFX_TEXTURE_SRGB (#2437)
Co-authored-by: chenmou.cm <chenmou.cm@alibaba-inc.com>
This commit is contained in:
parent
3c7e21f1a6
commit
0b8677ed06
@ -5638,7 +5638,10 @@ namespace bgfx { namespace gl
|
||||
bimg::imageCopy(temp, width, height, 1, bpp, srcpitch, data);
|
||||
data = temp;
|
||||
}
|
||||
|
||||
const GLenum internalFmt = (0 != (m_flags & BGFX_TEXTURE_SRGB))
|
||||
? s_textureFormat[m_textureFormat].m_internalFmtSrgb
|
||||
: s_textureFormat[m_textureFormat].m_internalFmt
|
||||
;
|
||||
GL_CHECK(compressedTexSubImage(target+_side
|
||||
, _mip
|
||||
, _rect.m_x
|
||||
@ -5647,7 +5650,7 @@ namespace bgfx { namespace gl
|
||||
, _rect.m_width
|
||||
, _rect.m_height
|
||||
, _depth
|
||||
, m_fmt
|
||||
, internalFmt
|
||||
, _mem->size
|
||||
, data
|
||||
) );
|
||||
|
Loading…
x
Reference in New Issue
Block a user