[SlimDX] Is it possible to create multisampled texture?

Started by
0 comments, last by MJP 14 years ago
Hi. I'm creating texture as render target. But when i get its surface there is MultisamplingType.None:

public Texture CreateRenderTargetF(int width, int height)
{
   return new Texture(Device, width, height, 1, Usage.RenderTarget, RtfFormat, Pool.Default);
}

As you see texture creates by using its constructor. But there is no constructor overloading with multisampling type argument. Question: Is it possible to create multisampled texture? Of course i can use StretchRectangle() or GetFrontBufferData(), but just want to know answer for a question. thanks in advice
Advertisement
You have to use Surface.CreateRenderTarget and specify the multisample mode, and also create a render target Texture with the same size and format. Then you first render everything to the Surface, and afterwards you use StretchRect to resolve the surface to the texture.

This topic is closed to new replies.

Advertisement