Sign in to follow this  
LilithAnn

How is a lock level used

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this