summaryrefslogtreecommitdiff
path: root/Runtime/Graphics/VertexAttribute.h
diff options
context:
space:
mode:
Diffstat (limited to 'Runtime/Graphics/VertexAttribute.h')
-rw-r--r--Runtime/Graphics/VertexAttribute.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/Runtime/Graphics/VertexAttribute.h b/Runtime/Graphics/VertexAttribute.h
index 4e50a1a..2757c70 100644
--- a/Runtime/Graphics/VertexAttribute.h
+++ b/Runtime/Graphics/VertexAttribute.h
@@ -21,6 +21,15 @@ enum VertexAttrFormat
struct VertexAttributeDescriptor
{
+ //union {
+ const void* pointer; // 内存地址,刚创建时留空
+ int startOffset; // 显存中相对VBO的偏移值
+ //};
+ uint componentNum; // 向量维度1,2,3,4
+ uint componentFormat; // 每个分量的类型
+ uint16 stride; // 间隔
+ bool normalize; // 是否归一化,只用于CustomVertexLayout
+
// for default vertex layout
VertexAttributeDescriptor() {}
// for custom vertex layout
@@ -33,14 +42,6 @@ struct VertexAttributeDescriptor
normalize = normalized;
}
- union {
- const void* pointer; // 内存地址或显存中相对VBO的偏移值
- int startOffset;
- };
- uint componentNum; // 向量维度1,2,3,4
- uint componentFormat; // 每个分量的类型
- uint16 stride; // 间隔
- bool normalize; // 是否归一化,只用于CustomVertexLayout
};
namespace VertexAttribute