Skip to content

Commit

Permalink
WebGL: Use sampler object if it's GLES3.
Browse files Browse the repository at this point in the history
  • Loading branch information
bkaradzic committed Oct 14, 2022
1 parent 3868c76 commit 9e7aa2d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions src/glimports.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 4 additions & 4 deletions src/renderer_gl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9e7aa2d

Please sign in to comment.