WebGL: Use sampler object if it's GLES3.

This commit is contained in:
Бранимир Караџић 2022-10-13 18:29:03 -07:00
parent 3868c762f5
commit 9e7aa2d2ef
2 changed files with 10 additions and 10 deletions

View File

@ -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);

View File

@ -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