blob: 8f9dda803533126e8172d3c9686fa821217dc31f (
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
33
34
35
|
#pragma once
#include <vector>
#include "../Utilities/UtilMacros.h"
#include "../Shaders/ShaderChannel.h"
#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);
}
|