コード例 #1
0
        /// <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;
        }
コード例 #2
0
 /// <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);
 }
コード例 #3
0
 /// <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 });
 }