Added locking and unlocking for textures, vertex and index buffers.
Changed type for type mask