Table of Contents

Class RenderTargetCube

Namespace
Microsoft.Xna.Framework.Graphics
Assembly
MonoGame.Framework.dll

Represents a texture cube that can be used as a render target.

public class RenderTargetCube : TextureCube, IDisposable
Inheritance
RenderTargetCube
Implements
Inherited Members

Constructors

RenderTargetCube(GraphicsDevice, int, bool, SurfaceFormat, DepthFormat)

Initializes a new instance of the RenderTargetCube class.

public RenderTargetCube(GraphicsDevice graphicsDevice, int size, bool mipMap, SurfaceFormat preferredFormat, DepthFormat preferredDepthFormat)

Parameters

graphicsDevice GraphicsDevice

The graphics device.

size int

The width and height of a texture cube face in pixels.

mipMap bool

true to generate a full mipmap chain; otherwise false.

preferredFormat SurfaceFormat

The preferred format of the surface.

preferredDepthFormat DepthFormat

The preferred format of the depth-stencil buffer.

RenderTargetCube(GraphicsDevice, int, bool, SurfaceFormat, DepthFormat, int, RenderTargetUsage)

Initializes a new instance of the RenderTargetCube class.

public RenderTargetCube(GraphicsDevice graphicsDevice, int size, bool mipMap, SurfaceFormat preferredFormat, DepthFormat preferredDepthFormat, int preferredMultiSampleCount, RenderTargetUsage usage)

Parameters

graphicsDevice GraphicsDevice

The graphics device.

size int

The width and height of a texture cube face in pixels.

mipMap bool

true to generate a full mipmap chain; otherwise false.

preferredFormat SurfaceFormat

The preferred format of the surface.

preferredDepthFormat DepthFormat

The preferred format of the depth-stencil buffer.

preferredMultiSampleCount int

The preferred number of multisample locations.

usage RenderTargetUsage

The usage mode of the render target.

Properties

DepthStencilFormat

Gets the depth-stencil buffer format of this render target.

public DepthFormat DepthStencilFormat { get; }

Property Value

DepthFormat

The format of the depth-stencil buffer.

IsContentLost

Gets a value that indicates whether the contents of this RenderTargetCube has been lost due to a lost device event.

[Obsolete("This is provided for XNA compatibility only and will always return false")]
public bool IsContentLost { get; }

Property Value

bool

Remarks

This property will always return false. It is included for XNA compatibility.

MultiSampleCount

Gets the number of multisample locations.

public int MultiSampleCount { get; }

Property Value

int

The number of multisample locations.

RenderTargetUsage

Gets the usage mode of this render target.

public RenderTargetUsage RenderTargetUsage { get; }

Property Value

RenderTargetUsage

The usage mode of the render target.

Methods

Dispose(bool)

protected override void Dispose(bool disposing)

Parameters

disposing bool

QuerySelectedFormat(GraphicsDevice, SurfaceFormat)

protected static SurfaceFormat QuerySelectedFormat(GraphicsDevice graphicsDevice, SurfaceFormat preferredFormat)

Parameters

graphicsDevice GraphicsDevice
preferredFormat SurfaceFormat

Returns

SurfaceFormat

Events

ContentLost

Occurs when a graphics device lost event is triggered.

[Obsolete("This is provided for XNA compatibility is never called by MonoGame")]
public event EventHandler<EventArgs> ContentLost

Event Type

EventHandler<EventArgs>

Remarks

This event is never called. It is included for XNA compatibility.