mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2025-04-02 02:19:48 -04:00
Fixed compile warnings.
This commit is contained in:
parent
053dd8c524
commit
62d36ebe8a
5 changed files with 15 additions and 9 deletions
|
@ -2544,7 +2544,7 @@ namespace bgfx
|
|||
|
||||
default:
|
||||
{
|
||||
void* temp = BX_ALLOC(_allocator, imageGetSize(_format, _pitch/4, _height) );
|
||||
void* temp = BX_ALLOC(_allocator, imageGetSize(_format, uint16_t(_pitch/4), uint16_t(_height) ) );
|
||||
imageDecodeToRgba8(temp, _src, _width, _height, _pitch, _format);
|
||||
imageRgba8ToRgba32f(_dst, _width, _height, _pitch, temp);
|
||||
BX_FREE(_allocator, temp);
|
||||
|
|
|
@ -2798,8 +2798,8 @@ namespace bgfx { namespace d3d9
|
|||
m_height = textureHeight;
|
||||
m_depth = imageContainer.m_depth;
|
||||
m_numMips = numMips;
|
||||
m_requestedFormat = imageContainer.m_format;
|
||||
m_textureFormat = imageContainer.m_format;
|
||||
m_requestedFormat =
|
||||
m_textureFormat = uint8_t(imageContainer.m_format);
|
||||
|
||||
const TextureFormatInfo& tfi = s_textureFormat[m_requestedFormat];
|
||||
uint8_t bpp = getBitsPerPixel(TextureFormat::Enum(m_textureFormat) );
|
||||
|
|
|
@ -3909,7 +3909,7 @@ namespace bgfx { namespace gl
|
|||
}
|
||||
}
|
||||
|
||||
bool TextureGL::init(GLenum _target, uint32_t _width, uint32_t _height, uint32_t _depth, uint8_t _format, uint8_t _numMips, uint32_t _flags)
|
||||
bool TextureGL::init(GLenum _target, uint32_t _width, uint32_t _height, uint32_t _depth, TextureFormat::Enum _format, uint8_t _numMips, uint32_t _flags)
|
||||
{
|
||||
m_target = _target;
|
||||
m_numMips = _numMips;
|
||||
|
@ -3918,8 +3918,8 @@ namespace bgfx { namespace gl
|
|||
m_height = _height;
|
||||
m_depth = _depth;
|
||||
m_currentSamplerHash = UINT32_MAX;
|
||||
m_requestedFormat = _format;
|
||||
m_textureFormat = _format;
|
||||
m_requestedFormat =
|
||||
m_textureFormat = uint8_t(_format);
|
||||
|
||||
const bool bufferOnly = 0 != (m_flags&BGFX_TEXTURE_RT_BUFFER_ONLY);
|
||||
const bool computeWrite = 0 != (m_flags&BGFX_TEXTURE_COMPUTE_WRITE );
|
||||
|
|
|
@ -1103,7 +1103,7 @@ namespace bgfx { namespace gl
|
|||
{
|
||||
}
|
||||
|
||||
bool init(GLenum _target, uint32_t _width, uint32_t _height, uint32_t _depth, uint8_t _format, uint8_t _numMips, uint32_t _flags);
|
||||
bool init(GLenum _target, uint32_t _width, uint32_t _height, uint32_t _depth, TextureFormat::Enum _format, uint8_t _numMips, uint32_t _flags);
|
||||
void create(const Memory* _mem, uint32_t _flags, uint8_t _skip);
|
||||
void destroy();
|
||||
void update(uint8_t _side, uint8_t _mip, const Rect& _rect, uint16_t _z, uint16_t _depth, uint16_t _pitch, const Memory* _mem);
|
||||
|
|
|
@ -666,7 +666,7 @@ namespace bgfx { namespace mtl
|
|||
tc.m_sides = 0;
|
||||
tc.m_depth = 0;
|
||||
tc.m_numMips = 1;
|
||||
tc.m_format = texture.m_requestedFormat;
|
||||
tc.m_format = TextureFormat::Enum(texture.m_requestedFormat);
|
||||
tc.m_cubeMap = false;
|
||||
tc.m_mem = NULL;
|
||||
bx::write(&writer, tc);
|
||||
|
@ -2040,7 +2040,13 @@ namespace bgfx { namespace mtl
|
|||
if (convert)
|
||||
{
|
||||
temp = (uint8_t*)BX_ALLOC(g_allocator, rectpitch*_rect.m_height);
|
||||
imageDecodeToBgra8(temp, data, _rect.m_width, _rect.m_height, srcpitch, m_requestedFormat);
|
||||
imageDecodeToBgra8(temp
|
||||
, data
|
||||
, _rect.m_width
|
||||
, _rect.m_height
|
||||
, srcpitch
|
||||
, TextureFormat::Enum(m_requestedFormat)
|
||||
);
|
||||
data = temp;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue