Files
hwr2024_b/GDP/D3D11/Vertex.h
T
david 97192e1587 Add input layout
Add matrix buffer
Convert camera to D3D11
2026-11-27 16:08:22 +01:00

24 lines
877 B
C++

#pragma once
#include <DirectXMath.h>
using namespace DirectX;
struct Vertex
{
XMFLOAT3 position;
XMFLOAT3 normal;
XMFLOAT2 uv;
XMFLOAT4 color;
Vertex() : position(0.0f, 0.0f, 0.0f), color(1.0f, 1.0f, 1.0f, 1.0f), uv(0.0f, 0.0f), normal(0.0f, 0.0f, 0.0f) {}
Vertex(float x, float y, float z) : position(x, y, z), color(1.0f, 1.0f, 1.0f, 1.0f), uv(0.0f, 0.0f), normal(0.0f, 0.0f, 0.0f) {}
Vertex(float x, float y, float z, UINT r, UINT g, UINT b) :
position(x, y, z), color(1.0f, 1.0f, 1.0f, 1.0f), uv(0.0f, 0.0f), normal(0.0f, 0.0f, 0.0f) {}
Vertex(float x, float y, float z, float u, float v) :
position(x, y, z), color(1.0f, 1.0f, 1.0f, 1.0f), uv(u, v), normal(0.0f, 0.0f, 0.0f) {}
Vertex(float x, float y, float z, float nx, float ny, float nz, float u, float v) :
position(x, y, z), color(1.0f, 1.0f, 1.0f, 1.0f), uv(u, v), normal(nx, ny, nz) {}
};