Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.

c t o a n

Copying Textures

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

Cheers I''m trying to make a texture manager for my engine, and so far, it works great! However, when I have to make a texture procedurally (as opposed to loading it) I''ve got to copy it a few times to other textures in order to insert it in the manager properly. My problem is that I''m unable to copy the texture! Is there a way to do this (other than locking the textures, cause that doesn''t work with textures in some memory spaces) such as a D3DX function or something? Thanks Chris

Share this post

Link to post
Share on other sites
It depends what pool you are using.

If you use the DEFAULT pool, you will need a SYSTEM memory copy of it. That is, you need to allocate both one in the DEFAULT pool and one in SYSTEM pool. To write into the texture:

- Lock SYSTEM texture
- Write in first level of SYSTEM texture
- Unlock SYSTEM texture
- Call D3DXFilterTexture if needed (for mipmaping) on SYSTEM texture
- Call Update on DEFAULT texture

For MANAGED pool it''s less trouble since the driver is doing all that work for you.

Oooh, you found the horadric cube!

Share this post

Link to post
Share on other sites

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