You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The comment above mentions the order as:
COORDINATES - COLORS - NORMALS - TEXTURE COORDINATES
However, the actual data in the Vertex array does not follow this order. The order of the data is as follows:
COORDINATES - NORMALS (first) - COLORS (second) - TEXTURE COORDINATES
As you can see, there is a swap between LinkAttrib calls for NORMALS and TEXTURE COORDINATES, which is different from the order in previous chapters. Although this is currently working correctly, this could be misleading and confusing for learners.
Proposed Solutions:
1 - Fix the comment to reflect the correct order (i.e., change the comment above Vertex vertices[] to match the actual order of data).
2 - Fix the data order in the struct Vertex and the corresponding LinkAttrib calls to match the order presented in the comment (COORDINATES, COLORS, NORMALS, TEXTURE COORDINATES). This would require changing the order of attributes in the struct and adjusting the LinkAttrib calls accordingly to preserve the correct rendering behavior.
Thank you for maintaining this amazing repository!
The text was updated successfully, but these errors were encountered:
In the file YoutubeOpenGL 12 - Mesh Class, specifically in
main.cpp
, we have aVertex vertices[]
array where we store most of our mesh data:The comment above mentions the order as:
COORDINATES - COLORS - NORMALS - TEXTURE COORDINATES
However, the actual data in the Vertex array does not follow this order. The order of the data is as follows:
COORDINATES - NORMALS (first) - COLORS (second) - TEXTURE COORDINATES
The struct Vertex is defined in VBO.h like this:
In mesh.cpp, the correct rendering of the object relies on this order, and the LinkAttrib calls follow this pattern:
As you can see, there is a swap between LinkAttrib calls for NORMALS and TEXTURE COORDINATES, which is different from the order in previous chapters. Although this is currently working correctly, this could be misleading and confusing for learners.
Proposed Solutions:
1 - Fix the comment to reflect the correct order (i.e., change the comment above Vertex vertices[] to match the actual order of data).
2 - Fix the data order in the struct Vertex and the corresponding LinkAttrib calls to match the order presented in the comment (COORDINATES, COLORS, NORMALS, TEXTURE COORDINATES). This would require changing the order of attributes in the struct and adjusting the LinkAttrib calls accordingly to preserve the correct rendering behavior.
Thank you for maintaining this amazing repository!
The text was updated successfully, but these errors were encountered: