When running examples sequentially in the same process, the skybox renders with a magenta tint if the PBR example runs first. This is a regression introduced in r3d v0.9.1, it did not occur with v0.9.0.
Steps to Reproduce
- Build and run with r3d v0.9.1 bindings
- Run: Examples.exe Pbr Skybox
- Close the PBR window normally (press Escape/close)
- Observe the Skybox example opens with a magenta tint
Expected Behavior
The Skybox example should render identically regardless of whether it runs standalone or after another example.
Actual Behavior
The skybox and scene have a magenta color cast when the Skybox example follows the PBR example.
What doesn't trigger the bug
- Running Examples.exe Skybox alone — works fine
- Running Examples.exe Skybox Pbr (reversed order) — works fine
Investigation
Each example performs a full lifecycle (InitWindow → R3D_Init → game loop → R3D_Close → CloseWindow), so the OpenGL context is destroyed and recreated between examples. Despite this, some internal r3d state appears to leak across the Close/Init cycle.
The v0.9.1 release introduced a UBO/sampler binding cache and a shader alias system (r3d_shader_custom_t refactor with program/programOwner split). We suspect the binding cache or related GL state tracking becomes stale when r3d is reinitialized within the same process, causing incorrect texture bindings that manifest as magenta (missing texture fallback color).
Removing the UBO binding cache (uniformBindings guard in r3d_shader_set_uniform_block/r3d_shader_bind_uniform_block) did not resolve the issue, so the root cause may be in the sampler binding cache or another part of the shader module refactor.
Environment
- OS: Windows 11
- r3d version: v0.9.1
- Bindings: R3D-cs (C#/.NET)
- Last working version: v0.9.0
When running examples sequentially in the same process, the skybox renders with a magenta tint if the PBR example runs first. This is a regression introduced in r3d v0.9.1, it did not occur with v0.9.0.
Steps to Reproduce
Expected Behavior
The Skybox example should render identically regardless of whether it runs standalone or after another example.
Actual Behavior
The skybox and scene have a magenta color cast when the Skybox example follows the PBR example.
What doesn't trigger the bug
Investigation
Each example performs a full lifecycle (InitWindow → R3D_Init → game loop → R3D_Close → CloseWindow), so the OpenGL context is destroyed and recreated between examples. Despite this, some internal r3d state appears to leak across the Close/Init cycle.
The v0.9.1 release introduced a UBO/sampler binding cache and a shader alias system (r3d_shader_custom_t refactor with program/programOwner split). We suspect the binding cache or related GL state tracking becomes stale when r3d is reinitialized within the same process, causing incorrect texture bindings that manifest as magenta (missing texture fallback color).
Removing the UBO binding cache (uniformBindings guard in r3d_shader_set_uniform_block/r3d_shader_bind_uniform_block) did not resolve the issue, so the root cause may be in the sampler binding cache or another part of the shader module refactor.
Environment