Skip to content

Backends: add glBindSampler for GL ES 3.0#6375

Closed
jsm174 wants to merge 1 commit intoocornut:masterfrom
jsm174:fix/gles3-sampler
Closed

Backends: add glBindSampler for GL ES 3.0#6375
jsm174 wants to merge 1 commit intoocornut:masterfrom
jsm174:fix/gles3-sampler

Conversation

@jsm174
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

2 participants