mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2025-02-17 20:31:57 -05:00
Added new WEGL extensions.
This commit is contained in:
parent
317dc986f1
commit
476f438d7a
1 changed files with 12 additions and 2 deletions
|
@ -417,6 +417,7 @@ namespace bgfx { namespace gl
|
|||
EXT_blend_color,
|
||||
EXT_blend_minmax,
|
||||
EXT_blend_subtract,
|
||||
EXT_color_buffer_half_float,
|
||||
EXT_compressed_ETC1_RGB8_sub_texture,
|
||||
EXT_debug_label,
|
||||
EXT_debug_marker,
|
||||
|
@ -491,10 +492,12 @@ namespace bgfx { namespace gl
|
|||
OES_vertex_half_float,
|
||||
OES_vertex_type_10_10_10_2,
|
||||
|
||||
WEBGL_color_buffer_float,
|
||||
WEBGL_compressed_texture_etc1,
|
||||
WEBGL_compressed_texture_s3tc,
|
||||
WEBGL_compressed_texture_pvrtc,
|
||||
WEBGL_depth_texture,
|
||||
WEBGL_draw_buffers,
|
||||
|
||||
WEBKIT_EXT_texture_filter_anisotropic,
|
||||
WEBKIT_WEBGL_compressed_texture_s3tc,
|
||||
|
@ -578,6 +581,7 @@ namespace bgfx { namespace gl
|
|||
{ "EXT_blend_color", BGFX_CONFIG_RENDERER_OPENGL >= 31, true },
|
||||
{ "EXT_blend_minmax", BGFX_CONFIG_RENDERER_OPENGL >= 14, true },
|
||||
{ "EXT_blend_subtract", BGFX_CONFIG_RENDERER_OPENGL >= 14, true },
|
||||
{ "EXT_color_buffer_half_float", false, true }, // GLES2 extension.
|
||||
{ "EXT_compressed_ETC1_RGB8_sub_texture", false, true }, // GLES2 extension.
|
||||
{ "EXT_debug_label", false, true },
|
||||
{ "EXT_debug_marker", false, true },
|
||||
|
@ -652,10 +656,12 @@ namespace bgfx { namespace gl
|
|||
{ "OES_vertex_half_float", false, true },
|
||||
{ "OES_vertex_type_10_10_10_2", false, true },
|
||||
|
||||
{ "WEBGL_color_buffer_float", false, true },
|
||||
{ "WEBGL_compressed_texture_etc1", false, true },
|
||||
{ "WEBGL_compressed_texture_s3tc", false, true },
|
||||
{ "WEBGL_compressed_texture_pvrtc", false, true },
|
||||
{ "WEBGL_depth_texture", false, true },
|
||||
{ "WEBGL_draw_buffers", false, true },
|
||||
|
||||
{ "WEBKIT_EXT_texture_filter_anisotropic", false, true },
|
||||
{ "WEBKIT_WEBGL_compressed_texture_s3tc", false, true },
|
||||
|
@ -1294,7 +1300,8 @@ namespace bgfx { namespace gl
|
|||
|
||||
if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGL)
|
||||
|| BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES >= 30)
|
||||
|| s_extension[Extension::EXT_draw_buffers].m_supported)
|
||||
|| s_extension[Extension::EXT_draw_buffers ].m_supported
|
||||
|| s_extension[Extension::WEBGL_draw_buffers].m_supported)
|
||||
{
|
||||
g_caps.maxFBAttachments = bx::uint32_min(glGet(GL_MAX_COLOR_ATTACHMENTS), BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS);
|
||||
}
|
||||
|
@ -3794,7 +3801,10 @@ namespace bgfx { namespace gl
|
|||
|
||||
if (usesFragData)
|
||||
{
|
||||
BX_WARN(s_extension[Extension::EXT_draw_buffers].m_supported, "EXT_draw_buffers is used but not supported by GLES2 driver.");
|
||||
BX_WARN(s_extension[Extension::EXT_draw_buffers ].m_supported
|
||||
|| s_extension[Extension::WEBGL_draw_buffers].m_supported
|
||||
, "EXT_draw_buffers is used but not supported by GLES2 driver."
|
||||
);
|
||||
writeString(&writer
|
||||
, "#extension GL_EXT_draw_buffers : enable\n"
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue