Skip to content

Correctly set glConfig.reflectionMappingAvailable#1978

Merged
slipher merged 2 commits into
DaemonEngine:masterfrom
slipher:reflection-avail
Jun 8, 2026
Merged

Correctly set glConfig.reflectionMappingAvailable#1978
slipher merged 2 commits into
DaemonEngine:masterfrom
slipher:reflection-avail

Conversation

@slipher

@slipher slipher commented Jun 5, 2026

Copy link
Copy Markdown
Member

Fixes a crash with r_showCubeProbes.

slipher added 2 commits June 5, 2026 07:29
glConfig.reflectionMappingAvailable was set after shaders are loaded, so
gl_reflectionShader was not loaded when it should be. Set it in
EnableAvailableFeatures().

Also it could only be set to true; if you turned off the cvar the next
map change would not set it to false.

Fixes the bug that r_showCubeProbes causes a crash (due to null
gl_reflectionShader) if reflection mapping was not enabled in the
previous renderer load.
If a required feature of normal/deluxe/specular mapping was disabled for
a reason other than the cvar, glConfig.reflectionMappingAvailable
must be set to false.

@illwieckz illwieckz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

LGTM.

@slipher
slipher merged commit d4771b3 into DaemonEngine:master Jun 8, 2026
9 checks passed
@slipher
slipher deleted the reflection-avail branch June 8, 2026 07:02
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