]> git.sesse.net Git - movit/commitdiff
Don't use GL_RGBA32F/GL_RGBA16F with GL_UNSIGNED_BYTE.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 20 Mar 2014 20:12:31 +0000 (21:12 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 20 Mar 2014 20:12:31 +0000 (21:12 +0100)
GLES doesn't like this, even with NULL data. Replace with GL_FLOAT.

effect_chain_test.cpp
init.cpp
test_util.cpp

index aabcc33fe4dddf8b5c321f5f535bce8bd900beb2..70701b35095511d19c45a5bf39a7e14668d004a0 100644 (file)
@@ -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);
index 671c507c5588c7faf5783b7f0a500d1780fc9162..89998f40d64d81c957dfabc897ba61b6b63a7552 100644 (file)
--- 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);
index ec9cbf947a5bcbd7b518677f44f279c7972df301..f48ff7fffcc8bbd4cf6478b1aec5d12b22ae74f4 100644 (file)
@@ -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);