mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2025-04-29 23:43:50 -04:00
GL: Don't test unsupported formats.
This commit is contained in:
parent
5602d7b20c
commit
682a0519ef
1 changed files with 9 additions and 1 deletions
|
@ -978,7 +978,8 @@ namespace bgfx { namespace gl
|
||||||
? tfi.m_internalFmtSrgb
|
? tfi.m_internalFmtSrgb
|
||||||
: tfi.m_internalFmt
|
: tfi.m_internalFmt
|
||||||
;
|
;
|
||||||
if (GL_ZERO == internalFmt)
|
if (!s_textureFormat[_format].m_supported
|
||||||
|
|| GL_ZERO == internalFmt)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1284,6 +1285,13 @@ namespace bgfx { namespace gl
|
||||||
|
|
||||||
// Allow all texture filters.
|
// Allow all texture filters.
|
||||||
memset(s_textureFilter, true, BX_COUNTOF(s_textureFilter) );
|
memset(s_textureFilter, true, BX_COUNTOF(s_textureFilter) );
|
||||||
|
for (uint32_t ii = 0; ii < TextureFormat::Count; ++ii)
|
||||||
|
{
|
||||||
|
s_textureFormat[ii].m_supported = true
|
||||||
|
&& TextureFormat::Unknown != ii
|
||||||
|
&& TextureFormat::UnknownDepth != ii
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
bool bc123Supported = 0
|
bool bc123Supported = 0
|
||||||
|| s_extension[Extension::EXT_texture_compression_s3tc ].m_supported
|
|| s_extension[Extension::EXT_texture_compression_s3tc ].m_supported
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue