mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2024-11-29 09:05:41 +00:00
Pad struct and align on 4 byte boundary.
This commit is contained in:
parent
eac76f0908
commit
2422caadc6
|
@ -28,6 +28,7 @@ struct Vertex
|
|||
float texcoords[2];
|
||||
UINT8 color[4];
|
||||
UINT8 fixedShade;
|
||||
UINT8 padding[3];
|
||||
};
|
||||
|
||||
struct Poly // our polys are always 3 triangles, unlike the real h/w
|
||||
|
|
|
@ -289,7 +289,7 @@ void CNew3D::RenderFrame(void)
|
|||
glVertexAttribPointer(m_r3dShader.GetVertexAttribPos("inNormal"), 3, GL_FLOAT, GL_FALSE, sizeof(Vertex), (void*)offsetof(Vertex, normal));
|
||||
glVertexAttribPointer(m_r3dShader.GetVertexAttribPos("inTexCoord"), 2, GL_FLOAT, GL_FALSE, sizeof(Vertex), (void*)offsetof(Vertex, texcoords));
|
||||
glVertexAttribPointer(m_r3dShader.GetVertexAttribPos("inColour"), 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(Vertex), (void*)offsetof(Vertex, color));
|
||||
glVertexAttribPointer(m_r3dShader.GetVertexAttribPos("inFixedShade"), 1, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(Vertex), (void*)offsetof(Vertex, fixedShade));
|
||||
glVertexAttribPointer(m_r3dShader.GetVertexAttribPos("inFixedShade"), 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(Vertex), (void*)offsetof(Vertex, fixedShade));
|
||||
|
||||
m_r3dShader.SetShader(true);
|
||||
|
||||
|
|
Loading…
Reference in a new issue