Skip to content
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

Backends: add glBindSampler for GL ES 3.0 #6375

Closed
wants to merge 1 commit into from

Conversation

jsm174
Copy link
Contributor

@jsm174 jsm174 commented Apr 26, 2023

Visual Pinball uses ImGui to display it's Live UI.

While working on the cross platform port, we were getting a random flicker anytime the Live UI was visible on Android, iOS, and tvOS. The versions all use GL ES 3.0.

After using RenderDoc, we noticed the sampler was different between both frames.

Screenshot 2023-04-26 at 11 57 56 AM

glBindSampler is supported on GL ES 3.0+.

I've updated the code to enable IMGUI_IMPL_OPENGL_MAY_HAVE_BIND_SAMPLER when GL ES 3, and then handle it when IMGUI_IMPL_OPENGL_ES3

This PR can be reworked accordingly as I wasn't sure how to check for ES in bd->GlVersion

ocornut pushed a commit that referenced this pull request May 9, 2023
Amended given addition of GlProfileIsES3 in dd9db5e
@ocornut
Copy link
Owner

ocornut commented May 9, 2023

Hello James,
Thanks for the PR.

This PR can be reworked accordingly as I wasn't sure how to check for ES in bd->GlVersion

You are right. I was not confident to set GlVersion to 330 in ES3 given this is used for many things, but I have now added runtime flags in dd9db5e and reworked your commit as 39f7248 using those flags.

@ocornut ocornut closed this May 9, 2023
@jsm174
Copy link
Contributor Author

jsm174 commented May 9, 2023

Awesome. Thanks for getting this in!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants