Пример #1
0
 /// <summary>
 /// <p>Create a sampler-state object that encapsulates sampling information for a texture.</p>
 /// </summary>
 /// <param name="device">The <see cref="GraphicsDevice"/>.</param>
 /// <param name="samplerState">An existing <see cref="Direct3D11.SamplerState"/> instance.</param>
 /// <returns>A new <see cref="SamplerState"/> instance</returns>
 /// <remarks>
 /// <p>4096 unique sampler state objects can be created on a device at a time.</p><p>If an application attempts to create a sampler-state interface with the same state as an existing interface, the same interface will be returned and the total number of unique sampler state objects will stay the same.</p>
 /// </remarks>
 /// <msdn-id>ff476518</msdn-id>
 /// <unmanaged>HRESULT ID3D11Device::CreateSamplerState([In] const D3D11_SAMPLER_DESC* pSamplerDesc,[Out, Fast] ID3D11SamplerState** ppSamplerState)</unmanaged>
 /// <unmanaged-short>ID3D11Device::CreateSamplerState</unmanaged-short>
 public static SamplerState New(GraphicsDevice device, Direct3D11.SamplerState samplerState)
 {
     return(new SamplerState(device, samplerState));
 }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SamplerState" /> class.
 /// </summary>
 /// <param name="device">The <see cref="GraphicsDevice"/>.</param>
 /// <param name="nativeState">State of the native.</param>
 private SamplerState(GraphicsDevice device, Direct3D11.SamplerState nativeState) : base(device.MainDevice)
 {
     Description = nativeState.Description;
     Initialize(nativeState);
 }