6 const BlockType BlockType::DEFAULT;
7 const NullShape BlockType::DEFAULT_SHAPE;
9 void BlockType::FillVBO(
11 std::vector<glm::vec3> &vertices,
12 std::vector<glm::vec3> &colors,
13 std::vector<glm::vec3> &normals
15 shape->Vertices(vertices, pos);
16 colors.insert(colors.end(), shape->VertexCount(), color);
17 shape->Normals(normals);
20 void BlockType::FillOutlineVBO(
21 std::vector<glm::vec3> &vertices,
22 std::vector<glm::vec3> &colors
24 shape->Outline(vertices);
25 colors.insert(colors.end(), shape->OutlineCount(), outline_color);
29 BlockTypeRegistry::BlockTypeRegistry() {
30 Add(BlockType::DEFAULT);
33 int BlockTypeRegistry::Add(const BlockType &t) {
34 int id = types.size();