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:
parent
a7c71e7ea1
commit
c6bf5c75bc
16 changed files with 114 additions and 26 deletions
|
|
@ -38,7 +38,7 @@ namespace SM2D.Scene
|
|||
|
||||
protected override Matrix4 ViewCalculation(IGenericWindow window)
|
||||
{
|
||||
return Matrix4.LookAt(Position.X, Position.Y, 1, Position.X, Position.Y, 0, 0, 1, 0);
|
||||
return Matrix4.LookAt(Position.X, Position.Y, 2f, Position.X, Position.Y, 0f, 0, 1, 0);
|
||||
}
|
||||
|
||||
protected override bool WorldCalculation(IGenericWindow window, out Matrix4 world)
|
||||
|
|
@ -50,7 +50,7 @@ namespace SM2D.Scene
|
|||
_resizeCounter = ResizeCounter;
|
||||
CalculateWorldScale(window);
|
||||
|
||||
world = Matrix4.CreateOrthographic(WorldScale.X, WorldScale.Y, .0001f, 1.5f);
|
||||
world = Matrix4.CreateOrthographic(WorldScale.X, WorldScale.Y, .001f, 3.2f);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#region usings
|
||||
|
||||
using System.Drawing.Drawing2D;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using SM.Base;
|
||||
|
|
@ -39,6 +40,13 @@ namespace SM2D.Scene
|
|||
set => _Background = value;
|
||||
}
|
||||
|
||||
public override void DrawHUD(DrawContext context)
|
||||
{
|
||||
context.ModelMatrix *= Matrix4.CreateTranslation(0,0,1);
|
||||
|
||||
base.DrawHUD(context);
|
||||
}
|
||||
|
||||
public override void DrawDebug(DrawContext context)
|
||||
{
|
||||
if (ShowAxisHelper)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue