You can use the `VertexAttribStrings` class to get the vertex attributes for a vertex shader:
```cs
public unsafe class ExampleVertexBuffer : TypedVertexBuffer<ExampleVertex>
{
...
public override void SetupAttributes()
{
SetAttrib(3, VertexAttribPointerType.Float, "aPosition");
SetAttrib(4, VertexAttribPointerType.UnsignedByte, "aColour", true);
}
}
public class ExampleShader : SmartShader
{
protected override string VertexOuter => VertexAttribStrings.Get<ExampleVertexBuffer>();
protected override string VertexInner => @"
gl_Position = mvp * vec4(aPosition, 1.0);
";
}
```
This class converts the attributes from `SetupAttributes()`, into this vertex shader code:
```cs
layout (location = 0) in vec3 aPosition;
loayout (location = 1) in vec4 aColour;
```
It automatically calculates the locations, stride and offsets of each field in the vertex data for you.