Jump to content
  • Advertisement
Sign in to follow this  
LilithAnn

How is a lock level used

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

My immersion in DirectX is relatively new, so please bear with me. I'm using DirectX 9 but my documentation is for 8. I'm looking at the locking of a texture in preparation to writing to it. One of the parameters is a locklevel for which I've used a value of zero to this point and which works fairly well. But my drawing routines may become sub-nested and so I'd like to look at this parameter to see if I might end up stepping on my own routines and if this value can be used to avoid double locking. Any help is greatly appreciate.

Share this post


Link to post
Share on other sites
Advertisement
A texture is actually just a collection of surfaces, with each surface representing a single level in the mipmap chain. When you lock a texture you specify an index to indicate which surface you'd like to access, usually you specify 0 because you want the top-level surface since it's the largest and also because most textures that you would need to read/write only have one level to begin with.

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!