summaryrefslogtreecommitdiff
path: root/Client/Source/Graphics/CustomVertexLayout.h
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-12-13 00:07:19 +0800
committerchai <chaifix@163.com>2021-12-13 00:07:19 +0800
commit60cbbdec07ab7a5636eac5b3c024ae44e937f4d4 (patch)
treeb2c7b0a868f18159dbc43d8954e1bd7668549a88 /Client/Source/Graphics/CustomVertexLayout.h
+init
Diffstat (limited to 'Client/Source/Graphics/CustomVertexLayout.h')
-rw-r--r--Client/Source/Graphics/CustomVertexLayout.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/Client/Source/Graphics/CustomVertexLayout.h b/Client/Source/Graphics/CustomVertexLayout.h
new file mode 100644
index 0000000..3b54039
--- /dev/null
+++ b/Client/Source/Graphics/CustomVertexLayout.h
@@ -0,0 +1,33 @@
+#pragma once
+
+#include <vector>
+#include "OpenGL.h"
+#include "GPUDataBuffer.h"
+#include "VertexAttribute.h"
+
+struct CustomVertexLayout
+{
+ GLuint buffer; // ����ʱ����
+ std::vector<VertexAttributeDescriptor> attributes;
+
+ CustomVertexLayout()
+ {
+ int n = buffer;
+ }
+
+ // ����pointer��startOffset��Ϊ0
+ void RestorePointer()
+ {
+ for (int i = 0; i < attributes.size(); ++i)
+ {
+ attributes[i].pointer = 0;
+ }
+ }
+};
+
+namespace VertexLayout
+{
+
+ extern void SetupCustomVertexLayout(CustomVertexLayout& layout);
+
+}