Extract vertex attributes
This commit is contained in:
committed by
Matthias Mailänder
parent
0a90c2a95e
commit
26b6118f50
@@ -46,4 +46,34 @@ namespace OpenRA.Graphics
|
||||
R = r; G = g; B = b; A = a;
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class CombinedShaderBindings : ShaderBindings
|
||||
{
|
||||
public CombinedShaderBindings()
|
||||
: base("combined")
|
||||
{ }
|
||||
|
||||
public override ShaderVertexAttribute[] Attributes { get; } = new[]
|
||||
{
|
||||
new ShaderVertexAttribute("aVertexPosition", 3, 0),
|
||||
new ShaderVertexAttribute("aVertexTexCoord", 4, 12),
|
||||
new ShaderVertexAttribute("aVertexTexMetadata", 2, 28),
|
||||
new ShaderVertexAttribute("aVertexTint", 4, 36)
|
||||
};
|
||||
}
|
||||
|
||||
public sealed class ModelShaderBindings : ShaderBindings
|
||||
{
|
||||
public ModelShaderBindings()
|
||||
: base("model")
|
||||
{ }
|
||||
|
||||
public override ShaderVertexAttribute[] Attributes { get; } = new[]
|
||||
{
|
||||
new ShaderVertexAttribute("aVertexPosition", 3, 0),
|
||||
new ShaderVertexAttribute("aVertexTexCoord", 4, 12),
|
||||
new ShaderVertexAttribute("aVertexTexMetadata", 2, 28),
|
||||
new ShaderVertexAttribute("aVertexTint", 4, 36)
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user