Starting basic physics, nothing fancy

This commit is contained in:
2023-02-20 00:29:28 -08:00
parent 4bfec16ba7
commit 9606b4dc9b
32 changed files with 779 additions and 286 deletions

View File

@ -16,6 +16,9 @@ namespace Dawn {
public SceneItemPrefab<SimpleSpinningCubePrefab>
{
public:
MeshHost *meshHost;
SimpleTexturedMaterial *material;
static std::vector<Asset*> prefabAssets(AssetManager *man) {
return std::vector<Asset*>();
}
@ -27,9 +30,9 @@ namespace Dawn {
void prefabInit(AssetManager *man) override {
auto meshRenderer = this->addComponent<MeshRenderer>();
auto meshHost = this->addComponent<MeshHost>();
auto spinning = this->addComponent<ExampleSpin>();
auto material = this->addComponent<SimpleTexturedMaterial>();
meshHost = this->addComponent<MeshHost>();
// auto spinning = this->addComponent<ExampleSpin>();
material = this->addComponent<SimpleTexturedMaterial>();
meshHost->mesh.createBuffers(CUBE_VERTICE_COUNT, CUBE_INDICE_COUNT);
CubeMesh::buffer(&meshHost->mesh, glm::vec3(-0.5f, -0.5f, -0.5f), glm::vec3(1, 1, 1), 0, 0);