From a7bc6c9c002f26b0bb781a3475774eba5dab6acf Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sun, 9 Mar 2014 00:41:38 +0100 Subject: [PATCH] Remove GL_LUMINANCE in more places. Causes problems with GL 3.2+ core contexts. Found by testing on ATI. --- dither_effect.cpp | 2 +- init.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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. -- 2.39.2