RenderTargetCube Constructor (GraphicsDevice, Int32, Int32, SurfaceFormat)
Initializes a new instance of this class.
Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)
Syntax
public RenderTargetCube (
GraphicsDevice graphicsDevice,
int size,
int numberLevels,
SurfaceFormat format
)
Parameters
graphicsDevice
The graphics device to associate with this render target resource.size
The width and height of this cube texture resource, in pixels.numberLevels
The number of downsampled surfaces to create when preprocessing the texture. These smaller versions of the texture, known as mip levels, are used when the texture is minified to fit a smaller area than the original texture size. The chain of downsampled surfaces associated with a texture is sometimes called a mipmap chain.If this is zero, all texture sublevels down to 1×1 pixels will be generated for hardware that supports mipmapped textures.
format
Surface format of the render target.
Exceptions
Exception type | Condition |
---|---|
ArgumentException | One of the following conditions is true:
|
ArgumentNullException | graphicsDevice is null. |
ArgumentOutOfRangeException | size is less than or equal to zero. size must be greater than zero. |
InvalidOperationException | Unable to create this RenderTargetCube resource on the graphics device. |
Remarks
After a render pass the render target contains the color information of a rendered image.
Render targets represent a linear area of display memory and usually resides in the display memory of the display card. Because of this, objects must be recreated when the device is reset.
See Also
Reference
RenderTargetCube Class
RenderTargetCube Members
Microsoft.Xna.Framework.Graphics Namespace
Platforms
Xbox 360, Windows XP SP2, Windows Vista