-
Notifications
You must be signed in to change notification settings - Fork 3.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
fix_renderViaOffscreenBackBuffer_init_and_creation_test #6986
fix_renderViaOffscreenBackBuffer_init_and_creation_test #6986
Conversation
a744c8b
to
ace6b09
Compare
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.
lgtm with those comments addressed.
Verified this fixes browser.test_html5_webgl_create_context
locally (which was broken).
src/library_gl.js
Outdated
Module.printErr('renderViaOffscreenBackBuffer=true specified in WebGL context creation attributes, pass linker flag -s OFFSCREEN_FRAMEBUFFER=1 to enable support!'); | ||
#endif | ||
return 0; | ||
if (webGLContextAttributes['renderViaOffscreenBackBuffer']) Module.printErr('renderViaOffscreenBackBuffer=true specified in WebGL context creation attributes, pass linker flag -s OFFSCREEN_FRAMEBUFFER=1 to enable support!'); |
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.
Module.printErr(
should be err(
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.
thanks!
#if GL_DEBUG | ||
Module.printErr('renderViaOffscreenBackBuffer=true specified in WebGL context creation attributes, pass linker flag -s OFFSCREEN_FRAMEBUFFER=1 to enable support!'); | ||
#endif | ||
return 0; |
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.
was the removal of the return 0
intentional? (so now it will warn and continue? sounds ok to me)
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.
yes, removed that because I don't want to afford to make this check in non-OFFSCREEN_FRAMEBUFFER builds. Then, the return 0;
behavior would only be present if GL_DEBUG
is set, but that does not feel good - one doesn't want to change runtime behavior depending on a debug flag - so best is to demote the print to a debug time warning only.
ace6b09
to
39eb98a
Compare
… behind GL_DEBUG for 'do not pay for what you do not use', and add missing initialization of renderViaOffscreenBackBuffer field.
39eb98a
to
fa20d27
Compare
Move renderViaOffscreenBackBuffer/OFFSCREEN_FRAMEBUFFER enabling test behind GL_DEBUG for 'do not pay for what you do not use', and add missing initialization of renderViaOffscreenBackBuffer field.