-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify the sampler object code path selection in GL backend #2955
Simplify the sampler object code path selection in GL backend #2955
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change doesn't work with wasm/WebGL.
bcf76b4
to
574b5d3
Compare
I specifically tested this to fix a WebGL2 problem in our app. I can confirm that sampler states are now correctly set. Note that I build with BGFX_CONFIG_RENDERER_OPENGLES=30 to allow for both WebGL1 and 2 at runtime.
With that all the configurations I tested look fine. |
Yeah it works now. |
But this is incorrect: m_samplerObjectSupport = false
|| m_gles3 && BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES >= 30) It should be just Try removing |
With just |
Try this fix: |
574b5d3
to
4be4f1d
Compare
Works like a charm, I missed those "GL_IMPORT____x()". Updating to just the rest of the simplifications. Thanks. |
Sampler Objects are now used only based on the m_samplerObjectSupport boolean, in line with m_gles3 being discovered at runtime due to WebGL.
This should also fix the issue reported in an earlier PR #2947 (@PyryM)