2021-04-03

+ Added Field to DrawingBasis to enfore PrimitiveTypes
+ LastObject to context for Debugging
+ AppendRenderbuffer to Framebuffer

~ Added a depthbuffer to RenderPipeline.CreateWindowFramebuffer
~ Proper ZIndices over Z-Translation and DepthBuffer
~ Made "ShaderArguments["LineWidth"]" set the LineWidth even if the object isn't maked as LineMesh
~ Made that the SM2D.PolygonVertex can translate OpenTK.Vector2 by itself.
~ Made the SM2D.Transformation.ZIndex a CVector1 instead a float
This commit is contained in:
Michel Fedde 2021-03-04 22:17:03 +01:00
parent a7c71e7ea1
commit c6bf5c75bc
16 changed files with 114 additions and 26 deletions

View file

@ -1,10 +1,12 @@
#region usings
using System.Collections.Generic;
using OpenTK.Graphics.ES11;
using SM.Base;
using SM.Base.Scene;
using SM.Base.Windows;
using SM.OGL.Mesh;
using PrimitiveType = OpenTK.Graphics.OpenGL4.PrimitiveType;
#endregion
@ -38,6 +40,8 @@ namespace SM.Base.Drawing
/// <inheritdoc />
public ICollection<string> Flags { get; set; }
public PrimitiveType? ForcedMeshType { get; set; }
/// <summary>
/// This value determents if the object should draw something.
/// </summary>
@ -68,7 +72,9 @@ namespace SM.Base.Drawing
/// <param name="context"></param>
protected virtual void DrawContext(ref DrawContext context)
{
context.ForcedType = ForcedMeshType;
context.TextureMatrix *= TextureTransform.GetMatrix();
context.LastObject = this;
}
}