Skip to content

Commit

Permalink
fix falling sand
Browse files Browse the repository at this point in the history
  • Loading branch information
Kade-github committed May 18, 2024
1 parent d7304cc commit 8270f1b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Game/Objects/Base/FallingBlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,15 @@ FallingBlock::FallingBlock(glm::vec3 _pos, Texture* t, std::vector<GameObject::V
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, sizeof(GameObject::VVertex), (void*)0);
glEnableVertexAttribArray(0);

// normal attribute
glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, sizeof(GameObject::VVertex), (void*)offsetof(GameObject::VVertex, normal));
// uv attribute
glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, sizeof(GameObject::VVertex), (void*)offsetof(GameObject::VVertex, uv));
glEnableVertexAttribArray(1);

// normal attribute

glVertexAttribPointer(2, 3, GL_FLOAT, GL_FALSE, sizeof(GameObject::VVertex), (void*)offsetof(GameObject::VVertex, normal));
glEnableVertexAttribArray(2);

glBindVertexArray(0);
}

Expand Down

0 comments on commit 8270f1b

Please sign in to comment.