diff options
author | chai <chaifix@163.com> | 2021-11-03 09:52:26 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-11-03 09:52:26 +0800 |
commit | c10e0d92f46e5eaf25a69e1fafe5f4dbd8eaab9d (patch) | |
tree | 2eb1a91339b35fea68f48b2774355f496519db83 /Runtime/GUI/UIMesh.h | |
parent | 3898f2c648b1a731dead8337aad8912d2b8b80d7 (diff) |
*misc
Diffstat (limited to 'Runtime/GUI/UIMesh.h')
-rw-r--r-- | Runtime/GUI/UIMesh.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Runtime/GUI/UIMesh.h b/Runtime/GUI/UIMesh.h new file mode 100644 index 0000000..dd83e6e --- /dev/null +++ b/Runtime/GUI/UIMesh.h @@ -0,0 +1,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; +}; |