Jump to content
  • Advertisement
Sign in to follow this  
DavidNash

Issues with D3D9 texture management

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

I am making an editor, I know D3D 11 is already available etc however I want to use D3D9 to maintain backwards compatibility.

Basically the problem with creating a graphical viewport using D3D9 is that to effectively resize without reloading all the resources the D3DPOOL_MANAGED resource pool is very useful, however it maintains a copy of the resources in system memory ...

I want to load the resources to Graphics memory and avoid leaving a copy in system memory for optimization reasons. I several plans ...

a) trying something like creating a very large back buffer and not recreating the device when the d3d9 pane is resized ... this has the problem that I don't have accurate pixels and the behaviour of the screen is more unpredictable.

b) using virtual memory to store the textures and meshes and then on resize simply re-creating the resources with a D3DPOOL_DEFAULT setting for the resource creation.

c) Simply using the D3DPOOL_MANAGED and using compressed meshes and textures ...

if there is a solution in later versions of D3D I would definitely try to support them if available on the system .

Any help is appreciated.

Share this post


Link to post
Share on other sites
Advertisement
a) You don't have to create very large one, just highest resolution. However I'm not sure how to handle that for fullscreen mode.
b) and c) are pretty much the same. You'll end up remaking [color=#282828][font=helvetica, arial, verdana, tahoma, sans-serif]

D3DPOOL_MANAGED.

[/font]

What's wrong with reloading everything from disk? If your data is baked it won't take long.

Share this post


Link to post
Share on other sites
You could create your device with a 1x1 pixel backbuffer initially, and then create a new swap chain with IDirect3DDevice9::CreateAdditionalSwapChain(). Then, when the window is resized, you can re-create the swap chain without having to Reset() the device.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!