/// <summary> /// Get the array of {{viewports}} bound to the {{rasterizer stage}} /// </summary> /// <returns>An array of viewports (see <see cref="RawViewport"/>).</returns> /// <unmanaged>void RSGetViewports([InOut] int* NumViewports,[Out, Buffer, Optional] D3D10_VIEWPORT* pViewports)</unmanaged> public RawViewport[] GetViewports() { int numViewports = 0; GetViewports(ref numViewports, null); RawViewport[] viewports = new RawViewport[numViewports]; GetViewports(ref numViewports, viewports); return viewports; }
/// <summary> /// Get the array of {{viewports}} bound to the {{rasterizer stage}} /// </summary> /// <returns>An array of viewports (see <see cref="RawViewport"/>).</returns> /// <unmanaged>void RSGetViewports([InOut] int* NumViewports,[Out, Buffer, Optional] D3D10_VIEWPORT* pViewports)</unmanaged> public void GetViewports(RawViewport[] viewports) { int numViewports = viewports.Length; GetViewports(ref numViewports, viewports); }
/// <summary> /// Binds a single viewport to the rasterizer stage. /// </summary> /// <param name = "viewport">The viewport to bind.</param> public void SetViewports(RawViewport viewport) { SetViewports(new RawViewport[] { viewport }); }