How is a lock level used

Started by
1 comment, last by LilithAnn 15 years, 11 months ago
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.
Ŀ
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.
Hmmm. That simple, eh?

My gratitude.
Lilith
Ŀ

This topic is closed to new replies.

Advertisement