Skip to content

Don't accidentally reuse overlay keys - #6

Merged
dfgHiatus merged 2 commits into
Project-Babble:masterfrom
GodotVR:master
Oct 22, 2025
Merged

dfgHiatus merged 2 commits into
Project-Babble:masterfrom
GodotVR:master

Conversation

@dfgHiatus

Copy link
Copy Markdown
Collaborator

No description provided.

When multiple overlays exist and any but the last is deleted, they shift
backward in the array. When another one is then created, it will then
try to use the key of an existing one, since those aren't updated to
match the new array index. This will cause VROverlayError_KeyInUse,
which is promptly ignored, and the overlay container will think it is
overlay 0, causing it to start drawing its subviewport texture to the
wrong overlay handle. After a few cycles, the world falls apart and
overlays don't appear at all anymore.

This fixes the problem by just guaranteeing the ID is unique using the
overlay container's instance ID. I would like to do further cleanup of
the tracking in ovr_data later.
Don't accidentally reuse overlay keys
@dfgHiatus dfgHiatus self-assigned this Oct 22, 2025
@dfgHiatus
dfgHiatus merged commit 4ec071e into Project-Babble:master Oct 22, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants