Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
SDL_LockSurface(3)
Edit
PageHistory
Diff
Info
LikePages
SDL_!LockSurface !!!SDL_!LockSurface NAME SYNOPSIS DESCRIPTION RETURN VALUE SEE ALSO ---- !!NAME SDL_!LockSurface- Lock a surface for directly access. !!SYNOPSIS __#include __ __int SDL_!LockSurface__(__SDL_Surface *surface__); !!DESCRIPTION __SDL_!LockSurface__ sets up a surface for directly accessing the pixels. Between calls to __SDL_!LockSurface__ and __SDL_!UnlockSurface__, you can write to and read from __surface-__, using the pixel format stored in __surface-__. Once you are done accessing the surface, you should use __SDL_!UnlockSurface__ to release it. Not all surfaces require locking. If __SDL_MUSTLOCK__(__surface__) evaluates to __0__, then you can read and write to the surface at any time, and the pixel format of the surface will not change. No operating system or library calls should be made between lock/unlock pairs, as critical system locks may be held during this time. It should be noted, that since SDL 1.1.8 surface locks are recursive. This means that you can lock a surface multiple times, but each lock must have a match unlock. . . SDL_!LockSurface( surface ); . /* Surface is locked */ /* Direct pixel access on surface here */ . SDL_!LockSurface( surface ); . /* More direct pixel access on surface */ . SDL_!UnlockSurface( surface ); /* Surface is still locked */ /* Note: Is versions !!RETURN VALUE __SDL_!LockSurface__ returns __0__, or __-1__ if the surface couldn't be locked. !!SEE ALSO __SDL_!UnlockSurface__ ----
One page links to
SDL_LockSurface(3)
:
SDLManPages
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.