// Copyright (c) 2023 Dominic Masters // // This software is released under the MIT License. // https://opensource.org/licenses/MIT #include "CubeMeshHost.hpp" using namespace Dawn; CubeMeshHost::CubeMeshHost(std::weak_ptr item) : MeshHost(item), size(glm::vec3(1,1,1)) { } void CubeMeshHost::onStart() { this->mesh.createBuffers( CUBE_VERTICE_COUNT, CUBE_INDICE_COUNT ); useEffect([&]{ CubeMesh::buffer(&this->mesh, glm::vec3(this->size) * -0.5f, this->size, 0, 0); }, this->size)(); }