mirror of
https://github.com/JoeyDeVries/LearnOpenGL.git
synced 2026-01-02 04:37:54 +08:00
fix narrowing conversions (eg double to float, size_t to GLsizei)
This commit is contained in:
@@ -87,7 +87,7 @@ public:
|
||||
|
||||
// draw mesh
|
||||
glBindVertexArray(VAO);
|
||||
glDrawElements(GL_TRIANGLES, indices.size(), GL_UNSIGNED_INT, 0);
|
||||
glDrawElements(GL_TRIANGLES, static_cast<GLsizei>(indices.size()), GL_UNSIGNED_INT, 0);
|
||||
glBindVertexArray(0);
|
||||
|
||||
// always good practice to set everything back to defaults once configured.
|
||||
|
||||
Reference in New Issue
Block a user