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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

bluebird_ivan

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值