diff options
Diffstat (limited to 'Client/Source/GUI/UIMesh.cpp')
-rw-r--r-- | Client/Source/GUI/UIMesh.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Client/Source/GUI/UIMesh.cpp b/Client/Source/GUI/UIMesh.cpp new file mode 100644 index 0000000..9616c46 --- /dev/null +++ b/Client/Source/GUI/UIMesh.cpp @@ -0,0 +1,15 @@ +#include "UIMesh.h" + +CustomVertexLayout UIMesh::s_UIVertexLayout; +unsigned int UIMesh::s_SizePerVertex; + +InitializeStaticVariables([]() { + VertexAttributeDescriptor POSITION = VertexAttributeDescriptor(0, 2, VertexAttrFormat_Float, sizeof(UIVertexLayout)); + VertexAttributeDescriptor UV = VertexAttributeDescriptor(sizeof(Vector2f), 2, VertexAttrFormat_Float, sizeof(UIVertexLayout)); + VertexAttributeDescriptor COLOR = VertexAttributeDescriptor(sizeof(Vector2f) * 2, 4, VertexAttrFormat_Unsigned_Byte, sizeof(UIVertexLayout), true); + UIMesh::s_UIVertexLayout.attributes.push_back(POSITION); + UIMesh::s_UIVertexLayout.attributes.push_back(UV); + UIMesh::s_UIVertexLayout.attributes.push_back(COLOR); + + UIMesh::s_SizePerVertex = sizeof(UIVertexLayout); +}); |