05.01.2021
+ Bloom effect + PixelInformation + Many Summaries + Add-methods for CVectors + Exposure-Field in GenericCamera for HDR. ~ ColorAttachments now can have PixelInformation ~ Transformed MeshAttributes to a own class ~ Fixed the non-applying of transformations at texts ~ Added more information to the context ~ Improved Pipeline-Process. ~ Changed how Uniform takes arrays - Light system
This commit is contained in:
parent
9b917ac181
commit
4c18127c88
52 changed files with 697 additions and 373 deletions
30
SMCode/SM.Base/Objects/InstancedMesh.cs
Normal file
30
SMCode/SM.Base/Objects/InstancedMesh.cs
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
using System;
|
||||
using OpenTK.Graphics.OpenGL4;
|
||||
using SM.OGL.Mesh;
|
||||
|
||||
namespace SM.Base.Objects
|
||||
{
|
||||
public class InstancedMesh : Mesh
|
||||
{
|
||||
public InstancedMesh(PrimitiveType type, string[] enabledAttibute) : base(type)
|
||||
{
|
||||
Attributes["vertex"] = Vertex = new VBO();
|
||||
|
||||
foreach (string attribute in enabledAttibute)
|
||||
{
|
||||
switch (attribute)
|
||||
{
|
||||
case "uv":
|
||||
Attributes["uv"] = UVs = new VBO(pointerSize: 2);
|
||||
break;
|
||||
case "normals":
|
||||
Attributes["normal"] = Normals = new VBO();
|
||||
break;
|
||||
case "color":
|
||||
Attributes["color"] = Color = new VBO(pointerSize: 4);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -13,7 +13,7 @@ namespace SM.Base.Objects
|
|||
/// <summary>
|
||||
/// While initializing, it will add the <see cref="Color" /> to the data index.
|
||||
/// </summary>
|
||||
public Mesh(PrimitiveType type)
|
||||
public Mesh(PrimitiveType type) : base()
|
||||
{
|
||||
PrimitiveType = type;
|
||||
Attributes.Add(3, "color", Color);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue