diff -r 1de2b8d64e9f -r 98906a94732f src/gl/common.h --- a/src/gl/common.h Tue Jan 28 23:34:49 2020 +0200 +++ b/src/gl/common.h Thu Jan 30 19:20:11 2020 +0200 @@ -47,8 +47,8 @@ }; Type type; glm::vec3 vertices[4]; - Color color; - linetypes::Id id; + ldraw::Color color; + ldraw::Id id; /** * @return amount of vertices used for geometry @@ -84,7 +84,7 @@ namespace gl { - inline Polygon edgeLine(const glm::vec3& v_1, const glm::vec3& v_2, Color color, linetypes::Id id) + inline Polygon edgeLine(const glm::vec3& v_1, const glm::vec3& v_2, ldraw::Color color, ldraw::Id id) { return {Polygon::EdgeLine, {v_1, v_2}, color, id}; } @@ -93,8 +93,8 @@ const glm::vec3& v_1, const glm::vec3& v_2, const glm::vec3& v_3, - Color color, - linetypes::Id id) + ldraw::Color color, + ldraw::Id id) { return {Polygon::Triangle, {v_1, v_2, v_3}, color, id}; } @@ -104,8 +104,8 @@ const glm::vec3& v_2, const glm::vec3& v_3, const glm::vec3& v_4, - Color color, - linetypes::Id id) + ldraw::Color color, + ldraw::Id id) { return {Polygon::Quadrilateral, {v_1, v_2, v_3, v_4}, color, id}; } @@ -115,8 +115,8 @@ const glm::vec3& v_2, const glm::vec3& control_1, const glm::vec3& control_2, - Color color, - linetypes::Id id) + ldraw::Color color, + ldraw::Id id) { return {Polygon::ConditionalEdge, {v_1, v_2, control_1, control_2}, color, id}; } @@ -129,6 +129,7 @@ Quads, ConditionalLines }; + constexpr ArrayClass ARRAY_CLASSES[] = {ArrayClass::Lines, ArrayClass::Triangles, ArrayClass::Quads, ArrayClass::ConditionalLines}; constexpr int NUM_ARRAY_CLASSES = countof(ARRAY_CLASSES); constexpr int FLOATS_PER_VERTEX = 7;