Sign in to follow this  

[SlimDX] Is it possible to create multisampled texture?

This topic is 2813 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

This topic is 2813 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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