// Copyright (c) 2010-2014 SharpDX - Alexandre Mutel // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. using System; namespace SharpDX.Direct3D9 { public partial class RenderToSurface { /// /// Creates a render surface. /// ///

Pointer to an interface, the device to be associated with the render surface.

///

Width of the render surface, in pixels.

///

Height of the render surface, in pixels.

///

Member of the enumerated type, describing the pixel format of the render surface.

///

If TRUE, the render surface supports a depth-stencil surface. Otherwise, this member is set to . This function will create a new depth buffer.

///

If DepthStencil is set to TRUE, this parameter is a member of the enumerated type, describing the depth-stencil format of the render surface.

/// bb172791 /// HRESULT D3DXCreateRenderToSurface([In] IDirect3DDevice9* pDevice,[In] unsigned int Width,[In] unsigned int Height,[In] D3DFORMAT Format,[In] BOOL DepthStencil,[In] D3DFORMAT DepthStencilFormat,[In] ID3DXRenderToSurface** ppRenderToSurface) /// D3DXCreateRenderToSurface public RenderToSurface(SharpDX.Direct3D9.Device device, int width, int height, SharpDX.Direct3D9.Format format, bool depthStencil = false, SharpDX.Direct3D9.Format depthStencilFormat = Format.Unknown) : base(IntPtr.Zero) { D3DX9.CreateRenderToSurface(device, width, height, format, depthStencil, depthStencilFormat, this); } } }