From de9bc8567b268e9659d174f65ce7dc23dff6fafe Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 5 Jul 2017 13:15:00 -0400 Subject: experimental stuff --- ShiftOS.Frontend/GraphicsSubsystem/GraphicsContext.cs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ShiftOS.Frontend/GraphicsSubsystem/GraphicsContext.cs') diff --git a/ShiftOS.Frontend/GraphicsSubsystem/GraphicsContext.cs b/ShiftOS.Frontend/GraphicsSubsystem/GraphicsContext.cs index 43292c0..1ab45db 100644 --- a/ShiftOS.Frontend/GraphicsSubsystem/GraphicsContext.cs +++ b/ShiftOS.Frontend/GraphicsSubsystem/GraphicsContext.cs @@ -165,6 +165,14 @@ namespace ShiftOS.Frontend.GraphicsSubsystem System.Runtime.InteropServices.Marshal.Copy(lck.Scan0, data, 0, data.Length); bmp.UnlockBits(lck); var tex2 = new Texture2D(_graphicsDevice, bmp.Width, bmp.Height); + for(int i = 0; i < data.Length; i += 4) + { + byte r = data[i]; + byte b = data[i + 2]; + data[i] = b; + data[i + 2] = r; + } + tex2.SetData(data); _spritebatch.Draw(tex2, new Rectangle(x, y, bmp.Width, bmp.Height), Color.White); } -- cgit v1.2.3