mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 18:45:54 -05:00
GL: Use MAX_DRAW_BUFFERS instead of MAX_COLOR_ATTACHMENTS.
This commit is contained in:
parent
f1b54919ec
commit
06a076fa2a
2 changed files with 9 additions and 1 deletions
|
@ -1199,6 +1199,8 @@ namespace bgfx { namespace gl
|
|||
GL_GET(GL_MAX_TEXTURE_SIZE, 64);
|
||||
GL_GET(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, 0);
|
||||
GL_GET(GL_MAX_RENDERBUFFER_SIZE, 1);
|
||||
GL_GET(GL_MAX_COLOR_ATTACHMENTS, 1);
|
||||
GL_GET(GL_MAX_DRAW_BUFFERS, 1);
|
||||
#undef GL_GET
|
||||
|
||||
BX_TRACE(" Vendor: %s", m_vendor);
|
||||
|
@ -1577,7 +1579,9 @@ namespace bgfx { namespace gl
|
|||
|| s_extension[Extension::EXT_draw_buffers ].m_supported
|
||||
|| s_extension[Extension::WEBGL_draw_buffers].m_supported)
|
||||
{
|
||||
g_caps.maxFBAttachments = uint8_t(bx::uint32_min(glGet(GL_MAX_COLOR_ATTACHMENTS), BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS) );
|
||||
g_caps.maxFBAttachments = uint8_t(bx::uint32_min(glGet(GL_MAX_DRAW_BUFFERS)
|
||||
, BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS)
|
||||
);
|
||||
}
|
||||
|
||||
m_vaoSupport = !!(BGFX_CONFIG_RENDERER_OPENGLES >= 30)
|
||||
|
|
|
@ -385,6 +385,10 @@ typedef uint64_t GLuint64;
|
|||
# define GL_MAX_COLOR_ATTACHMENTS 0x8CDF
|
||||
#endif // GL_MAX_COLOR_ATTACHMENTS
|
||||
|
||||
#ifndef GL_MAX_DRAW_BUFFERS
|
||||
# define GL_MAX_DRAW_BUFFERS 0x8824
|
||||
#endif // GL_MAX_DRAW_BUFFERS
|
||||
|
||||
#ifndef GL_QUERY_RESULT
|
||||
# define GL_QUERY_RESULT 0x8866
|
||||
#endif // GL_QUERY_RESULT
|
||||
|
|
Loading…
Reference in a new issue