You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The methods render_glow and render_web_sys grab a context from an existing canvas and call draw_glow or draw_web_sys
the constant SHOWCASE_BUG will affect whether the draw methods are passed a new context or a reference.
observe that when SHOWCASE_BUG is true, draw_glow will not be displaying while draw_web_sys will work either way.
The text was updated successfully, but these errors were encountered:
vizigr0u
changed the title
glow::Context::from_webgl2_context doesn't return the same context
calling from_webgl2_context multiple times doesn't return the same context
Mar 4, 2024
observed behaviour
Calling
glow::Context::from_webgl2_context
multiple times seems to return a different context.expected behaviour
Calling
glow::Context::from_webgl2_context
multiple times returns the same context every time.This is consistent with the behaviour of the javascript getContext and with the behaviour observed in web-sys.
Repro
see this gist of drawing a triangle comparing web-sys and glow : https://gist.github.com/vizigr0u/952637d4f9b1b3bd9a6eb8e7a872a3a0
The methods
render_glow
andrender_web_sys
grab a context from an existing canvas and calldraw_glow
ordraw_web_sys
the constant
SHOWCASE_BUG
will affect whether the draw methods are passed a new context or a reference.observe that when
SHOWCASE_BUG
istrue
,draw_glow
will not be displaying whiledraw_web_sys
will work either way.The text was updated successfully, but these errors were encountered: