Game Development Reference
In-Depth Information
_renderer.DrawSprite(_testSprite2);
Gl.glFinish();
}
This state renders two different sprites: one is squashed; the other is offset from
the center of the screen and colored red. The code is very straightforward and
easy to use. All the heavy lifting has been done in the Sprite and Renderer
classes. These classes are only written once but used everywhere, so it's worth
making them as friendly and easy to use as possible.
It's very easy to animate these sprites by changing the U,Vs or changing the tex-
ture as time passes. The positions can also be easily changed with time. This
should be done in the update loop. Feel free to dive in right now and see what
you can make. If you're a little unsure where to start, then keep reading and the
concepts will become apparent as you're guided through the creation of a game.
 
Search WWH ::




Custom Search