Warning: This site is under construction, most links will be broken.
LightX API -> lxgfx -> locksurface
Last modified on Mon, 9th Apr 2007 at 14:46 UTC by zippletlxgfx.locksurface
procedure locksurface(
surface: tlxhandle
);
Lock a lightX surface allowing direct buffer manipulation. You do not need to lock surfaces when you draw on them using any graphics methods in the lxgfx class, as it is done automatically when required by the rendering engine. This call is only used if you would like to directly manipulate the image data in the buffer.
Pointers to buffers in the surface are invalid until the surface is locked.
Do not forget to unlock the surface later! Forgetting to unlock surfaces will cause unpredictable behaviour and may even lock up the computer in some circumstances depending on the rendering engine (for example, DirectDraw will take the Win16Mutex and prevent the computer from doing anything else if you are running Windows 98 and you lock the primary surface - lightX cannot prevent this).
You should not use any of the rendering functions with a locked surface. Unlock the surface first or behaviour will be unpredictable. In debug mode, LightX will display warnings (surface already locked) while using the software rendering engine if you use rendering functions on a locked surface.
In the event of an error in LightX that requires the program to terminate, LightX will automatically unlock all surfaces.
surface: tlxhandle
The surface to lock.
Class: lxgfx