Added summeries to SM.OGL
This commit is contained in:
parent
2aa12f8d25
commit
16366fa015
15 changed files with 363 additions and 27 deletions
|
|
@ -5,23 +5,54 @@ using Buffer = OpenTK.Graphics.OpenGL4.Buffer;
|
|||
|
||||
namespace SM.OGL.Mesh
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains information for meshes
|
||||
/// </summary>
|
||||
public abstract class GenericMesh : GLObject
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override bool AutoCompile { get; } = true;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override ObjectLabelIdentifier TypeIdentifier { get; } = ObjectLabelIdentifier.VertexArray;
|
||||
|
||||
/// <summary>
|
||||
/// The primitive type, that determinants how the mesh is drawn.
|
||||
/// <para>Default: Triangles</para>
|
||||
/// </summary>
|
||||
public virtual PrimitiveType PrimitiveType { get; } = PrimitiveType.Triangles;
|
||||
|
||||
/// <summary>
|
||||
/// Contains the vertices for the mesh.
|
||||
/// </summary>
|
||||
public virtual VBO Vertex { get; }
|
||||
/// <summary>
|
||||
/// Contains the texture coords for the mesh.
|
||||
/// </summary>
|
||||
public virtual VBO UVs { get; }
|
||||
/// <summary>
|
||||
/// Contains the normals for the mesh.
|
||||
/// </summary>
|
||||
public virtual VBO Normals { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Represents the bounding box.
|
||||
/// </summary>
|
||||
public virtual BoundingBox BoundingBox { get; } = new BoundingBox();
|
||||
|
||||
public virtual Dictionary<int, VBO> AttribDataIndex { get; }
|
||||
/// <summary>
|
||||
/// Connects the different buffer objects with ids.
|
||||
/// </summary>
|
||||
protected Dictionary<int, VBO> AttribDataIndex { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Stores indices for a more performance friendly method to draw objects.
|
||||
/// </summary>
|
||||
public virtual int[] Indices { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Generates the AttribDataIndex
|
||||
/// </summary>
|
||||
protected GenericMesh()
|
||||
{
|
||||
AttribDataIndex = new Dictionary<int, VBO>()
|
||||
|
|
@ -32,6 +63,7 @@ namespace SM.OGL.Mesh
|
|||
};
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Compile()
|
||||
{
|
||||
_id = GL.GenVertexArray();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue