Skip to content

Fix GPU resource safety in constructors/destructors (#386)#387

Open
RobLoach wants to merge 3 commits intonextfrom
fix/issue-386-gpu-resource-safety
Open

Fix GPU resource safety in constructors/destructors (#386)#387
RobLoach wants to merge 3 commits intonextfrom
fix/issue-386-gpu-resource-safety

Conversation

@RobLoach
Copy link
Copy Markdown
Owner

Fixes #386

Audited all GPU/audio resource classes per the raylib C++ GPU resource guidelines.

Changes

RenderTexture — guard Unload() with IsValid() check; call Unload() before reassigning from raw ::RenderTexture

Music — guard Unload() with IsValid() check; call Unload() before reassigning from raw ::Music

ModelAnimation — guard Unload() with keyframePoses != nullptr check to prevent calling into raylib with an empty/moved-from object

VrStereoConfig — delete copy constructor/assignment; add defaulted move constructor/assignment

Window — delete copy constructor/assignment (manages singleton global state)

AudioDevice — delete copy constructor/assignment (manages singleton global state)

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.

1 participant