Home -> ITextureBuffer -> SetSampleCount
Description
The SetSampleCount method specifies the multisample anti-aliasing (MSAA) sample count for a two dimensional texture. A texture with a sample count greater than SampleCount1 stores more than one sample for each pixel and is intended for use as a multisampled IFrameBuffer attachment.
Multisampled textures are normally rendered into directly, then resolved into a single-sample texture using EnableAttachmentMultiSamplingResolution and a texture bound with BindMultiSamplingResolveTexture.
Important
This method is only available on ITextureBuffer2D objects, and must be called before AllocateMemory.
Warning
Sample count support depends on the renderer, graphics device, texture format, and intended usage. The values in SampleCount define the API values, but not every value is guaranteed to be supported for every allocation. Use IsSampleCountSupported to query support for a specific two dimensional texture format before allocating an MSAA texture.
Usage
void SetSampleCount(SampleCount sampleCount);
Argument list
- sampleCount [SampleCount]
- The number of samples to allocate for each pixel of the two dimensional texture.