From 9e7aa2d2eff46087d68d801c38d0891d649b63af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=80=D0=B0=D0=BD=D0=B8=D0=BC=D0=B8=D1=80=20=D0=9A?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=9F=D0=B8=D1=9B?= Date: Thu, 13 Oct 2022 18:29:03 -0700 Subject: [PATCH] WebGL: Use sampler object if it's GLES3. --- src/glimports.h | 12 ++++++------ src/renderer_gl.cpp | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/glimports.h b/src/glimports.h index da4bcc77a..5a687bbf4 100644 --- a/src/glimports.h +++ b/src/glimports.h @@ -586,12 +586,12 @@ GL_IMPORT_____x(true, PFNGLBLENDFUNCSEPARATEIPROC, glBlendFuncSe GL_IMPORT______(true, PFNGLDRAWBUFFERPROC, glDrawBuffer); GL_IMPORT______(true, PFNGLREADBUFFERPROC, glReadBuffer); -GL_IMPORT_____x(true, PFNGLGENSAMPLERSPROC, glGenSamplers); -GL_IMPORT_____x(true, PFNGLDELETESAMPLERSPROC, glDeleteSamplers); -GL_IMPORT_____x(true, PFNGLBINDSAMPLERPROC, glBindSampler); -GL_IMPORT_____x(true, PFNGLSAMPLERPARAMETERFPROC, glSamplerParameterf); -GL_IMPORT_____x(true, PFNGLSAMPLERPARAMETERIPROC, glSamplerParameteri); -GL_IMPORT_____x(true, PFNGLSAMPLERPARAMETERFVPROC, glSamplerParameterfv); +GL_IMPORT______(true, PFNGLGENSAMPLERSPROC, glGenSamplers); +GL_IMPORT______(true, PFNGLDELETESAMPLERSPROC, glDeleteSamplers); +GL_IMPORT______(true, PFNGLBINDSAMPLERPROC, glBindSampler); +GL_IMPORT______(true, PFNGLSAMPLERPARAMETERFPROC, glSamplerParameterf); +GL_IMPORT______(true, PFNGLSAMPLERPARAMETERIPROC, glSamplerParameteri); +GL_IMPORT______(true, PFNGLSAMPLERPARAMETERFVPROC, glSamplerParameterfv); GL_IMPORT_____x(true, PFNGLBINDBUFFERBASEPROC, glBindBufferBase); GL_IMPORT_____x(true, PFNGLBINDBUFFERRANGEPROC, glBindBufferRange); diff --git a/src/renderer_gl.cpp b/src/renderer_gl.cpp index d651b3f34..0e8d5b555 100644 --- a/src/renderer_gl.cpp +++ b/src/renderer_gl.cpp @@ -2921,10 +2921,10 @@ namespace bgfx { namespace gl GL_CHECK(glGenVertexArrays(1, &m_vao) ); } - m_samplerObjectSupport = !BX_ENABLED(BX_PLATFORM_EMSCRIPTEN) - && (m_gles3 - || s_extension[Extension::ARB_sampler_objects].m_supported - ); + m_samplerObjectSupport = false + || m_gles3 + || s_extension[Extension::ARB_sampler_objects].m_supported + ; m_shadowSamplersSupport = !!(BGFX_CONFIG_RENDERER_OPENGL || m_gles3) || s_extension[Extension::EXT_shadow_samplers].m_supported