+ AxisHelper
~ Transformation can now set to be ignored. (Sending a Identity, when requested) ~ Changed how Meshes store Attributes
This commit is contained in:
parent
0895c600cf
commit
2e7051d800
14 changed files with 146 additions and 30 deletions
|
|
@ -14,7 +14,7 @@ namespace SM.Base.Objects
|
|||
/// </summary>
|
||||
protected Mesh()
|
||||
{
|
||||
AttribDataIndex.Add(3, Color);
|
||||
Attributes.Add(3, "color", Color);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
35
SMCode/SM.Base/Objects/Static/AxisHelper.cs
Normal file
35
SMCode/SM.Base/Objects/Static/AxisHelper.cs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
using OpenTK.Graphics;
|
||||
using OpenTK.Graphics.OpenGL4;
|
||||
using SM.OGL.Mesh;
|
||||
|
||||
namespace SM.Base.Objects.Static
|
||||
{
|
||||
public class AxisHelper : Mesh
|
||||
{
|
||||
public static AxisHelper Object = new AxisHelper();
|
||||
|
||||
private AxisHelper() {}
|
||||
|
||||
public override VBO Vertex { get; } = new VBO()
|
||||
{
|
||||
{0, 0, 0},
|
||||
{.5f, 0, 0},
|
||||
{0, 0, 0},
|
||||
{0, .5f, 0},
|
||||
{0, 0, -.5f},
|
||||
{0, 0, .5f},
|
||||
};
|
||||
|
||||
public override VBO Color { get; } = new VBO(pointerSize:4)
|
||||
{
|
||||
{Color4.White},
|
||||
{Color4.Red},
|
||||
{Color4.White},
|
||||
{Color4.Green},
|
||||
{Color4.White},
|
||||
{Color4.DarkBlue},
|
||||
};
|
||||
|
||||
public override PrimitiveType PrimitiveType { get; } = PrimitiveType.Lines;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue