Class GorgonRenderTarget3DView
A view to allow 3D texture based render targets to be bound to the pipeline.
Implements
Inherited Members
Namespace: Gorgon.Graphics.Core
Assembly: Gorgon.Graphics.Core.dll
Syntax
public sealed class GorgonRenderTarget3DView : GorgonRenderTargetView, IDisposable, IGorgonGraphicsObject, IEquatable<GorgonResourceView>, IGorgonTexture3DInfo, IGorgonNamedObject, IGorgonImageInfo
Remarks
A render target view allows a render target (such as a GorgonSwapChain or a texture to be bound to the GPU pipeline as a render target resource.
The view can bind the entire resource, or a sub section of the resource as required. It will also allow for casting of the format to allow for reinterpreting the data stored within the the render target.
Properties
| Edit this page View SourceBinding
Property to return the flags to determine how the texture will be bound with the pipeline when rendering.
Declaration
public override TextureBinding Binding { get; }
Property Value
Type | Description |
---|---|
TextureBinding |
Overrides
See Also
| Edit this page View SourceBounds
Property to return the bounding rectangle for the render target view.
Declaration
public Rectangle Bounds { get; }
Property Value
Type | Description |
---|---|
Rectangle |
Remarks
This value is the full bounding rectangle of the first mip map level for the texture associated with the render target.
See Also
| Edit this page View SourceDepth
Property to return the depth of the texture, in slices.
Declaration
public int Depth { get; }
Property Value
Type | Description |
---|---|
int |
See Also
| Edit this page View SourceDepthSliceCount
Property to return the number of depth slices in the view.
Declaration
public int DepthSliceCount { get; }
Property Value
Type | Description |
---|---|
int |
See Also
| Edit this page View SourceHeight
Property to return the height of the render target in pixels.
Declaration
public override int Height { get; }
Property Value
Type | Description |
---|---|
int |
Overrides
Remarks
This value is the full width of the first mip map level for the texture associated with the render target.
See Also
| Edit this page View SourceMipHeight
Property to return the height of the render target at the current MipSlice in pixels.
Declaration
public int MipHeight { get; }
Property Value
Type | Description |
---|---|
int |
Remarks
This value is the height of the mip map level assigned to MipSlice for the texture associated with the render target.
See Also
| Edit this page View SourceMipSlice
Property to return the mip slice to use for the view.
Declaration
public int MipSlice { get; }
Property Value
Type | Description |
---|---|
int |
See Also
| Edit this page View SourceMipWidth
Property to return the width of the render target at the current MipSlice in pixels.
Declaration
public int MipWidth { get; }
Property Value
Type | Description |
---|---|
int |
Remarks
This value is the width of the mip map level assigned to MipSlice for the texture associated with the render target.
See Also
| Edit this page View SourceStartDepthSlice
Property to return the first depth slice in the view.
Declaration
public int StartDepthSlice { get; }
Property Value
Type | Description |
---|---|
int |
See Also
| Edit this page View SourceTexture
Property to return the texture bound to this render target view.
Declaration
public GorgonTexture3D Texture { get; }
Property Value
Type | Description |
---|---|
GorgonTexture3D |
See Also
| Edit this page View SourceWidth
Property to return the width of the render target in pixels.
Declaration
public override int Width { get; }
Property Value
Type | Description |
---|---|
int |
Overrides
Remarks
This value is the full width of the first mip map level for the texture associated with the render target.
See Also
Methods
| Edit this page View SourceCreateRenderTarget(GorgonGraphics, IGorgonTexture3DInfo)
Function to create a new render target that is bindable to the GPU.
Declaration
public static GorgonRenderTarget3DView CreateRenderTarget(GorgonGraphics graphics, IGorgonTexture3DInfo info)
Parameters
Type | Name | Description |
---|---|---|
GorgonGraphics | graphics | The graphics interface to use when creating the target. |
IGorgonTexture3DInfo | info | The information about the texture. |
Returns
Type | Description |
---|---|
GorgonRenderTarget3DView | A new GorgonRenderTarget3DView. |
Remarks
This is a convenience method that will create a GorgonTexture3D and a GorgonRenderTarget3DView as a single object that users can use to apply a render target texture. This helps simplify creation of a render target by executing some prerequisite steps on behalf of the user.
Since the GorgonTexture3D created by this method is linked to the GorgonRenderTarget3DView returned, disposal of either one will dispose of the other on your behalf. If the user created a GorgonRenderTarget3DView from the GetRenderTargetView(BufferFormat, int, int, int) method on the GorgonTexture3D, then it's assumed the user knows what they are doing and will handle the disposal of the texture and view on their own.
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when the |
See Also
| Edit this page View SourceDispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public override void Dispose()
Overrides
See Also
| Edit this page View SourceToPixel(Size2F)
Function to convert a texel size into a pixel size.
Declaration
public Size2 ToPixel(Size2F texelCoordinates)
Parameters
Type | Name | Description |
---|---|---|
Size2F | texelCoordinates | The texel size to convert. |
Returns
Type | Description |
---|---|
Size2 | The pixel size. |
See Also
| Edit this page View SourceToPixel(Vector3)
Function to convert a texel coordinate into a pixel coordinate and a depth slice.
Declaration
public (Point, int) ToPixel(Vector3 texelCoordinates)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | texelCoordinates | The texel coordinates to convert. |
Returns
Type | Description |
---|---|
(Point, int) | The pixel coordinates. |
See Also
| Edit this page View SourceToTexel(Point)
Function to convert a pixel coordinate into a texel coordinate.
Declaration
public Vector3 ToTexel(Point pixelCoordinates)
Parameters
Type | Name | Description |
---|---|---|
Point | pixelCoordinates | The pixel coordinate to convert. |
Returns
Type | Description |
---|---|
Vector3 | The texel coordinates. |
See Also
| Edit this page View SourceToTexel(Size2)
Function to convert a pixel size into a texel size.
Declaration
public Size2F ToTexel(Size2 pixelCoordinates)
Parameters
Type | Name | Description |
---|---|---|
Size2 | pixelCoordinates | The pixel size to convert. |
Returns
Type | Description |
---|---|
Size2F | The texel size. |