20.09.2020

+ Instance Drawing
+ Text and Font

~ Made "DrawBackground" forced Background for 2D

- DrawEmpty
This commit is contained in:
Michel Fedde 2020-09-20 18:29:09 +02:00
parent acccf5f0e7
commit c4a0847567
29 changed files with 365 additions and 85 deletions

View file

@ -1,4 +1,5 @@
using OpenTK;
using System.Collections.Generic;
using OpenTK;
using SM.Base.Scene;
using SM.OGL.Mesh;
@ -7,10 +8,11 @@ namespace SM.Base.Contexts
public struct DrawContext
{
public bool ForceViewport;
public bool Instancing;
public Matrix4 World;
public Matrix4 View;
public Matrix4 ModelMatrix;
public Instance[] Instances;
public Mesh Mesh;
public Material Material;

View file

@ -39,7 +39,7 @@ namespace SM.Base
{
World = _viewportCamera.World,
View = _viewportCamera.CalculateViewMatrix(),
ModelMatrix = Matrix4.Identity,
Instances = new[] { new Instance {ModelMatrix = Matrix4.Identity, TexturePosition = Vector2.Zero, TextureScale = Vector2.One } },
Mesh = Plate.Object,
ForceViewport = ForceViewportCamera,
WorldScale = WorldScale