• Advertisement
Sign in to follow this  

How to pick a Rendertarget other than the Backbuffer

This topic is 4411 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

Hello everyone, ok i was going to start my first 3d project. When i was doing 2d i built a surface and put everything onto that surface then putting it onto the backbuffer and then i would render it. I did this so i wouldnt get in trouble with diffrent resolutions. This way i was able to program for just one resolution and if someone played in a different one i didnt have to do anything special cause the view was adjusted by copying from the final surface to the backbuffer. This i wanted to do with 3d too but therefore i would have to render to a surface first. Can someone tell me if thats possible, and if so how would i do it? Another question would be if this is a good idea at all? Or is there an easier was to adjust to diffrent resolutions? Thx a lot for your help in advance:)

Share this post


Link to post
Share on other sites
Advertisement
When rendering in 3D, the resolution doesn't come into play, at least not directly. Rendering the same scene in 2 different resolution would look pretty much the same, except for the higher quality on the higher resolution one.

This isn't really a major problem in 3D.

If you're still interested in setting the Render Target, you can use
Device->SetRenderTarget() to do so.

You'll need to create the surface with the RENDERTARGET flag, so you can set it as a render target.

You might also have to change the Depth Stencil buffer, if you're using it. You do that with:
Device->SetDepthStencil(), and you must use a surface bigger than the render target.

For more info, read up on the two functions in the SDK Documentation. Theres a lot of info there.

Share this post


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

  • Advertisement