mirror of
https://github.com/LearnOpenGL-CN/LearnOpenGL-CN.git
synced 2025-08-23 04:35:28 +08:00
修改一处代码bug
此处应该初始化一个单位矩阵,应该是mat(1.0f)。
This commit is contained in:
@@ -67,7 +67,7 @@ glBindVertexArray(vegetationVAO);
|
||||
glBindTexture(GL_TEXTURE_2D, grassTexture);
|
||||
for(unsigned int i = 0; i < vegetation.size(); i++)
|
||||
{
|
||||
model = glm::mat4();
|
||||
model = glm::mat4(1.0f);
|
||||
model = glm::translate(model, vegetation[i]);
|
||||
shader.setMat4("model", model);
|
||||
glDrawArrays(GL_TRIANGLES, 0, 6);
|
||||
|
Reference in New Issue
Block a user