Struct D3D11Viewport
Defines the dimensions of a viewport.
Implements
Inherited Members
Namespace: JeremyAnsel.DirectX.D3D11
Assembly: JeremyAnsel.DirectX.D3D11.dll
Syntax
public struct D3D11Viewport : IEquatable<D3D11Viewport>
Constructors
| Edit this page View SourceD3D11Viewport(D3D11Buffer, D3D11RenderTargetView)
Initializes a new instance of the D3D11Viewport struct.
Declaration
public D3D11Viewport(D3D11Buffer buffer, D3D11RenderTargetView view)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11Buffer | buffer | A buffer. |
| D3D11RenderTargetView | view | The render-target view. |
D3D11Viewport(D3D11Buffer, D3D11RenderTargetView, float)
Initializes a new instance of the D3D11Viewport struct.
Declaration
public D3D11Viewport(D3D11Buffer buffer, D3D11RenderTargetView view, float topLeftX)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11Buffer | buffer | A buffer. |
| D3D11RenderTargetView | view | The render-target view. |
| float | topLeftX | The X position of the left hand side of the viewport. |
D3D11Viewport(D3D11Buffer, D3D11RenderTargetView, float, float, float)
Initializes a new instance of the D3D11Viewport struct.
Declaration
public D3D11Viewport(D3D11Buffer buffer, D3D11RenderTargetView view, float topLeftX, float minDepth, float maxDepth)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11Buffer | buffer | A buffer. |
| D3D11RenderTargetView | view | The render-target view. |
| float | topLeftX | The X position of the left hand side of the viewport. |
| float | minDepth | The minimum depth of the viewport. |
| float | maxDepth | The maximum depth of the viewport. |
D3D11Viewport(D3D11Texture1D, D3D11RenderTargetView)
Initializes a new instance of the D3D11Viewport struct.
Declaration
public D3D11Viewport(D3D11Texture1D texture, D3D11RenderTargetView view)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11Texture1D | texture | A 1D texture. |
| D3D11RenderTargetView | view | The render-target view. |
D3D11Viewport(D3D11Texture1D, D3D11RenderTargetView, float)
Initializes a new instance of the D3D11Viewport struct.
Declaration
public D3D11Viewport(D3D11Texture1D texture, D3D11RenderTargetView view, float topLeftX)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11Texture1D | texture | A 1D texture. |
| D3D11RenderTargetView | view | The render-target view. |
| float | topLeftX | The X position of the left hand side of the viewport. |
D3D11Viewport(D3D11Texture1D, D3D11RenderTargetView, float, float, float)
Initializes a new instance of the D3D11Viewport struct.
Declaration
public D3D11Viewport(D3D11Texture1D texture, D3D11RenderTargetView view, float topLeftX, float minDepth, float maxDepth)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11Texture1D | texture | A 1D texture. |
| D3D11RenderTargetView | view | The render-target view. |
| float | topLeftX | The X position of the left hand side of the viewport. |
| float | minDepth | The minimum depth of the viewport. |
| float | maxDepth | The maximum depth of the viewport. |
D3D11Viewport(D3D11Texture2D, D3D11RenderTargetView)
Initializes a new instance of the D3D11Viewport struct.
Declaration
public D3D11Viewport(D3D11Texture2D texture, D3D11RenderTargetView view)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11Texture2D | texture | A 2D texture. |
| D3D11RenderTargetView | view | The render-target view. |
D3D11Viewport(D3D11Texture2D, D3D11RenderTargetView, float, float)
Initializes a new instance of the D3D11Viewport struct.
Declaration
public D3D11Viewport(D3D11Texture2D texture, D3D11RenderTargetView view, float topLeftX, float topLeftY)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11Texture2D | texture | A 2D texture. |
| D3D11RenderTargetView | view | The render-target view. |
| float | topLeftX | The X position of the left hand side of the viewport. |
| float | topLeftY | The Y position of the top of the viewport. |
D3D11Viewport(D3D11Texture2D, D3D11RenderTargetView, float, float, float, float)
Initializes a new instance of the D3D11Viewport struct.
Declaration
public D3D11Viewport(D3D11Texture2D texture, D3D11RenderTargetView view, float topLeftX, float topLeftY, float minDepth, float maxDepth)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11Texture2D | texture | A 2D texture. |
| D3D11RenderTargetView | view | The render-target view. |
| float | topLeftX | The X position of the left hand side of the viewport. |
| float | topLeftY | The Y position of the top of the viewport. |
| float | minDepth | The minimum depth of the viewport. |
| float | maxDepth | The maximum depth of the viewport. |
D3D11Viewport(D3D11Texture3D, D3D11RenderTargetView)
Initializes a new instance of the D3D11Viewport struct.
Declaration
public D3D11Viewport(D3D11Texture3D texture, D3D11RenderTargetView view)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11Texture3D | texture | A 3D texture. |
| D3D11RenderTargetView | view | The render-target view. |
D3D11Viewport(D3D11Texture3D, D3D11RenderTargetView, float, float)
Initializes a new instance of the D3D11Viewport struct.
Declaration
public D3D11Viewport(D3D11Texture3D texture, D3D11RenderTargetView view, float topLeftX, float topLeftY)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11Texture3D | texture | A 3D texture. |
| D3D11RenderTargetView | view | The render-target view. |
| float | topLeftX | The X position of the left hand side of the viewport. |
| float | topLeftY | The Y position of the top of the viewport. |
D3D11Viewport(D3D11Texture3D, D3D11RenderTargetView, float, float, float, float)
Initializes a new instance of the D3D11Viewport struct.
Declaration
public D3D11Viewport(D3D11Texture3D texture, D3D11RenderTargetView view, float topLeftX, float topLeftY, float minDepth, float maxDepth)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11Texture3D | texture | A 3D texture. |
| D3D11RenderTargetView | view | The render-target view. |
| float | topLeftX | The X position of the left hand side of the viewport. |
| float | topLeftY | The Y position of the top of the viewport. |
| float | minDepth | The minimum depth of the viewport. |
| float | maxDepth | The maximum depth of the viewport. |
D3D11Viewport(float, float, float, float)
Initializes a new instance of the D3D11Viewport struct.
Declaration
public D3D11Viewport(float topLeftX, float topLeftY, float width, float height)
Parameters
| Type | Name | Description |
|---|---|---|
| float | topLeftX | The X position of the left hand side of the viewport. |
| float | topLeftY | The Y position of the top of the viewport. |
| float | width | The width of the viewport. |
| float | height | The height of the viewport. |
D3D11Viewport(float, float, float, float, float, float)
Initializes a new instance of the D3D11Viewport struct.
Declaration
public D3D11Viewport(float topLeftX, float topLeftY, float width, float height, float minDepth, float maxDepth)
Parameters
| Type | Name | Description |
|---|---|---|
| float | topLeftX | The X position of the left hand side of the viewport. |
| float | topLeftY | The Y position of the top of the viewport. |
| float | width | The width of the viewport. |
| float | height | The height of the viewport. |
| float | minDepth | The minimum depth of the viewport. |
| float | maxDepth | The maximum depth of the viewport. |
Properties
| Edit this page View SourceHeight
Gets or sets the height of the viewport.
Declaration
public float Height { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
MaxDepth
Gets or sets the maximum depth of the viewport.
Declaration
public float MaxDepth { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
MinDepth
Gets or sets the minimum depth of the viewport.
Declaration
public float MinDepth { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
TopLeftX
Gets or sets the X position of the left hand side of the viewport.
Declaration
public float TopLeftX { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
TopLeftY
Gets or sets the Y position of the top of the viewport.
Declaration
public float TopLeftY { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
Width
Gets or sets the width of the viewport.
Declaration
public float Width { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
Methods
| Edit this page View SourceEquals(D3D11Viewport)
Declaration
public readonly bool Equals(D3D11Viewport other)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11Viewport | other |
Returns
| Type | Description |
|---|---|
| bool |
Equals(object?)
Declaration
public override readonly bool Equals(object? obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj |
Returns
| Type | Description |
|---|---|
| bool |
Overrides
| Edit this page View SourceGetHashCode()
Declaration
public override readonly int GetHashCode()
Returns
| Type | Description |
|---|---|
| int |
Overrides
| Edit this page View SourceNativeReadFrom(nint)
Declaration
public static D3D11Viewport NativeReadFrom(nint buffer)
Parameters
| Type | Name | Description |
|---|---|---|
| nint | buffer |
Returns
| Type | Description |
|---|---|
| D3D11Viewport |
NativeReadFrom(nint, Span<D3D11Viewport>)
Declaration
public static void NativeReadFrom(nint buffer, Span<D3D11Viewport> objects)
Parameters
| Type | Name | Description |
|---|---|---|
| nint | buffer | |
| Span<D3D11Viewport> | objects |
NativeRequiredSize()
Declaration
public static int NativeRequiredSize()
Returns
| Type | Description |
|---|---|
| int |
NativeRequiredSize(int)
Declaration
public static int NativeRequiredSize(int count)
Parameters
| Type | Name | Description |
|---|---|---|
| int | count |
Returns
| Type | Description |
|---|---|
| int |
NativeWriteTo(nint, in D3D11Viewport)
Declaration
public static void NativeWriteTo(nint buffer, in D3D11Viewport obj)
Parameters
| Type | Name | Description |
|---|---|---|
| nint | buffer | |
| D3D11Viewport | obj |
NativeWriteTo(nint, ReadOnlySpan<D3D11Viewport>)
Declaration
public static void NativeWriteTo(nint buffer, ReadOnlySpan<D3D11Viewport> objects)
Parameters
| Type | Name | Description |
|---|---|---|
| nint | buffer | |
| ReadOnlySpan<D3D11Viewport> | objects |
Operators
| Edit this page View Sourceoperator ==(D3D11Viewport, D3D11Viewport)
Declaration
public static bool operator ==(D3D11Viewport left, D3D11Viewport right)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11Viewport | left | |
| D3D11Viewport | right |
Returns
| Type | Description |
|---|---|
| bool |
operator !=(D3D11Viewport, D3D11Viewport)
Declaration
public static bool operator !=(D3D11Viewport left, D3D11Viewport right)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11Viewport | left | |
| D3D11Viewport | right |
Returns
| Type | Description |
|---|---|
| bool |