DirectX Programmer's Reference Components
2011-01-13 12:00
295 查看
标题取自MSDN for VC6(另外MSDN中Platform SDK/Graphics and Multimedia Services/GDI/OpenGL中有OpenGL相关资料)
DirectX包含下面几个组件:
DirectDraw、DirectSound、DirectPlay、Direct3D、DirectInput、DirectSetup和AutoPlay(MSDN for VC6)
在MSDN for VS 2005中,可以看到DirectMusic、DirectPlay Voice、DirectShow等组件,不知道有没有重复,没有深入地了解。
DirectDraw是一套类似GDI(兼容GDI)的software interface,能充分利用硬件加速——在计算机中通过把计算量非常大的工作分配给专门的硬件来处理来减轻中央处理器的工作量的技术。
Bitmaps与GDI中Bitmaps(VC中DDB与DIB位图编程)类似。
GDI也是与设备无关,但是GDI没有充分利用如显卡等硬件的硬件加速。
A surface, or DirectDrawSurface object, represents a linear area of display memory. A surface usually resides in the display memory of the display card, although surfaces can exist in system memory.Unless specifically instructed otherwise during the creation of the DirectDrawSurface object, DirectDraw object will put the DirectDrawSurface object wherever the best performance can be achieved given the requested capabilities. DirectDrawSurface objects can take advantage of specialized processors on display cards, not only to perform certain tasks faster, but to perform some tasks in parallel with the system CPU.
DirectDrawSurface Object可以充分利用显卡(类似GPU编程?),不仅仅是更快地完成指定的计算任务(perform certain tasks faster),还能与CPU一起完成并行计算。
可以使用IDirectDraw2::CreateSurface来创建DirectDrawSurface Object,包括IDirectDrawSurface3.
From this illustration, you can see that all surface are created by a DirectDraw object and are often used closely with palettes. Although each surface object can be assigned a palette, palettes aren't required for anything but primary surfaces that use pixel formats of 8-bits in depth or less.
DirectDrawSurface可以附加到不同的Palette(调色板?)上。
DirectDrawSurface objects expose their functionality through the IDirectDrawSurface, IDirectDrawSurface2, and IDirectDrawSurface3 interfaces. The IDirectDrawSurface interface is the oldest version of the interface and is provided by default when you create a surface by using the IDirectDraw2::CreateSurface method.
DirectDrawSurface对象的功能都是通过IDirectDrawSurface的接口来提供的。
DirectX包含下面几个组件:
DirectDraw、DirectSound、DirectPlay、Direct3D、DirectInput、DirectSetup和AutoPlay(MSDN for VC6)
在MSDN for VS 2005中,可以看到DirectMusic、DirectPlay Voice、DirectShow等组件,不知道有没有重复,没有深入地了解。
DrectDraw
DirectDraw is a software interface that provides direct access to display devices while maintaining compatibility with the Windows graphics device interface (GDI). It is not a high-level application programming interface (API) for graphics. DirectDraw provides a device-independent way for games and Windows subsystem software, such as 3-D graphics packages and digital video codecs, to gain access to the features of specific display devices.DirectDraw是一套类似GDI(兼容GDI)的software interface,能充分利用硬件加速——在计算机中通过把计算量非常大的工作分配给专门的硬件来处理来减轻中央处理器的工作量的技术。
Device-Independent Bitmaps
Windows, and therefore DirectX, uses the Device-Independent Bitmap (DIB) as its native graphics file format. Essentially, a DIB is a file that contains information describing an image's dimensions, the number of colors it uses, values describing those colors, and data that describes each pixel. For example, the following application-defined function, taken from the ddutil.cpp file that comes with the DirectX APIs in the Platform SDK, combines Win32 and DirectX functions to load a DIB onto a DirectX surface.Bitmaps与GDI中Bitmaps(VC中DDB与DIB位图编程)类似。
Drawing Surfaces
On the other hand, DirectDraw can give you drawing surfaces that represent actual video memory. This means that when you use DirectDraw, you can write directly to the memory on the video card, making your graphics routines extremely fast. These surfaces are represented as contiguous blocks of memory, making it easy to perform addressing within them.GDI也是与设备无关,但是GDI没有充分利用如显卡等硬件的硬件加速。
A surface, or DirectDrawSurface object, represents a linear area of display memory. A surface usually resides in the display memory of the display card, although surfaces can exist in system memory.Unless specifically instructed otherwise during the creation of the DirectDrawSurface object, DirectDraw object will put the DirectDrawSurface object wherever the best performance can be achieved given the requested capabilities. DirectDrawSurface objects can take advantage of specialized processors on display cards, not only to perform certain tasks faster, but to perform some tasks in parallel with the system CPU.
DirectDrawSurface Object可以充分利用显卡(类似GPU编程?),不仅仅是更快地完成指定的计算任务(perform certain tasks faster),还能与CPU一起完成并行计算。
可以使用IDirectDraw2::CreateSurface来创建DirectDrawSurface Object,包括IDirectDrawSurface3.
From this illustration, you can see that all surface are created by a DirectDraw object and are often used closely with palettes. Although each surface object can be assigned a palette, palettes aren't required for anything but primary surfaces that use pixel formats of 8-bits in depth or less.
DirectDrawSurface可以附加到不同的Palette(调色板?)上。
DirectDrawSurface objects expose their functionality through the IDirectDrawSurface, IDirectDrawSurface2, and IDirectDrawSurface3 interfaces. The IDirectDrawSurface interface is the oldest version of the interface and is provided by default when you create a surface by using the IDirectDraw2::CreateSurface method.
DirectDrawSurface对象的功能都是通过IDirectDrawSurface的接口来提供的。
相关文章推荐
- zend Framework——Programmer's Reference Guide
- XSLT Programmer's Reference 读书笔记
- ODBC Programmer's Reference
- 编译提示undefined reference to `dlsym'
- The container 'Android Dependencies' references non existing
- 解决undefined reference to `__aeabi_uidivmod'和undefined reference to `__aeabi_uidiv'错误
- The reference to entity "characterEncoding" must end with the ';' delimiter
- Eclipse打包Android项目时用到proguard.cfg后,出现的Warning:can't find referenced class问题的解决方案
- cocos2d-x发生undefined reference to `XX'异常 一劳永逸解决办法
- qt create 编译嵌入式软件提示undefine reference to 'ts_read_raw'
- linux 下安装opencv3.0在编译时出现的问题undefined reference to `parallel_pthreads_set_threads_num(int)'
- undefined reference to `curl_easy_init'
- jni/../../Classes/AppDelegate.cpp:29: error: undefined reference to 'StartLayer。而且没生成libgame.so文件
- fedora 15 安装opencv2.2时出现undefined reference to `cvCreateCameraCapture_V4L(int)'问题及其解决方法
- cocos2d-x 使用ndk编译 x86 出现 in function Curl_resolv_timeout: undefined reference to 'sigsetjmp' 错误
- 解决Netbeans 下 undefined reference to `pthread_create'
- [doubango Programmer's Guide] 4.3.1 tinySAK 翻译
- undefined reference to `cvLoadImage' 一个简单的解决方法
- apue 线程代码编译时的 undefined reference to 'pthread_create' 问题处理
- undefined reference to `pthread_create'