GLES2/iOS: Fixed instancing detection.
This commit is contained in:
parent
1ae82cf9b4
commit
ae254a8d0f
@ -493,9 +493,15 @@ GL_IMPORT_EXT__(true, PFNGLMULTIDRAWELEMENTSINDIRECTPROC, glMultiDrawEl
|
||||
GL_IMPORT_OES__(true, PFNGLGETPROGRAMBINARYPROC, glGetProgramBinary);
|
||||
GL_IMPORT_OES__(true, PFNGLPROGRAMBINARYPROC, glProgramBinary);
|
||||
|
||||
#if BX_PLATFORM_IOS
|
||||
GL_IMPORT_EXT__(true, PFNGLVERTEXATTRIBDIVISORPROC, glVertexAttribDivisor);
|
||||
GL_IMPORT_EXT__(true, PFNGLDRAWARRAYSINSTANCEDPROC, glDrawArraysInstanced);
|
||||
GL_IMPORT_EXT__(true, PFNGLDRAWELEMENTSINSTANCEDPROC, glDrawElementsInstanced);
|
||||
#else
|
||||
GL_IMPORT_OES__(true, PFNGLVERTEXATTRIBDIVISORPROC, glVertexAttribDivisor);
|
||||
GL_IMPORT_OES__(true, PFNGLDRAWARRAYSINSTANCEDPROC, glDrawArraysInstanced);
|
||||
GL_IMPORT_OES__(true, PFNGLDRAWELEMENTSINSTANCEDPROC, glDrawElementsInstanced);
|
||||
#endif // BX_PLATFORM_IOS
|
||||
|
||||
GL_IMPORT_OES__(true, PFNGLBINDVERTEXARRAYPROC, glBindVertexArray);
|
||||
GL_IMPORT_OES__(true, PFNGLDELETEVERTEXARRAYSPROC, glDeleteVertexArrays);
|
||||
|
@ -534,6 +534,8 @@ namespace bgfx { namespace gl
|
||||
EXT_discard_framebuffer,
|
||||
EXT_disjoint_timer_query,
|
||||
EXT_draw_buffers,
|
||||
EXT_draw_instanced,
|
||||
EXT_instanced_arrays,
|
||||
EXT_frag_depth,
|
||||
EXT_framebuffer_blit,
|
||||
EXT_framebuffer_object,
|
||||
@ -739,6 +741,8 @@ namespace bgfx { namespace gl
|
||||
{ "EXT_discard_framebuffer", false, true }, // GLES2 extension.
|
||||
{ "EXT_disjoint_timer_query", false, true }, // GLES2 extension.
|
||||
{ "EXT_draw_buffers", false, true }, // GLES2 extension.
|
||||
{ "EXT_draw_instanced", false, true }, // GLES2 extension.
|
||||
{ "EXT_instanced_arrays", false, true }, // GLES2 extension.
|
||||
{ "EXT_frag_depth", false, true }, // GLES2 extension.
|
||||
{ "EXT_framebuffer_blit", BGFX_CONFIG_RENDERER_OPENGL >= 30, true },
|
||||
{ "EXT_framebuffer_object", BGFX_CONFIG_RENDERER_OPENGL >= 30, true },
|
||||
@ -1921,17 +1925,15 @@ namespace bgfx { namespace gl
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!BX_ENABLED(BX_PLATFORM_IOS) )
|
||||
if (s_extension[Extension::ANGLE_instanced_arrays].m_supported
|
||||
|| s_extension[Extension::ARB_instanced_arrays].m_supported
|
||||
|| s_extension[Extension::EXT_instanced_arrays].m_supported)
|
||||
{
|
||||
if (s_extension[Extension::ARB_instanced_arrays].m_supported
|
||||
|| s_extension[Extension::ANGLE_instanced_arrays].m_supported)
|
||||
if (NULL != glVertexAttribDivisor
|
||||
&& NULL != glDrawArraysInstanced
|
||||
&& NULL != glDrawElementsInstanced)
|
||||
{
|
||||
if (NULL != glVertexAttribDivisor
|
||||
&& NULL != glDrawArraysInstanced
|
||||
&& NULL != glDrawElementsInstanced)
|
||||
{
|
||||
g_caps.supported |= BGFX_CAPS_INSTANCING;
|
||||
}
|
||||
g_caps.supported |= BGFX_CAPS_INSTANCING;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user