Jump to content
  • Advertisement
Sign in to follow this  
littlekid

Texture loading and Memory

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

Everytime I create a IDirect3DTexture9*, will the loaded texture be place straight into the GPU memory, or just the normal computer RAM? Or is it that only when I set the texture in the effect and and call pEffect->Begin, or use pDevice->SetTexture() then the texture is loaded into the GPU memory from the RAM

Share this post


Link to post
Share on other sites
Advertisement
Where textures are placed depends on a few factors, most importantly, the Pool used when creating the texture. Textures created in the SystemMem pool will always be placed in the system's RAM. In most cases, textures created in the Default pool will be placed in GPU memory (though not always). Managed memory has a System Memory copy, and might have a GPU memory copy if the driver thinks it should (if it was used recently or there is memory available).

For best results, the Managed pool is recommended, unless you won't be using the texture for rendering, or you need the texture to be a Render Target.

Memory is allocated when the texture is initially created. This allows you to render without moving data around between the GPU and CPU during a frame.

Hope this helps.

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!