/// <summary> /// Checks texture-creation parameters. /// </summary> /// <param name="device">Device associated with the texture.</param> /// <param name="size">Requested size of the texture. Null if </param> /// <param name="mipLevelCount">Requested number of mipmap levels for the texture.</param> /// <param name="usage">The requested usage for the texture.</param> /// <param name="format">Requested format for the texture.</param> /// <param name="pool">Memory class where the resource will be placed.</param> /// <returns>A value type containing the proposed values to pass to the texture creation functions.</returns> /// <unmanaged>HRESULT D3DXCheckCubeTextureRequirements([In] IDirect3DDevice9* pDevice,[InOut] unsigned int* pSize,[InOut] unsigned int* pNumMipLevels,[In] unsigned int Usage,[InOut] D3DFORMAT* pFormat,[In] D3DPOOL Pool)</unmanaged> public static CubeTextureRequirements CheckRequirements(Device device, int size, int mipLevelCount, Usage usage, Format format, Pool pool) { var result = new CubeTextureRequirements(); D3DX9.CheckCubeTextureRequirements(device, ref result.Size, ref result.MipLevelCount, (int)usage, ref result.Format, pool); return(result); }
/// <summary> /// Checks texture-creation parameters. /// </summary> /// <param name="device">Device associated with the texture.</param> /// <param name="size">Requested size of the texture. Null if </param> /// <param name="mipLevelCount">Requested number of mipmap levels for the texture.</param> /// <param name="usage">The requested usage for the texture.</param> /// <param name="format">Requested format for the texture.</param> /// <param name="pool">Memory class where the resource will be placed.</param> /// <returns>A value type containing the proposed values to pass to the texture creation functions.</returns> /// <unmanaged>HRESULT D3DXCheckCubeTextureRequirements([In] IDirect3DDevice9* pDevice,[InOut] unsigned int* pSize,[InOut] unsigned int* pNumMipLevels,[In] unsigned int Usage,[InOut] D3DFORMAT* pFormat,[In] D3DPOOL Pool)</unmanaged> public static CubeTextureRequirements CheckRequirements(Device device, int size, int mipLevelCount, Usage usage, Format format, Pool pool) { var result = new CubeTextureRequirements { Size = size, MipLevelCount = mipLevelCount, Format = format }; D3DX9.CheckCubeTextureRequirements(device, ref result.Size, ref result.MipLevelCount, (int)usage, ref result.Format, pool); return result; }