forked from megayuchi/D3D12Lecture
-
Notifications
You must be signed in to change notification settings - Fork 0
/
typedef.h
93 lines (80 loc) · 1.21 KB
/
typedef.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#pragma once
#include <DirectXMath.h>
#include "../Util/LinkedList.h"
using namespace DirectX;
struct BasicVertex
{
XMFLOAT3 position;
XMFLOAT4 color;
XMFLOAT2 texCoord;
};
union RGBA
{
struct
{
BYTE r;
BYTE g;
BYTE b;
BYTE a;
};
BYTE bColorFactor[4];
};
struct CONSTANT_BUFFER_DEFAULT
{
XMMATRIX matWorld;
XMMATRIX matView;
XMMATRIX matProj;
};
struct CONSTANT_BUFFER_SPRITE
{
XMFLOAT2 ScreenRes;
XMFLOAT2 Pos;
XMFLOAT2 Scale;
XMFLOAT2 TexSize;
XMFLOAT2 TexSampePos;
XMFLOAT2 TexSampleSize;
float Z;
float Alpha;
float Reserved0;
float Reserved1;
};
enum CONSTANT_BUFFER_TYPE
{
CONSTANT_BUFFER_TYPE_DEFAULT,
CONSTANT_BUFFER_TYPE_SPRITE,
CONSTANT_BUFFER_TYPE_COUNT
};
struct CONSTANT_BUFFER_PROPERTY
{
CONSTANT_BUFFER_TYPE type;
UINT Size;
};
struct TEXTURE_HANDLE
{
ID3D12Resource* pTexResource;
ID3D12Resource* pUploadBuffer;
D3D12_CPU_DESCRIPTOR_HANDLE srv;
BOOL bUpdated;
BOOL bFromFile;
DWORD dwRefCount;
void* pSearchHandle;
SORT_LINK Link;
};
struct FONT_HANDLE
{
IDWriteTextFormat* pTextFormat;
float fFontSize;
WCHAR wchFontFamilyName[512];
};
struct TVERTEX
{
float u;
float v;
};
struct FLOAT3
{
float x;
float y;
float z;
};
#define DEFULAT_LOCALE_NAME L"ko-kr"