官术网_书友最值得收藏!

Chapter 1. Getting Started with SDL

Simple DirectMedia Layer (SDL) is a cross-platform multimedia library created by Sam Oscar Latinga. It provides low-level access to input (via mouse, keyboard, and gamepads/joysticks), 3D hardware, and the 2D video frame buffer. SDL is written in the C programming language, yet has native support for C++. The library also has bindings for several other languages such as Pascal, Objective-C, Python, Ruby, and Java; a full list of supported languages is available at http://www.libsdl.org/languages.php.

SDL has been used in many commercial games including World of Goo, Neverwinter Nights, and Second Life. It is also used in emulators such as ZSNES, Mupen64, and VisualBoyAdvance. Some popular games ported to Linux platforms such as Quake 4, Soldier of Fortune, and Civilization: Call to Power utilize SDL in some form.

SDL is not just used for games. It is useful for all manner of applications. If your software needs access to graphics and input, chances are that SDL will be a great help. The SDL official website has a list of applications that have been created using the library (http://www.libsdl.org/applications.php).

In this chapter we will cover the following:

  • Getting the latest SDL build from the Mercurial repository
  • Building and setting up SDL in Visual C++ 2010 Express
  • Creating a window with SDL
  • Implementing a basic game class
主站蜘蛛池模板: 蒙山县| 信丰县| 南充市| 康保县| 新闻| 阆中市| 丰台区| 延津县| 兰州市| 铜鼓县| 张家川| 蓬安县| 资中县| 武安市| 邹平县| 疏附县| 井陉县| 商丘市| 屏东市| 永春县| 盐津县| 鄂温| 桃园县| 康平县| 收藏| 乌审旗| 上蔡县| 布拖县| 观塘区| 永靖县| 祁连县| 赫章县| 望谟县| 梅河口市| 白城市| 库伦旗| 泸州市| 桃江县| 安图县| 楚雄市| 玉溪市|