Skip to content

fix(gl): guard GL_FRAMEBUFFER_SRGB usage with capability check#189

Merged
chyyran merged 1 commit intoSnowflakePowered:masterfrom
mikai233:srgb
Jan 25, 2026
Merged

fix(gl): guard GL_FRAMEBUFFER_SRGB usage with capability check#189
chyyran merged 1 commit intoSnowflakePowered:masterfrom
mikai233:srgb

Conversation

@mikai233
Copy link
Contributor

Description

This PR fixes a GL_INVALID_ENUM (0x500) error encountered on GLES contexts (specifically Android) where GL_FRAMEBUFFER_SRGB is not a valid capability to enable/disable.

Related Issue

Fixes #188

Verification

  • Verified on Android Emulator: The GL error 0x500 is gone, and the runtime handles the lack of sRGB toggle gracefully.
  • Existing behavior on Desktop GL should remain unchanged.

Skip GL_FRAMEBUFFER_SRGB toggling on contexts that do not support it (e.g. Android GLES) to avoid GL error 0x500.
@chyyran chyyran merged commit 69d9fc1 into SnowflakePowered:master Jan 25, 2026
21 checks passed
@mikai233 mikai233 deleted the srgb branch January 25, 2026 11:45
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.

librashader-runtime-gl produces constant GL errors related to GL_FRAMEBUFFER_SRGB.

2 participants