SDL Game Development
上QQ阅读APP看书,第一时间看更新

Chapter 2. Drawing in SDL

Graphics are very important to games and they can also be one of the main performance bottlenecks if not handled correctly. With SDL 2.0 we can really take advantage of the GPU when rendering, which gives us a real boost in terms of the speed of rendering.

In this chapter we will cover:

  • The basics of drawing with SDL
  • Source and destination rectangles
  • Loading and displaying textures
  • Using the SDL_image extension