Beispiel #1
0
 public RendererTests()
 {
     _sdl                = new SdlEngine();
     _surface            = _sdl.CreateSurface(10, 10);
     _renderer           = _surface.CreateSoftwareRenderer();
     _renderer.DrawColor = Color.Black;
     _renderer.Clear();
 }
Beispiel #2
0
        private ITexture MakeTexture()
        {
            var surf = _sdl.CreateSurface(2, 2);
            var rend = surf.CreateSoftwareRenderer();

            rend.DrawColor = Color.Red;
            rend.DrawPoint(0, 0);
            rend.DrawPoint(1, 1);
            rend.DrawColor = Color.Blue;
            rend.DrawPoint(0, 1);
            rend.DrawPoint(1, 0);
            return(_renderer.CreateTexture(surf));
        }