From 34cfae20e832394d6a4038cb47c5ed672d96c66f Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Thu, 20 Mar 2014 23:15:23 +0100 Subject: [PATCH] Convert another glReadPixels() to RGBA. --- effect_chain_test.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/effect_chain_test.cpp b/effect_chain_test.cpp index f50d2ea..5fe1862 100644 --- a/effect_chain_test.cpp +++ b/effect_chain_test.cpp @@ -983,7 +983,7 @@ TEST(EffectChainTest, IdentityWithOwnPool) { 0.75f, 1.0f, 1.0f, 0.0f, 0.25f, 0.3f, }; - float out_data[6]; + float out_data[6], temp[6 * 4]; EffectChain chain(width, height); movit_debug_level = MOVIT_DEBUG_ON; @@ -1025,8 +1025,11 @@ TEST(EffectChainTest, IdentityWithOwnPool) { glBindFramebuffer(GL_FRAMEBUFFER, fbo); check_error(); - glReadPixels(0, 0, width, height, GL_RED, GL_FLOAT, out_data); + glReadPixels(0, 0, width, height, GL_RGBA, GL_FLOAT, temp); check_error(); + for (unsigned i = 0; i < 6; ++i) { + out_data[i] = temp[i * 4]; + } expect_equal(expected_data, out_data, width, height); -- 2.39.2