Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Src/CMO.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ namespace VSD3DStarter

// Vertex struct for Visual Studio Shader Designer (DGSL) holding position, normal,
// tangent, color (RGBA), and texture mapping information
struct VertexPositionNormalTangentColorTexture
struct Vertex
{
DirectX::XMFLOAT3 position;
DirectX::XMFLOAT3 normal;
Expand Down Expand Up @@ -173,7 +173,7 @@ namespace VSD3DStarter

static_assert(sizeof(VSD3DStarter::Material) == 132, "CMO Mesh structure size incorrect");
static_assert(sizeof(VSD3DStarter::SubMesh) == 20, "CMO Mesh structure size incorrect");
static_assert(sizeof(VSD3DStarter::VertexPositionNormalTangentColorTexture) == 52, "CMO Mesh structure size incorrect");
static_assert(sizeof(VSD3DStarter::Vertex) == 52, "CMO Mesh structure size incorrect");
static_assert(sizeof(VSD3DStarter::SkinningVertex) == 32, "CMO Mesh structure size incorrect");
static_assert(sizeof(VSD3DStarter::MeshExtents) == 40, "CMO Mesh structure size incorrect");
static_assert(sizeof(VSD3DStarter::Bone) == 196, "CMO Mesh structure size incorrect");
Expand Down
2 changes: 1 addition & 1 deletion Src/ModelLoadCMO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ using Microsoft::WRL::ComPtr;

#include "CMO.h"

static_assert(sizeof(VertexPositionNormalTangentColorTexture) == sizeof(VSD3DStarter::VertexPositionNormalTangentColorTexture), "mismatch with CMO vertex type");
static_assert(sizeof(VertexPositionNormalTangentColorTexture) == sizeof(VSD3DStarter::Vertex), "mismatch with CMO vertex type");


namespace
Expand Down
2 changes: 1 addition & 1 deletion Src/ModelLoadVBO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
using namespace DirectX;
using Microsoft::WRL::ComPtr;

static_assert(sizeof(VertexPositionNormalTexture) == 32, "VBO vertex size mismatch");
static_assert(sizeof(VertexPositionNormalTexture) == sizeof(VBO::vertex_t), "VBO vertex size mismatch");

namespace
{
Expand Down
8 changes: 8 additions & 0 deletions Src/vbo.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,16 @@ namespace VBO
uint32_t numIndices;
};

struct vertex_t
{
DirectX::XMFLOAT3 position;
DirectX::XMFLOAT3 normal;
DirectX::XMFLOAT2 textureCoordinate;
};

#pragma pack(pop)

} // namespace

static_assert(sizeof(VBO::header_t) == 8, "VBO header size mismatch");
static_assert(sizeof(VBO::vertex_t) == 32, "VBO vertex size mismatch");
Loading