File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ namespace VSD3DStarter
109109
110110 // Vertex struct for Visual Studio Shader Designer (DGSL) holding position, normal,
111111 // tangent, color (RGBA), and texture mapping information
112- struct VertexPositionNormalTangentColorTexture
112+ struct Vertex
113113 {
114114 DirectX::XMFLOAT3 position;
115115 DirectX::XMFLOAT3 normal;
@@ -173,7 +173,7 @@ namespace VSD3DStarter
173173
174174static_assert (sizeof (VSD3DStarter::Material) == 132 , " CMO Mesh structure size incorrect" );
175175static_assert (sizeof (VSD3DStarter::SubMesh) == 20 , " CMO Mesh structure size incorrect" );
176- static_assert (sizeof (VSD3DStarter::VertexPositionNormalTangentColorTexture ) == 52 , " CMO Mesh structure size incorrect" );
176+ static_assert (sizeof (VSD3DStarter::Vertex ) == 52 , " CMO Mesh structure size incorrect" );
177177static_assert (sizeof (VSD3DStarter::SkinningVertex) == 32 , " CMO Mesh structure size incorrect" );
178178static_assert (sizeof (VSD3DStarter::MeshExtents) == 40 , " CMO Mesh structure size incorrect" );
179179static_assert (sizeof (VSD3DStarter::Bone) == 196 , " CMO Mesh structure size incorrect" );
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ using Microsoft::WRL::ComPtr;
2020
2121#include " CMO.h"
2222
23- static_assert (sizeof (VertexPositionNormalTangentColorTexture) == sizeof (VSD3DStarter::VertexPositionNormalTangentColorTexture ), " mismatch with CMO vertex type" );
23+ static_assert (sizeof (VertexPositionNormalTangentColorTexture) == sizeof (VSD3DStarter::Vertex ), " mismatch with CMO vertex type" );
2424
2525
2626namespace
Original file line number Diff line number Diff line change 2020using namespace DirectX ;
2121using Microsoft::WRL::ComPtr;
2222
23- static_assert (sizeof (VertexPositionNormalTexture) == 32 , " VBO vertex size mismatch" );
23+ static_assert (sizeof (VertexPositionNormalTexture) == sizeof (VBO:: vertex_t ) , " VBO vertex size mismatch" );
2424
2525namespace
2626{
Original file line number Diff line number Diff line change @@ -28,8 +28,16 @@ namespace VBO
2828 uint32_t numIndices;
2929 };
3030
31+ struct vertex_t
32+ {
33+ DirectX::XMFLOAT3 position;
34+ DirectX::XMFLOAT3 normal;
35+ DirectX::XMFLOAT2 textureCoordinate;
36+ };
37+
3138#pragma pack(pop)
3239
3340} // namespace
3441
3542static_assert (sizeof (VBO::header_t ) == 8 , " VBO header size mismatch" );
43+ static_assert (sizeof (VBO::vertex_t ) == 32 , " VBO vertex size mismatch" );
You can’t perform that action at this time.
0 commit comments