Jump to content
  • Advertisement
Sign in to follow this  
user88

[SlimDX] Is it possible to create multisampled texture?

This topic is 3034 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
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!