#Viewports & Textures & HTML5 & Compatibility renderer

1 messages · Page 1 of 1 (latest)

spare leaf
#

My game in HTML5 is not drawing one of the Viewports I want it to draw. It works locally.

Within each level I have a 2d node that extends my marker class MiniWorld.
I have a global scene which contains a texture using a ViewportTexture, Global.tscn > CamOverlay > CropCircle > MinimapSocket. That class listens for scene changes and when it detects them pulls out the Minimap and sets its own MinimapSocket's texture = miniworld.get_texture()
Locally, this all works fine.
In the HTML5 build there's nothing untoward in the logs, but the minimap just isn't displayed.
HALP.
(attached the bug. The minimap should be inset in the circle, and the logs say it found and is setting up the texture, but it isn't displayed)

#

elsewhere (not visible), I also use a viewport to put 2d content on a surface in the scene. I use several nested scenes with editable children to do this, and the ViewportTextures often complain about the paths being bad (I guess they each want to use global paths to the child from each and every level of the tree?)
Error: ```
E 0:00:08:834 Goto.gd:97 @ _emplace_current_scene(): Path to node is invalid: 'Spraypaint2'.
<C++ Error> Parameter "vpn" is null.
<C++ Source> scene/main/viewport.cpp:189 @ _setup_local_to_scene()
<Stack Trace> Goto.gd:97 @ _emplace_current_scene()
Goto.gd:105 @ replace_current_scene()

#

is it possible they're interfering with each other somehow?

#

carefully fixing this bug from one location or another I can remove that error line (until I next change anything in scene hierarchy); the minimap still doesn't show up though

#

it certainly looks like the texture is linked; using the remote inspector I can see that the MinimapSocket has a texture set, and that that texture has a viewport path that seems valid.

#

It's just not drawing anything.

#

resizing the browser window fixes it (it makes the thing show up)

#

but that's obviously an insane workaround for something I'm doing to displease the HTML5 gods 😄

spare leaf
#

setting the subviewport render target update mode to "always" makes it appear in the circle! but now it isn't redrawing/updating when the minimap itself updates -- until I do the trick with resizing again.

spare leaf
spare leaf