27.09.2020

~ Moved Default-Shader to 2D to provied 2D-specific feature
~ Fixed UVs in Polygon
This commit is contained in:
Michel Fedde 2020-09-27 11:58:14 +02:00
parent 617a7ef044
commit 2aa12f8d25
19 changed files with 166 additions and 83 deletions

View file

@ -1,11 +1,13 @@
using System.Drawing;
using OpenTK;
using OpenTK.Graphics;
using SM.Base;
using SM.Base.Contexts;
using SM.Base.Objects.Static;
using SM.Base.Scene;
using SM.Base.Textures;
using SM.OGL.Texture;
using SM2D.Shader;
using SM2D.Types;
namespace SM2D.Drawing
@ -48,6 +50,8 @@ namespace SM2D.Drawing
public void Draw(DrawContext context)
{
if (_material.Shader == null) _material.Shader = Defaults.DefaultShader;
context.Material = _material;
context.Mesh = Plate.Object;

View file

@ -8,7 +8,7 @@ namespace SM2D.Drawing
{
public class DrawColor : DrawingBasis<Transformation>, I2DShowItem
{
public Color4 Tint
public Color4 Color
{
get => _material.Tint;
set => _material.Tint = value;