Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public struct VertexElement
- {
- public string Name;
- public int Size;
- public VertexAttribPointerType Type;
- public bool Normalized;
- public IntPtr Offset;
- public void Apply(ShaderProgram shaderProgram, int stride = 0)
- {
- int index = GL.GetAttribLocation(shaderProgram.ID, Name);
- if (index != -1)
- {
- GL.VertexAttribPointer(index, Size, Type, Normalized, stride, Offset);
- GL.EnableVertexAttribArray(index);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement