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支持的各种栅格文件的信息. ...
随机推荐
- <<编写可维护的JavaScript>>之避免使用全局变量
一.避免全局变量的理由 js中避免创建全局变量一是避免命名冲突,二是避免因为创建全局变量让代码变得脆弱,三是创建全局变量会让代码难以测试. 二.避免创建全局变量的几种方法 //避免全局变量 避免命名冲 ...
- web api 500 错误
改了API 方法内容后,就直接F5运行起来. 客户端用WebClient请求,老是返回500错误. 无意中重新编译了WEIAPI项目,客户端就正常了.
- 编译在arm板上使用的sqlite3的静动态库
采用的是sqlite-autoconf-3080002.tar.gz 解压 tar xvf sqlite-autoconf-3080002.tar.gz 进入 cd sqlite-autoconf-3 ...
- [系统集成] CI持续集成项目简介
一.问题的产生 公司的多个部门围绕着产品开发.测试.发布.维护,设置有不同的岗位和系统,这些岗位和系统缺少有效的整合,没有实现自动化,效率不是很高,因此就有了CI(持续集成)的项目需求. 二.解决方案 ...
- Titan-红号楼宗谱案例
一. 简介 titan:存储,查询图形结构的数据库.分布式集群环境下,可支持数以千亿级别的点和边,同时支持上千个并发的实时的复杂图形遍历,支持ACID事务. 架构:支持以下3方面的自由组合 (1)节点 ...
- xhprof 安装使用
1.安装扩展 windows下把 xhprof.dll 放到extensions目录下 修改配置文件 [xhprof] extension=xhprof.so; ; directory used by ...
- poj 1251 统计难题(字典树)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1251 AC代码: #include<iostream> #include<algor ...
- linux下shell脚本学习
在Linux系统中,虽然有各种各样的图形化接口工具,但是sell仍然是一个非常灵活的工具.Shell不仅仅是命令的收集,而且是一门非常棒的编程语言.您可以通过使用shell使大量的任务自动化,shel ...
- SPR EAD NET 6
SPR EAD_NET6 下载地址 http://www.gcpowertools.com.cn/downloads/trial/Spread.NET/EN_SPREAD_NET6_SETUP_RA_ ...
- What is the difference between <%, <%=, <%# and -%> in ERB in Rails?
http://stackoverflow.com/questions/998979/difference-between-and-in-rails/25617607#25617607 http://s ...