From 978b6aced44541132951fd1e2ab165fa859a7315 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Thu, 20 Mar 2014 21:12:31 +0100 Subject: [PATCH] Don't use GL_RGBA32F/GL_RGBA16F with GL_UNSIGNED_BYTE. GLES doesn't like this, even with NULL data. Replace with GL_FLOAT. --- effect_chain_test.cpp | 2 +- init.cpp | 2 +- test_util.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/effect_chain_test.cpp b/effect_chain_test.cpp index de3812a..66247c1 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 13a86df..37e9d70 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 cb97236..27fac8f 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); -- 2.39.5