From: Steinar H. Gunderson Date: Thu, 20 Mar 2014 20:12:31 +0000 (+0100) Subject: Don't use GL_RGBA32F/GL_RGBA16F with GL_UNSIGNED_BYTE. X-Git-Tag: 1.1~12^2~26 X-Git-Url: https://git.sesse.net/?p=movit;a=commitdiff_plain;h=de9c0e36aae9272c57596541de19790686669b25;hp=926348692a4138e9c88f49ef43657dedb5f36897 Don't use GL_RGBA32F/GL_RGBA16F with GL_UNSIGNED_BYTE. GLES doesn't like this, even with NULL data. Replace with GL_FLOAT. --- diff --git a/effect_chain_test.cpp b/effect_chain_test.cpp index aabcc33..70701b3 100644 --- a/effect_chain_test.cpp +++ b/effect_chain_test.cpp @@ -1002,7 +1002,7 @@ TEST(EffectChainTest, IdentityWithOwnPool) { check_error(); glBindTexture(GL_TEXTURE_2D, texnum); check_error(); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA32F, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA32F, width, height, 0, GL_RGBA, GL_FLOAT, NULL); check_error(); glGenFramebuffers(1, &fbo); diff --git a/init.cpp b/init.cpp index 671c507..89998f4 100644 --- a/init.cpp +++ b/init.cpp @@ -38,7 +38,7 @@ void measure_texel_subpixel_precision() check_error(); glBindTexture(GL_TEXTURE_2D, dst_texnum); check_error(); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA16F_ARB, width, 1, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA16F, width, 1, 0, GL_RGBA, GL_FLOAT, NULL); check_error(); glGenFramebuffers(1, &fbo); diff --git a/test_util.cpp b/test_util.cpp index ec9cbf9..f48ff7f 100644 --- a/test_util.cpp +++ b/test_util.cpp @@ -59,7 +59,7 @@ EffectChainTester::EffectChainTester(const float *data, unsigned width, unsigned check_error(); glBindTexture(GL_TEXTURE_2D, texnum); check_error(); - glTexImage2D(GL_TEXTURE_2D, 0, framebuffer_format, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL); + glTexImage2D(GL_TEXTURE_2D, 0, framebuffer_format, width, height, 0, GL_RGBA, GL_FLOAT, NULL); check_error(); glGenFramebuffers(1, &fbo);