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

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
主站蜘蛛池模板: 嘉祥县| 赣州市| 瑞安市| 大石桥市| 彰化市| 九龙坡区| 四子王旗| 濮阳县| 河津市| 高唐县| 双柏县| 康乐县| 潞城市| 鱼台县| 冷水江市| 黄大仙区| 宿州市| 临朐县| 株洲市| 佳木斯市| 九龙县| 萨迦县| 塘沽区| 塘沽区| 榕江县| 新乡县| 鄂托克前旗| 施秉县| 什邡市| 郑州市| 丰台区| 大姚县| 夹江县| 沁阳市| 随州市| 衢州市| 宜兰县| 海南省| 四平市| 天全县| 连云港市|