- only enable sRGB if we got an sRGB framebuffer.
[laserbrain_demo] / src / main.cc
index 169dbd3..d24428c 100644 (file)
@@ -48,6 +48,7 @@ int main(int argc, char **argv)
        int val;
        SDL_GL_GetAttribute(SDL_GL_FRAMEBUFFER_SRGB_CAPABLE, &val);
        printf("SDL says we %s an sRGB framebuffer\n", val ? "got" : "didn't get");
+       fb_srgb = val;
 
        if(!(ctx = SDL_GL_CreateContext(win))) {
                fprintf(stderr, "failed to create OpenGL context\n");