Esempio n. 1
0
        protected override void DrawTopDown(MapGraphics graphics)
        {
            var image = GetInternalImage();

            renderer.ignoreView = true;
            renderer.texture    = image != null?GraphicsUtil.TextureFromImage(image.Value) : 0;

            renderer.SetDrawCalls(graphics);
            graphics.drawLayers[(int)MapGraphics.DrawLayers.FillBuffers].Add(() => renderer.AddInstance(Matrix4.CreateScale(2), 0, 1));
        }
Esempio n. 2
0
 protected override void DrawTopDown(MapGraphics graphics)
 {
     renderer.texture = GraphicsUtil.TextureFromImage(GetInternalImage().Value);
     renderer.SetDrawCalls(graphics);
     graphics.drawLayers[(int)MapGraphics.DrawLayers.FillBuffers].Add(() =>
     {
         var dimooof = GetDimensions(graphics);
         foreach (var dim in dimooof)
         {
             renderer.AddInstance(
                 graphics.BillboardMatrix
                 * Matrix4.CreateScale(dim.size.Width, 1, dim.size.Height)
                 * Matrix4.CreateTranslation(dim.loc.X, 0, dim.loc.Y),
                 graphics.GetObjectTextureLayer(GetInternalImage().Value),
                 1
                 );
         }
     });
 }