this post was submitted on 17 Oct 2023
1 points (66.7% liked)
C++
1805 readers
2 users here now
The center for all discussion and news regarding C++.
Rules
- Respect instance rules.
- Don't be a jerk.
- Please keep all posts related to C++.
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
In the loop where you iterate over the positions, you translate the matrix
model
with the position correctly, but when you rotate it in the next line, you rotate the identity matrix, not the translated matrix, and put the result intomodel
, which resets the position. And so all the cubes get rendered at the same place which results in it looking like only one cube is being rendered.thank you