-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Disable *glGetProcAddress()
on the web
#93489
Disable *glGetProcAddress()
on the web
#93489
Conversation
Sorry, your comments on #87981 fell in one of my cracks. 😬 Seems good. I think I added the functionality because it was a breaking change otherwise. But if it works without, then everything is good. |
What about this file? How can we make sure that this either doesn't get run or replace it with something else for the Web? godot/drivers/gles3/rasterizer_gles3.cpp Lines 299 to 314 in e78dc83
Do you have an idea, @bruvzg? |
On the web, I think we should be able to just Assuming that works, we could use |
Or, actually, maybe we don't need to do anything to support that at all? All that does is print messages to the console when there are OpenGL errors, but WebGL does that all on its own. So, maybe we just need to wrap that code in Anyway, I'll do some testing later when I have a chance. |
e7b46f6
to
8e242fe
Compare
@adamscott It looks like that code is already excluded on web builds. As I also just commented here, that code is wrapped in In my latest push on this PR, I've added some Given that, I'm going to take this out of draft! |
*glGetProcAddress()
on the web*glGetProcAddress()
on the web
It's inside |
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.
It's great! Thanks for your hard work, @dsnopek!
Thanks! |
In PR #87981, we added the Emscripten flag (supported in 3.1.51 or later) to enable
glGetProcAddress()
on the web.However, we shouldn't need it (since the GL functions are "statically linked" on the web) and it's known to be inefficient.
See these references from the Emscripten docs:
This PR explicitly disables the feature (rather than just reverting PR #87981) since the docs say it's enabled by default - since that didn't seem to be the case originally, either the docs are wrong or the default may have changed?
Marking as draft because I haven't had much time to test it yet. It succeeds in compiling and seems to work, but I'd like to be more sure that everything is good. :-)