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)
Determines whether the specified object is equal to the current object.
Declaration
public bool Equals(D3D11Viewport other)
Parameters
Type | Name | Description |
---|---|---|
D3D11Viewport | other | The object to compare with the current object. |
Returns
Type | Description |
---|---|
bool |
Equals(object)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with the current object. |
Returns
Type | Description |
---|---|
bool |
Overrides
| Edit this page View SourceGetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A 32-bit signed integer that is the hash code for this instance. |
Overrides
Operators
| Edit this page View Sourceoperator ==(D3D11Viewport, D3D11Viewport)
Compares two D3D11Viewport objects. The result specifies whether the values of the two objects are equal.
Declaration
public static bool operator ==(D3D11Viewport left, D3D11Viewport right)
Parameters
Type | Name | Description |
---|---|---|
D3D11Viewport | left | The left D3D11Viewport to compare. |
D3D11Viewport | right | The right D3D11Viewport to compare. |
Returns
Type | Description |
---|---|
bool |
operator !=(D3D11Viewport, D3D11Viewport)
Compares two D3D11Viewport objects. The result specifies whether the values of the two objects are unequal.
Declaration
public static bool operator !=(D3D11Viewport left, D3D11Viewport right)
Parameters
Type | Name | Description |
---|---|---|
D3D11Viewport | left | The left D3D11Viewport to compare. |
D3D11Viewport | right | The right D3D11Viewport to compare. |
Returns
Type | Description |
---|---|
bool |