--- a/src/gl/compiler.cpp Thu Feb 06 20:33:05 2020 +0200 +++ b/src/gl/compiler.cpp Thu Feb 06 23:41:20 2020 +0200 @@ -205,6 +205,11 @@ return {r / 255.0f, g / 255.0f, b / 255.0f}; } +ldraw::Id gl::Compiler::idFromColor(const std::array<GLbyte, 3>& data) +{ + return {data[0] * std::int32_t{0x10000} + data[1] * std::int32_t{0x100} + data[2]}; +} + void gl::Compiler::buildPolygon( gl::Polygon polygon, std::vector<gl::Vertex>* vboData,