]> git.sesse.net Git - movit/commitdiff
Remove GL_LUMINANCE in more places.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 8 Mar 2014 23:41:38 +0000 (00:41 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 8 Mar 2014 23:42:00 +0000 (00:42 +0100)
Causes problems with GL 3.2+ core contexts. Found by testing on ATI.

dither_effect.cpp
init.cpp

index e9ea19f226006e8f30584b7dbc9c1ee95cfd350d..72a38deb46490aac5e738a6bf19e48b674a6c45a 100644 (file)
@@ -84,7 +84,7 @@ void DitherEffect::update_texture(GLuint glsl_program_num, const string &prefix,
        check_error();
        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
        check_error();
-       glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE16F_ARB, texture_width, texture_height, 0, GL_LUMINANCE, GL_FLOAT, dither_noise);
+       glTexImage2D(GL_TEXTURE_2D, 0, GL_R16F, texture_width, texture_height, 0, GL_RED, GL_FLOAT, dither_noise);
        check_error();
 
        delete[] dither_noise;
index 1d7c46a50a63fb0cb1138f885efae4526eaaef0b..0957a11fc2077386bff4cb9ea4320cad36c58709 100644 (file)
--- a/init.cpp
+++ b/init.cpp
@@ -64,7 +64,7 @@ void measure_texel_subpixel_precision()
        check_error();
        glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
        check_error();
-       glTexImage1D(GL_TEXTURE_1D, 0, GL_LUMINANCE16F_ARB, 2, 0, GL_LUMINANCE, GL_FLOAT, texdata);
+       glTexImage1D(GL_TEXTURE_1D, 0, GL_R16F, 2, 0, GL_RED, GL_FLOAT, texdata);
        check_error();
 
        // Basic state.
@@ -195,7 +195,7 @@ void measure_roundoff_problems()
        check_error();
        glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
        check_error();
-       glTexImage1D(GL_TEXTURE_1D, 0, GL_LUMINANCE32F_ARB, 512, 0, GL_LUMINANCE, GL_FLOAT, texdata);
+       glTexImage1D(GL_TEXTURE_1D, 0, GL_R32F, 512, 0, GL_RED, GL_FLOAT, texdata);
        check_error();
 
        // Basic state.