Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 89e197aa authored by chaviw's avatar chaviw
Browse files

Convert half4 color to float array for buffer copy

Converts the half4 color object to a float array so it can be properly
copied into a v4 float gl buffer.

Change-Id: Ibdc104277e34cf7cb382f027f95fb8fdd5d63bb0
Fixes: 66910602
Test: Existing tests pass
parent be1a67ca
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -133,7 +133,7 @@ void Program::setUniforms(const Description& desc) {
        glUniformMatrix4fv(mTextureMatrixLoc, 1, GL_FALSE, desc.mTexture.getMatrix().asArray());
    }
    if (mColorLoc >= 0) {
        const float* color = &static_cast<details::TVec4<float> const &>(desc.mColor)[0];
        const float color[4] = {desc.mColor.r, desc.mColor.g, desc.mColor.b, desc.mColor.a};
        glUniform4fv(mColorLoc, 1, color);
    }
    if (mColorMatrixLoc >= 0) {