Added flag for texture formats that can be used as back-buffer format. (#3605)

This commit is contained in:
Branimir Karadžić
2026-02-21 18:44:26 -08:00
committed by GitHub
parent 651c203116
commit 91814c9729
17 changed files with 172 additions and 137 deletions

View File

@@ -2741,7 +2741,7 @@ namespace bgfx { namespace gl
{
const TextureFormat::Enum fmt = TextureFormat::Enum(ii);
uint16_t supported = BGFX_CAPS_FORMAT_TEXTURE_NONE;
uint32_t supported = BGFX_CAPS_FORMAT_TEXTURE_NONE;
supported |= s_textureFormat[ii].m_supported
? BGFX_CAPS_FORMAT_TEXTURE_2D
| BGFX_CAPS_FORMAT_TEXTURE_3D
@@ -2811,6 +2811,8 @@ namespace bgfx { namespace gl
g_caps.formats[ii] = supported;
}
g_caps.formats[TextureFormat::BGRA8] |= BGFX_CAPS_FORMAT_TEXTURE_BACKBUFFER;
g_caps.supported |= !!(BGFX_CONFIG_RENDERER_OPENGL || m_gles3)
|| s_extension[Extension::OES_texture_3D].m_supported
? BGFX_CAPS_TEXTURE_3D