blob: dd83e6e0605fa08deb2e2e82291022ca460a5c58 (
plain)
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
|
#pragma once
#include "Runtime/Utilities/Exception.h"
#include "Runtime/Rendering/DynamicMesh.h"
#include "Runtime/Math/Math.h"
#include "Runtime/Utilities/StaticInitiator.h"
#include "Runtime/Graphics/CustomVertexLayout.h"
#include "Runtime/Graphics/DefaultVertexLayout.h"
#include "Runtime/Graphics/Color.h"
#include "Runtime/Graphics/GfxDevice.h"
struct UIVertexLayout
{
Vector2 position;
Vector2 uv;
Color32 color;
};
CustomException(UIMeshException);
// 所有的UIMesh都是左上角为原点
class UIMesh : public DynamicMesh
{
public:
UIMesh() : DynamicMesh() {}
virtual ~UIMesh() {}
virtual void Draw() = 0;
static CustomVertexLayout s_UIVertexLayout;
static unsigned int s_SizePerVertex;
};
|