Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Xbox 360 Surface Formats

Xbox 360 Surface Formats

In the XNA Framework, all two-dimensional (2D) images are represented by a range of memory called a surface. Within a surface, each element holds a color value representing a small section of the image, called a pixel. An image's detail level is defined by both the number of pixels needed to represent the image, and the number of bits needed for the image's color spectrum. For example, an image that is 800 pixels wide by 600 pixels high with 32 bits of color for each pixel (written as 800×600×32) is more detailed than an image that is 640 pixels wide by 480 pixels tall with 16 bits of color for each pixel (written as 640×480×16). Likewise, the more detailed image requires a larger surface to store the data. For an 800×600×32 image, the surface's array dimensions are 800×600, and each element holds a 32-bit value to represent its color.

All surfaces have a size and store a specific number of bits that represent color. The bits that represent color are separated into individual color elements: red, green, and blue. All color elements are defined by the SurfaceFormat enumerated type. A color format is broken down into the number of bytes reserved for each color. For example, a 16-bit color format is defined as SurfaceFormat.BGR565, where 5 bits are reserved for red (R), 6 bits for green (G), and 5 bits for blue (B).

On any platform, you can obtain the available render target platforms and depth-stencil formats by using the GraphicsAdapter.CheckDeviceFormat and GraphicsAdapter.CheckDepthStencilMatch methods

Render Target Formats

The following render target formats are supported on the Xbox 360 platform.

Both 2× and 4× multisampling are supported. On resolve, the GPU can downsample multisampled render targets and do format conversion. However, multisample downsampling is limited to blendable target formats.

Render targets must be padded to certain dimensions based on the multisample mode. The padding required for 32-bits-per-pixel formats is 80×16 for 1× antialiasing, 80×8 for 2× antialiasing, and 40×8 for 4× antialiasing.

Depth-Stencil Formats

The following depth-stencil formats are supported on the Xbox 360 platform.

Unsupported Surface Formats

© 2015 Microsoft