From 0eab1db037663b940407a03037c11eb94ce6e77c Mon Sep 17 00:00:00 2001 From: themancalledjakob Date: Sat, 22 Apr 2023 11:55:04 +0200 Subject: [PATCH] use std::array instead of c-style array --- src/gpufont/font.hpp | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/gpufont/font.hpp b/src/gpufont/font.hpp index f90b17c..37dd612 100644 --- a/src/gpufont/font.hpp +++ b/src/gpufont/font.hpp @@ -146,7 +146,7 @@ struct GlyphIdentity { struct GlyphAppearance { uint32_t charcode; - glm::vec4 color; + std::array color; float fontSize_px; }; } @@ -1057,27 +1057,27 @@ class Font { bb.multiply(node.getGlobalTransformMatrix()); int32_t base = static_cast (vertices.size()); - const glm::vec4 & color = variationTextAppearance[i].color; + const std::array & color = variationTextAppearance[i].color; vertices.push_back(BufferVertex{bb.p0.x, bb.p0.y, bb.u0, bb.v0, bb.bufferIndex, - color.r, - color.g, - color.b, - color.a}); + color[0], + color[1], + color[2], + color[3]}); vertices.push_back(BufferVertex{bb.p1.x, bb.p1.y, bb.u1, bb.v0, bb.bufferIndex, - color.r, - color.g, - color.b, - color.a}); + color[0], + color[1], + color[2], + color[3]}); vertices.push_back(BufferVertex{bb.p2.x, bb.p2.y, bb.u1, bb.v1, bb.bufferIndex, - color.r, - color.g, - color.b, - color.a}); + color[0], + color[1], + color[2], + color[3]}); vertices.push_back(BufferVertex{bb.p3.x, bb.p3.y, bb.u0, bb.v1, bb.bufferIndex, - color.r, - color.g, - color.b, - color.a}); + color[0], + color[1], + color[2], + color[3]}); indices.insert(indices.end(), {base, base + 1, base + 2, base + 2, base + 3, base});