by Kzinti » Jun 25, 2002 @ 12:57am
I selected the default value for "bDiscard" as being false. This way, if you don't know what it's for, Lock/Unlock will work as you expect it.
Basically, if bDiscard is set to true on Lock(), the content of the surface can be discarded (i.e. erased). This is really useful to save time when I load images.
The bDiscard on Unlock() is really similar. If you only lock to surface to read the pixels (read only access), there is no need to re-swizzle the temporary buffer. So you can use Unlock( true ) to save time.
Of course, when writting a plasma effect, you should use the default values (bDiscard = false).