]> 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>
Fri, 21 Mar 2014 01:06:26 +0000 (02:06 +0100)
GLES doesn't like this, even with NULL data. Replace with GL_FLOAT.

effect_chain_test.cpp
init.cpp
test_util.cpp

index de3812aefc1488e9dd48aae63e7d3e053e485818..66247c163a1b6f0981aadc5962f786d7b4a2ed34 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 13a86df236d5ea909dc269c8f8af827e1b7b5a35..37e9d70f974ec160c7bd7b2f169767cdcf17b263 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 cb972364d000b45ee57ab4024f2a141c1d6576b4..27fac8fc4fa2582f6c27c5dc7b8331827d672250 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);