Beginning SDL 2.0(1) SDL功能简介
原文链接为 http://wiki.libsdl.org/Introduction。
由于近期整理音视频可视化的技术,发现好久不更新的SDL发布了2.0版本,以前也没有过于关注,这里准备尝试下。了解SDL到底支持哪些功能。
本文部分内容为翻译内容。有任何不当支持请联系我。
SDL全名Simple DirectMedia Layer (SDL)。官网:http://www.libsdl.org/
What can SDL do? SDL功能简介
Read ahead for an overview of what SDL is capable of. If you're simply interested in the changes from 1.2 to 2.0, check out theMigration Guide.
Video 视频
- 3D graphics(3D图像处理):
- SDL can be used in combination with the OpenGL API or Direct3D API for 3D graphics
- 在处理三维图形的时候,SDL可以与OpenGL APi或Direct 3D配合使用。
- Accelerated 2D render API(优化的2D渲染API):
- Supports easy rotation, scaling and alpha blending, all accelerated using modern 3D APIs
- 支持简单旋转、缩放和alpha叠加,所有加速都是基于现代的3D API。
- Acceleration is supported using OpenGL and Direct3D, and there is a software fallback
- 硬件加速是基于OpenGL和Direct3D的
- Create and manage multiple windows(支持多窗口管理及创建)
Input Events 输入事件
- Events and API functions provided for(为下列输入提供了事件及API函数接口):
- Application and window state changes 应用程序和窗口状态改变
- Mouse input 鼠标输入
- Keyboard input 键盘输入
- Joystick and game controller input 手柄和游戏控制器输入
- Multitouch gestures 多点触控手势
Each event can be enabled or disabled with SDL_EventState()
每个事件都可以使用SDL_EventState()使能或禁用
- Events are passed through a user-specified filter function before being posted to the internal event queue
- 在放入事件队列之前,所有事件会首先经过用户自定义的处理函数
- Thread-safe event queue 线程安全的事件队列
Force Feedback 强制反馈
- Force feedback is supported under Windows, Mac OS X and Linux
Audio 音频
- Set audio playback of 8-bit and 16-bit audio, mono stereo or 5.1 surround sound, with optional conversion if the format is not supported by the hardware
- 支持8位、16位,单声道、立体声或5.1环绕声的播放,同时在硬件不支持特定格式时提供可选的转换。
- Audio runs independently in a separate thread, filled via a user callback mechanism
- 音频处理运行在独立的线程中,通过自定义回调函数实现数据填充。
Designed for custom software audio mixers, but SDL_mixer provides a complete audio/music output library
- 为自定义的软件音频混音器设计,但SDL_mixer提供完整的音频/音乐输出接口。
File I/O Abstraction 文件I/O抽象机制
- General purpose abstraction for opening, reading and writing data
- 提供打开、读取、写入数据的通用文件抽象框架
- Built-in support for files and memory 内置支持文件和内存
Shared Object Support 共享对象支持
- Load shared objects (DLL on Windows, .dylib on Mac OS X, .so on Linux)
- 支持加载共享对象(windows下的DLL,Mac OS X下的.dylib,Linux下的.so)
- Lookup functions in shared objects 支持在共享对象中查找函数
Threads 线程机制
- Simple thread creation API 支持简单的线程创建函数
- Simple thread local storage API 支持简单的线程局部存储机制
- Mutexes, semaphores and condition variables 提供互斥量、信号量和条件变量
- Atomic operations for lockless programming 提供原子操作函数
Timers 定时器
- Get the number of milliseconds elapsed 支持获取消耗的时间(单位毫秒)
- Wait a specified number of milliseconds 等待指定长度的时间(精度毫秒)
- Create timers that run alongside your code in a separate thread
- 支持创建在独立线程运行的定时器
- Use high resolution counter for profiling 支持高精度计数器
CPU Feature Detection CPU功能检测
- Query the number of CPUs 可获取CPU个数
- Detect CPU features and supported instruction sets 可获取CPU支持的功能及指令集
Endian Independence 大端小端支持
- Detect the endianness of the current system 可获取系统的是大端还是小端
- Routines for fast swapping of data values 提供快速数据交换的例程
- Read and write data of a specified endianness 提供针对特定端的读写数据机制
Power Management 电源管理
- Querying power management status 支持获取电源管理状态
What platforms does SDL run on? SDL支持的平台
Windows
- Uses Win32 APIs for display, taking advantage of Direct3D for hardware acceleration
- 使用Win32 API显示,可充分利用Direct3D提供的硬件加速
Uses DirectSound and XAudio2 for sound 使用DirectSound和XAudio2处理音频
Mac OS X
- Uses Cocoa for video display, taking advantage of OpenGL for hardware acceleration
- 使用Cocoa进行视频显示,可充分利用OpenGL提供的硬件加速
- Uses Core Audio for sound 使用Core Audio处理音频
Linux
- Uses X11 for video display, taking advantage of OpenGL for hardware acceleration
- 使用X11进行视频显示,可充分利用OpenGL提供的硬件加速
Uses the ALSA, OSS and PulseAudio APIs for sound
- 使用ALSA、OSS、PulseAudio API处理音频
iOS
- Uses UIKit for video display, taking advantage of OpenGL ES 2.0 for hardware acceleration
- 使用UIKit进行视频显示,可充分利用OpenGL ES 2.0提供的硬件加速
- Uses Core Audio for sound 使用Core Audio处理音频
Android
- Uses JNI interfaces for video display, taking advantage of OpenGL ES 1.1 and 2.0 for hardware acceleration
- 使用JNI接口进行硬件加速,可充分利用OpenGL ES 1.1、2.0提供的硬件加速
- Uses JNI audio callbacks for sound 使用JNI音频回调函数处理音频
----------------------------------------------------------------------------------------------------------------------------
本文作者:Tocy e-mail: zyvj@qq.com
版权所有@2015,请勿用于商业用途,转载请注明原文地址。本人保留所有权利
Beginning SDL 2.0(1) SDL功能简介的更多相关文章
- Beginning SDL 2.0(3) SDL介绍及BMP渲染
SDL是一个跨平台的多媒体库.为了实现跨平台,SDL提供了一个简单的界面库抽象,比如提供了SDL_Window用于表示窗口句柄,SDL_Surface.SDL_Texture.SDL_Renderer ...
- vue2.0的常用功能简介
路由跳转 当我们想要实现点击链接跳转时,可以使用$router来进行跳转 语法如下: '}}) 这里path是要跳转的路径,query里面是路径跳转时要携带的参数,以对象的形式存在 2 获取路由参数 ...
- Beginning SDL 2.0(4) YUV加载及渲染
本文主要内容是基于的“Beginning SDL 2.0(3) SDL介绍及BMP渲染”(以下简称BS3)基础上,将BMP加载及渲染修改为YUV420或I420的原始视频格式.阅读完本部分内容相信你可 ...
- Beginning SDL 2.0(5) 基于MFC和SDL的YuvPlayer
本文是在“Beginning SDL 2.0(4) YUV加载及渲染”(以下简称BS4)基础上做的功能完善,如果你对之间介绍的内容了解不多,麻烦先阅读之前的内容. 本文主要介绍如何完成一个基于MFC和 ...
- Beginning SDL 2.0(2) TwinklebearDev SDL 2.0 Tutorial
本文整理并简要介绍了TwinklebearDev SDL 2.0 Tutorial相关内容(以下简称TDSDLTutorial). 这是作为我学习并了解SDL2.0功能一篇学习总结. TDSDLTut ...
- 管家婆软件工贸版(标准财务+进销存+生产管理)V18.0功能简介
管家婆软件工贸版(标准财务+进销存+生产管理)V18.0功能简介 管家婆 工贸版(标准财务+进销存+生产管理) 1.整体介绍 管家婆工贸版系列软件是针对国内中小型生产加工企业,将ERP管理思想与几十万 ...
- 第四章 跨平台图像显示库——SDL 第一节 与SDL第一次亲密接触
http://blog.csdn.net/visioncat/article/details/1596576 GCC for Win32 开发环境介绍(5) 第四章 跨平台图像显示库——SDL 第一节 ...
- HelloX操作系统网络功能简介及使用和开发指南
HelloX网络功能简介及使用和开发指南 HelloX网络功能简介 作为物联网操作系统,网络功能是必备的核心功能之一.按照规划,HelloX实现了两个不同类型的TCP/IP协议栈,一个面向资源受限的嵌 ...
- 部分GDAL工具功能简介
主要转自http://blog.csdn.net/liminlu0314?viewmode=contents 部分GDAL工具功能简介 gdalinfo.exe 显示GDAL支持的各种栅格文件的信息. ...
随机推荐
- VS2013 启动时遇到空白窗口
安装了VS2013 ,然后打开,遇到空白窗口,等了10几秒无果. 我先是修复了VS2013,然后再打开VS2013,则显示登录微软账号的窗口.修复完2013时正好18:08,可能是下班了可以上网,才正 ...
- Tomcat在eclipse中起动成功,主页却打不开
症状: tomcat在eclipse里面能正常启动,而在浏览器中访问http://localhost:8080/不能访问,且报404错误.同时其他项目页面也不能访问. 关闭eclipse里面的tomc ...
- [linux basic]基础--信号
线程->信号信号,是unix和linux系统响应某些条件而产生的一个事件.接收到该信号的进程会相应地采取一些行动.raise生成表示一个信号的产生catch捕获表示接受到一个信号的产生:信号是由 ...
- (C#) Lock - 将对象上锁,互斥多个线程,使同步。
C# Lock 原文:http://www.dotnetperls.com/lock Locking is essential in threaded programs. It restricts c ...
- UVA 272 TEX Quotes
TEX Quotes 题意: 变引号. 题解: 要想进步,真的要看一本好书,紫书P45 代码: #include<stdio.h> int main() { int c,q=1; whil ...
- c#复习整理
一.基本语法 1.数据类型 整数类型:int.long 浮点类型:float.double.decimal 布尔类型:bool 字符串类型:string 2.类型转换 int a; double b ...
- python随文档
UNIX网络编程--socket的keep http://www.68idc.cn/help/opersys/unixbsd/20150731471448.html 云计算学习和实践: 原创<每 ...
- 【转】Action 、 RenderAction 、 Partial 、 RenderPartial 区别
1.Action . RenderAction Action 方法以字符串的形式返回子视图,可以直接被呈现.RenderAction方法在适当的地方呈现子视图. //One alternative ( ...
- html5 基本内容 摘自W3C
HTML5 教程(摘录自 W3C School) HTML 5 简介(HTML5 是下一代的 HTML) 什么是 HTML5? HTML5 将成为 HTML.XHTML 以及 HTML DOM 的新标 ...
- ubuntu 关机,重启,注销命令
1关机命令 shutdown 好像ubuntu的终端中默认的是当前用户的命令,只是普通用户,因此在终端器中可以使用sudo -sh 转换到管理员root用户下执行命令. 1)shutdown –hel ...