feat(srgb): swap textures and framebuffers to SRGB

This commit is contained in:
Martin Wernstål
2023-01-23 14:12:14 +01:00
parent a7cbe3776d
commit 02d1a3c1c3
3 changed files with 8 additions and 5 deletions

View File

@@ -71,7 +71,7 @@ update_surface_size(int w, int h, GLuint offscreen_texture_id) {
glViewport(0, 0, w, h);
if (offscreen_texture_id) {
glBindTexture(GL_TEXTURE_2D, offscreen_texture_id);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0);
glTexImage2D(GL_TEXTURE_2D, 0, GL_SRGB_ALPHA, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0);
}
}