mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2025-04-16 01:04:24 -04:00
Added RGTC extension.
This commit is contained in:
parent
f0b80b6d09
commit
800226545b
2 changed files with 18 additions and 7 deletions
|
@ -23,6 +23,7 @@ namespace bgfx
|
|||
CHROMIUM_texture_compression_dxt3,
|
||||
CHROMIUM_texture_compression_dxt5,
|
||||
EXT_texture_compression_latc,
|
||||
EXT_texture_compression_rgtc,
|
||||
ARB_texture_float,
|
||||
OES_texture_float,
|
||||
OES_texture_float_linear,
|
||||
|
@ -72,6 +73,7 @@ namespace bgfx
|
|||
{ "GL_CHROMIUM_texture_compression_dxt3", false, true },
|
||||
{ "GL_CHROMIUM_texture_compression_dxt5", false, true },
|
||||
{ "GL_EXT_texture_compression_latc", false, true },
|
||||
{ "GL_EXT_texture_compression_rgtc", false, true },
|
||||
{ "GL_ARB_texture_float", false, true },
|
||||
{ "GL_OES_texture_float", false, true },
|
||||
{ "GL_OES_texture_float_linear", false, true },
|
||||
|
@ -1811,14 +1813,15 @@ namespace bgfx
|
|||
}
|
||||
}
|
||||
|
||||
bool dxtSupported = s_extension[Extension::EXT_texture_compression_s3tc].m_supported;
|
||||
s_textureFormat[TextureFormat::BC1].m_supported = dxtSupported || s_extension[Extension::EXT_texture_compression_dxt1].m_supported;
|
||||
s_textureFormat[TextureFormat::BC2].m_supported = dxtSupported || s_extension[Extension::CHROMIUM_texture_compression_dxt3].m_supported;
|
||||
s_textureFormat[TextureFormat::BC3].m_supported = dxtSupported || s_extension[Extension::CHROMIUM_texture_compression_dxt5].m_supported;
|
||||
bool bc123Supported = s_extension[Extension::EXT_texture_compression_s3tc].m_supported;
|
||||
s_textureFormat[TextureFormat::BC1].m_supported = bc123Supported || s_extension[Extension::EXT_texture_compression_dxt1].m_supported;
|
||||
s_textureFormat[TextureFormat::BC2].m_supported = bc123Supported || s_extension[Extension::CHROMIUM_texture_compression_dxt3].m_supported;
|
||||
s_textureFormat[TextureFormat::BC3].m_supported = bc123Supported || s_extension[Extension::CHROMIUM_texture_compression_dxt5].m_supported;
|
||||
|
||||
bool latcSupported = s_extension[Extension::EXT_texture_compression_latc].m_supported;
|
||||
s_textureFormat[TextureFormat::BC4].m_supported = latcSupported;
|
||||
s_textureFormat[TextureFormat::BC5].m_supported = latcSupported;
|
||||
bool bc45Supported = s_extension[Extension::EXT_texture_compression_latc].m_supported
|
||||
|| s_extension[Extension::EXT_texture_compression_rgtc].m_supported;
|
||||
s_textureFormat[TextureFormat::BC4].m_supported = bc45Supported;
|
||||
s_textureFormat[TextureFormat::BC5].m_supported = bc45Supported;
|
||||
|
||||
s_renderCtx.m_vaoSupport = !!BGFX_CONFIG_RENDERER_OPENGLES3
|
||||
|| s_extension[Extension::ARB_vertex_array_object].m_supported
|
||||
|
|
|
@ -131,6 +131,14 @@
|
|||
# define GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72
|
||||
# endif // GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT
|
||||
|
||||
# ifndef GL_COMPRESSED_RED_RGTC1_EXT
|
||||
# define GL_COMPRESSED_RED_RGTC1_EXT 0x8DBB
|
||||
# endif // GL_COMPRESSED_RED_RGTC1_EXT
|
||||
|
||||
# ifndef GL_COMPRESSED_RED_GREEN_RGTC2_EXT
|
||||
# define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD
|
||||
# endif // GL_COMPRESSED_RED_GREEN_RGTC2_EXT
|
||||
|
||||
# ifndef GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE
|
||||
# define GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE 0x93A0
|
||||
# endif // GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE
|
||||
|
|
Loading…
Add table
Reference in a new issue