Gorgon
Show / Hide Table of Contents

Class GorgonRenderTarget3DView

A view to allow 3D texture based render targets to be bound to the pipeline.

Inheritance
object
GorgonResourceView
GorgonRenderTargetView
GorgonRenderTarget3DView
Implements
IDisposable
IGorgonGraphicsObject
IEquatable<GorgonResourceView>
IGorgonTexture3DInfo
IGorgonNamedObject
IGorgonImageInfo
Inherited Members
GorgonRenderTargetView.Format
GorgonRenderTargetView.FormatInformation
GorgonRenderTargetView.Clear(in GorgonColor)
GorgonResourceView.IsDisposed
GorgonResourceView.Resource
GorgonResourceView.Usage
GorgonResourceView.Graphics
GorgonResourceView.Equals(GorgonResourceView)
GorgonResourceView.Equals(object)
GorgonResourceView.GetHashCode()
object.ToString()
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetType()
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 Source

Binding

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
GorgonRenderTargetView.Binding
See Also
GorgonSwapChain
GorgonTexture2D
GorgonTexture3D
| Edit this page View Source

Bounds

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
GorgonSwapChain
GorgonTexture2D
GorgonTexture3D
| Edit this page View Source

Depth

Property to return the depth of the texture, in slices.

Declaration
public int Depth { get; }
Property Value
Type Description
int
See Also
GorgonSwapChain
GorgonTexture2D
GorgonTexture3D
| Edit this page View Source

DepthSliceCount

Property to return the number of depth slices in the view.

Declaration
public int DepthSliceCount { get; }
Property Value
Type Description
int
See Also
GorgonSwapChain
GorgonTexture2D
GorgonTexture3D
| Edit this page View Source

Height

Property to return the height of the render target in pixels.

Declaration
public override int Height { get; }
Property Value
Type Description
int
Overrides
GorgonRenderTargetView.Height
Remarks

This value is the full width of the first mip map level for the texture associated with the render target.

See Also
GorgonSwapChain
GorgonTexture2D
GorgonTexture3D
| Edit this page View Source

MipHeight

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
GorgonSwapChain
GorgonTexture2D
GorgonTexture3D
| Edit this page View Source

MipSlice

Property to return the mip slice to use for the view.

Declaration
public int MipSlice { get; }
Property Value
Type Description
int
See Also
GorgonSwapChain
GorgonTexture2D
GorgonTexture3D
| Edit this page View Source

MipWidth

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
GorgonSwapChain
GorgonTexture2D
GorgonTexture3D
| Edit this page View Source

StartDepthSlice

Property to return the first depth slice in the view.

Declaration
public int StartDepthSlice { get; }
Property Value
Type Description
int
See Also
GorgonSwapChain
GorgonTexture2D
GorgonTexture3D
| Edit this page View Source

Texture

Property to return the texture bound to this render target view.

Declaration
public GorgonTexture3D Texture { get; }
Property Value
Type Description
GorgonTexture3D
See Also
GorgonSwapChain
GorgonTexture2D
GorgonTexture3D
| Edit this page View Source

Width

Property to return the width of the render target in pixels.

Declaration
public override int Width { get; }
Property Value
Type Description
int
Overrides
GorgonRenderTargetView.Width
Remarks

This value is the full width of the first mip map level for the texture associated with the render target.

See Also
GorgonSwapChain
GorgonTexture2D
GorgonTexture3D

Methods

| Edit this page View Source

CreateRenderTarget(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 graphics, or info parameter is null.

See Also
GorgonTexture3D
| Edit this page View Source

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Declaration
public override void Dispose()
Overrides
GorgonResourceView.Dispose()
See Also
GorgonSwapChain
GorgonTexture2D
GorgonTexture3D
| Edit this page View Source

ToPixel(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
GorgonSwapChain
GorgonTexture2D
GorgonTexture3D
| Edit this page View Source

ToPixel(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
GorgonSwapChain
GorgonTexture2D
GorgonTexture3D
| Edit this page View Source

ToTexel(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
GorgonSwapChain
GorgonTexture2D
GorgonTexture3D
| Edit this page View Source

ToTexel(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.

See Also
GorgonSwapChain
GorgonTexture2D
GorgonTexture3D

Implements

IDisposable
IGorgonGraphicsObject
IEquatable<T>
IGorgonTexture3DInfo
IGorgonNamedObject
IGorgonImageInfo

Extension Methods

GorgonDebugExtensions.ValidateObject<T>(T, string)
GorgonNullExtensions.AsNullable<T>(object)
GorgonNullExtensions.IfNull<T>(object, T)
GorgonNullExtensions.IsNull(object)

See Also

GorgonSwapChain
GorgonTexture2D
GorgonTexture3D
  • Edit this page
  • View Source
In this article
Back to top Copyright 2023 - Licensed under the MIT license by Michael Winsor (Tape_Worm).
Send comments on this topic to the author