Locking Textures and Getting Descriptions

Just like the vertex and index buffers earlier, each of the texture types also has a locking mechanism, and a way to determine the features it uses. In addition to these methods, textures also have two new features that the geometry resources do not: namely, dirty regions and a “backing” object. Before we get into those, let's explore the locking mechanism for textures.

The locking mechanism for textures is remarkably similar to locking our geometry buffers, with two differences. The first is the lock calls take in a “level” parameter, which is naturally the mipmap level you wish to perform this lock operation on. The second is the rectangle (or box for volume textures) you wish to perform the lock on. ...

Get Managed DirectX® 9 Kick Start: Graphics and Game Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.