From: Steinar H. Gunderson Date: Sat, 8 Mar 2014 23:41:38 +0000 (+0100) Subject: Remove GL_LUMINANCE in more places. X-Git-Tag: 1.0~36 X-Git-Url: https://git.sesse.net/?p=movit;a=commitdiff_plain;h=a7bc6c9c002f26b0bb781a3475774eba5dab6acf Remove GL_LUMINANCE in more places. Causes problems with GL 3.2+ core contexts. Found by testing on ATI. --- diff --git a/dither_effect.cpp b/dither_effect.cpp index e9ea19f..72a38de 100644 --- a/dither_effect.cpp +++ b/dither_effect.cpp @@ -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; diff --git a/init.cpp b/init.cpp index 1d7c46a..0957a11 100644 --- 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.