Add opt-in compile flag for GL read back emulation (#2305)
Co-authored-by: Christophe Dehais <christophe.dehais@fittingbox.com>
This commit is contained in:
parent
70f8897056
commit
6b790dc96b
@ -2764,7 +2764,7 @@ namespace bgfx { namespace gl
|
||||
: 0
|
||||
;
|
||||
|
||||
g_caps.supported |= m_readBackSupported
|
||||
g_caps.supported |= (m_readBackSupported || BX_ENABLED(BGFX_GL_CONFIG_TEXTURE_READ_BACK_EMULATION))
|
||||
? BGFX_CAPS_TEXTURE_READ_BACK
|
||||
: 0
|
||||
;
|
||||
@ -3263,7 +3263,7 @@ namespace bgfx { namespace gl
|
||||
|
||||
GL_CHECK(glBindTexture(texture.m_target, 0) );
|
||||
}
|
||||
else
|
||||
else if (BX_ENABLED(BGFX_GL_CONFIG_TEXTURE_READ_BACK_EMULATION))
|
||||
{
|
||||
const TextureGL& texture = m_textures[_handle.idx];
|
||||
const bool compressed = bimg::isCompressed(bimg::TextureFormat::Enum(texture.m_textureFormat) );
|
||||
|
@ -43,6 +43,10 @@
|
||||
# define BGFX_GL_CONFIG_BLIT_EMULATION 0
|
||||
#endif // BGFX_GL_CONFIG_BLIT_EMULATION
|
||||
|
||||
#ifndef BGFX_GL_CONFIG_TEXTURE_READ_BACK_EMULATION
|
||||
# define BGFX_GL_CONFIG_TEXTURE_READ_BACK_EMULATION 0
|
||||
#endif // BGFX_GL_CONFIG_TEXTURE_READ_BACK_EMULATION
|
||||
|
||||
#define BGFX_GL_PROFILER_BEGIN(_view, _abgr) \
|
||||
BX_MACRO_BLOCK_BEGIN \
|
||||
GL_CHECK(glPushDebugGroup(GL_DEBUG_SOURCE_APPLICATION, 0, -1, s_viewName[view]) ); \
|
||||
|
Loading…
x
Reference in New Issue
Block a user