|
RenderStack 11.06.1
|
Attribute for use in VertexFormat. Attributes should always be made to be part of one VertexFormat. More...
Public Member Functions | |
| Attribute () | |
| Attribute (VertexUsage usage, VertexAttribPointerType type, int index, int dimension) | |
| Attribute (VertexUsage usage, VertexAttribPointerType type, int index, int dimension, bool normalized) | |
| int | Stride () |
Static Public Member Functions | |
| static int | SizeOfType (VertexAttribPointerType type) |
Properties | |
| VertexUsage | Usage [get, set] |
| VertexAttribPointerType | Type [get, set] |
| int | Index [get, set] |
| int | Dimension [get, set] |
| int | Offset [get, set] |
| bool | Normalized [get, set] |
| string | UsageString [get] |
Definition at line 32 of file Attribute.cs.
| RenderStack.Graphics.Attribute.Attribute | ( | ) |
Definition at line 86 of file Attribute.cs.
{
}
| RenderStack.Graphics.Attribute.Attribute | ( | VertexUsage | usage, |
| VertexAttribPointerType | type, | ||
| int | index, | ||
| int | dimension | ||
| ) |
Definition at line 90 of file Attribute.cs.
| RenderStack.Graphics.Attribute.Attribute | ( | VertexUsage | usage, |
| VertexAttribPointerType | type, | ||
| int | index, | ||
| int | dimension, | ||
| bool | normalized | ||
| ) |
Definition at line 105 of file Attribute.cs.
| static int RenderStack.Graphics.Attribute.SizeOfType | ( | VertexAttribPointerType | type | ) | [static] |
Definition at line 34 of file Attribute.cs.
{
switch(type)
{
case VertexAttribPointerType.Byte: return 1;
case VertexAttribPointerType.Double: return 8;
case VertexAttribPointerType.Float: return 4;
case VertexAttribPointerType.HalfFloat: return 2;
case VertexAttribPointerType.Int: return 4;
case VertexAttribPointerType.Short: return 2;
case VertexAttribPointerType.UnsignedByte: return 1;
case VertexAttribPointerType.UnsignedInt: return 4;
case VertexAttribPointerType.UnsignedShort: return 2;
default: throw new System.Exception("Invalid typeCode");
}
}
| int RenderStack.Graphics.Attribute.Stride | ( | ) |
Definition at line 121 of file Attribute.cs.
Referenced by RenderStack.Graphics.VertexFormat.Add(), and RenderStack.Graphics.Buffer.SetAllFloat().
{
return Dimension * SizeOfType(Type);
}
VertexUsage RenderStack.Graphics.Attribute.Usage [get, set] |
Definition at line 58 of file Attribute.cs.
Referenced by RenderStack.Graphics.VertexFormat.FindAttribute(), and RenderStack.Graphics.VertexFormat.HasAttribute().
VertexAttribPointerType RenderStack.Graphics.Attribute.Type [get, set] |
Definition at line 59 of file Attribute.cs.
int RenderStack.Graphics.Attribute.Index [get, set] |
Definition at line 60 of file Attribute.cs.
Referenced by RenderStack.Graphics.VertexFormat.FindAttribute(), and RenderStack.Graphics.VertexFormat.HasAttribute().
int RenderStack.Graphics.Attribute.Dimension [get, set] |
Definition at line 61 of file Attribute.cs.
Referenced by RenderStack.Graphics.Buffer.SetAllFloat(), and RenderStack.Graphics.VertexFormat.ToString().
int RenderStack.Graphics.Attribute.Offset [get, set] |
Definition at line 62 of file Attribute.cs.
Referenced by RenderStack.Graphics.VertexFormat.Add(), RenderStack.Graphics.Buffer.Set(), and RenderStack.Graphics.Buffer.SetAllFloat().
bool RenderStack.Graphics.Attribute.Normalized [get, set] |
Definition at line 63 of file Attribute.cs.
string RenderStack.Graphics.Attribute.UsageString [get] |
Definition at line 66 of file Attribute.cs.
Referenced by RenderStack.Graphics.VertexFormat.ToString().
1.7.4