D3D Copying to Surfaces (Direct3D 9)
来源:互联网 发布:思迅v7连接不到数据库 编辑:程序博客网 时间:2024/06/10 04:23
Copying to Surfaces (Direct3D 9)
When using IDirect3DDevice9::UpdateSurface, pass a rectangle on the source surface, or use NULL to specify the entire surface. You also pass a point on the destination surface to which the upper left position of the rectangle on the source image is copied. This method does not support clipping. The operation will fail unless the source rectangle and the corresponding destination rectangle are completely contained within the source and destination surfaces respectively. This method does not support alpha blending, color keys, or format conversion. Note that the destination and source surfaces must be distinct.
For other restrictions when using UpdateSurface, see IDirect3DDevice9::UpdateSurface.
The following methods are also available in C++/C for copying images to a Direct3D surface.
- D3DXLoadSurfaceFromFile
- D3DXLoadSurfaceFromFileInMemory
- D3DXLoadSurfaceFromMemory
- D3DXLoadSurfaceFromResource
- D3DXLoadSurfaceFromSurface
- IDirect3DDevice9::UpdateSurface
UpdateSurface Example
The following example copies two rectangles from the source surface to a destination surface. The first rectangle is copied from (0, 0, 50, 50) on the source surface to the same location on the destination surface, and the second rectangle is copied from (50, 50, 100, 100) on the source surface to (150, 150, 200, 200) on the destination surface.
//The following assumptions are made:// -d3dDevice is a valid Direct3DDevice9 object.// -pSource and pDest are valid IDirect3DSurface9 pointers.RECT rcSource[] = { 0, 0, 50, 50, 50, 50, 100, 100 };POINT ptDest[] = { 0, 0, 150, 150 };d3dDevice->UpdateSurface( pSource, rcSource, 2, pDest, ptDest);
See Also
IDirect3DDevice9::StretchRect
- D3D Copying to Surfaces (Direct3D 9)
- [Direct3D] Surfaces (Direct3D 9)
- Direct3D Surfaces (Direct3D 9)
- D3D:Surfaces(1)
- D3D:Surfaces (2)
- D3D笔记:在Direct3D画画
- D3D学习笔记(初始化Direct3D)
- D3D学习笔记(初始化Direct3D-1)
- D3D学习笔记(初始化Direct3D-2)
- Direct3D学习笔记一:D3D概况
- D3D学习笔记(初始化Direct3D-2)
- D3D学习笔记(初始化Direct3D-2)
- D3D学习笔记(初始化Direct3D-1)
- D3D学习笔记(初始化Direct3D-2)
- [D3D] 如何查看Direct3D的版本
- Directly Mapping Texels to Pixels (Direct3D 9)
- Loading JPEGs to DirectDraw Surfaces
- surfaces
- IDirect3DDevice9::StretchRect
- Eclipse REST 库使用
- COM组件开发实践
- 内核对象句柄表
- mysql 异常编码 error 1201-1400
- D3D Copying to Surfaces (Direct3D 9)
- android启动过程中init.c文件分析
- 深入理解extern "C"
- android 静音与振动
- AIX上备份 DB2数据库
- 说好的更新
- 通过CMD 查看android APP数据库表
- mysql 异常编码 error 1401-1494
- USB URB