In this recipe we are going to look at the benefits of using SpriteLists
to accelerate 2D rendering of similar objects.
Create a new project and add a reference to GameEngine2D. Add a sprite to your project. I am going to reuse our trusty FA-18H
sprite from prior recipes. You can download the complete source at Ch3_Example5
.
In
AppMain.cs
enter the following code:using System; using System.Collections.Generic; using Sce.PlayStation.Core; using Sce.PlayStation.Core.Graphics; using Sce.PlayStation.HighLevel.GameEngine2D; using Sce.PlayStation.HighLevel.GameEngine2D.Base; namespace Ch3_Example5 { public class AppMain { public static void Main (string[] args) { Director.Initialize(); Scene scene = new Scene(); scene.Camera.SetViewFromViewport(); Texture2D texture = new Texture2D("/Application/FA-18H.png",false); TextureInfo ti = new TextureInfo(texture); List<SpriteUV> sprites...