Sign in to follow this  
user88

[SlimDX] Is it possible to create multisampled texture?

Recommended Posts

user88    304
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

Share this post


Link to post
Share on other sites
MJP    19755
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this