Closed mariosubspace closed 1 month ago
please have a look at the updated code (release 1.0.6 and up) it should fix the crash.
Works for me in a build, Quest 2 + OpenGL ES. No crash and I can see the blocks being reused when it hits max. Closing this issue. Thanks for the quick response!
Btw, I noticed a separate minor issue you may want to check out. When both controllers are active, a block spawns simultaneously for both controllers when pressing the A button.
Thanks for the report, I'll check it out.
Chapter 4 says to set up the CameraConstants Uniform Buffer as such (in
CreateResources()
):In
RenderCuboid()
we set the offset to the buffer for that cube as such:When spawning a cube this makes it index out of bounds of the buffer.
Suggested fix: Allocate the CameraConstants buffer for size 1, set the offsets to 0 in the other calls, and remove the renderCuboidIndex. We update the buffer for each cube anyway.