-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathVertex.h
39 lines (32 loc) · 786 Bytes
/
Vertex.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//***************************************************************************************
// Vertex.h by Frank Luna (C) 2011 All Rights Reserved.
//
// Defines vertex structures and input layouts.
//***************************************************************************************
#ifndef VERTEX_H
#define VERTEX_H
#include "d3dUtil.h"
namespace Vertex
{
// Basic 32-byte vertex structure.
struct Basic32
{
XMFLOAT3 Pos;
XMFLOAT3 Normal;
XMFLOAT2 Tex;
};
}
class InputLayoutDesc
{
public:
// Init like const int A::a[4] = {0, 1, 2, 3}; in .cpp file.
static const D3D11_INPUT_ELEMENT_DESC Basic32[3];
};
class InputLayouts
{
public:
static void InitAll(ID3D11Device* device);
static void DestroyAll();
static ID3D11InputLayout* Basic32;
};
#endif // VERTEX_H