Creating a texture manager
When we load an image in Sparrow, we typically want it to be a texture. A texture is pixel information that makes up an image. It's conceptually similar to how the BitmapData
class works in ActionScript 3. If we want it to be displayed on the screen, it needs to be put on a geometrical representation, which is typically a quad.
The way we want our texture manager to work is to pass in a filename, which will be converted to a texture and is then available to us.
Let's use AssetsDictionary
for our texture manager.