SDL(Simple DirectMedia Layer) 简介

SDL简介

Simple DirectMedia Layer是一个跨平台开发库,旨在通过OpenGL和Direct3D提供对音频、键盘、鼠标、操纵杆和图形硬件的低级访问。它被视频播放软件、模拟器和流行游戏使用,包括Valve的获奖目录和许多Humble Bundle游戏。

Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D. It is used by video playback software, emulators, and popular games including Valve’s award winning catalog and many Humble Bundle games.

SDL正式支持Windows、Mac OS X、Linux、iOS和Android。对其他平台的支持可以在源代码中找到。

SDL officially supports Windows, Mac OS X, Linux, iOS, and Android. Support for other platforms may be found in the source code.

SDL是用C编写的, 可与C++一起工作,还有一些其他语言的绑定,包括C#和Python。

SDL is written in C, works natively with C++, and there are bindings available for several other languages, including C# and Python.

SDL 2.0是根据zlib许可证分发的。此许可证允许您在任何软件中自由使用SDL。

SDL 2.0 is distributed under the zlib license. This license allows you to use SDL freely in any software.

在这里插入图片描述

相关链接

编译测试

下载源码

git clone https://github.com/libsdl-org/SDL.git

编译运行

cd SDL
mkdir release
./configure --prefix=/.../SDL/release
make -j8
make install

安装后的目录结构如下:

mycomputer:/.../SDL/release$ tree -L 2
.
├── bin
│   └── sdl2-config
├── include
│   └── SDL2
├── lib
│   ├── cmake
│   ├── libSDL2-2.0.so.0 -> libSDL2-2.0.so.0.2500.0
│   ├── libSDL2-2.0.so.0.2500.0
│   ├── libSDL2.a
│   ├── libSDL2.la
│   ├── libSDL2main.a
│   ├── libSDL2main.la
│   ├── libSDL2.so -> libSDL2-2.0.so.0.2500.0
│   ├── libSDL2_test.a
│   ├── libSDL2_test.la
│   └── pkgconfig
└── share
    └── aclocal

猜你喜欢

转载自blog.csdn.net/bluebird888/article/details/127583201
SDL