|
⇤ ← Revision 1 as of 2010-03-07 16:40:34
Size: 1066
Comment: create page, add content (Rev 5559)
|
Size: 1542
Comment: update content (old wiki)
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 6: | Line 6: |
| Use this function to ,,allocate and,, free an RGB surface. | Use this function to allocate and free an RGB surface. <<Color2(green,Should this be free and allocate? Does it free first? Is it freeing the surface or the resources or is that the same?)>> |
| Line 16: | Line 18: |
| ||'''surface'''||a pointer to the [[SDL_Surface]] to free|| | ||'''surface'''||^a pointer to the [[SDL_Surface]] to free^ ''--or--'' *a pointer to the surface to delete; ,,it is safe to pass NULL as surface,,, ^may be NULL^ in which case [[SDL_FreeSurface]]() will do nothing*|| |
| Line 28: | Line 30: |
| *<<BR>>Frees the resources used by a previously created [[SDL_Surface]]. If the surface was created using [[SDL_CreateRGBSurfaceFrom]]() then the pixel data is not freed.<<BR>>* |
DRAFT |
SDL_FreeSurface
Use this function to allocate and free an RGB surface.
green
Syntax
void SDL_FreeSurface(SDL_Surface* surface)
Function Parameters
surface |
a pointer to the [[SDL_Surface]] to free --or-- *a pointer to the surface to delete; it is safe to pass NULL as surface, may be NULL in which case SDL_FreeSurface() will do nothing* |
Code Examples
You can add your code example here
Remarks
You can add useful comments here
green
If the depth is 4 or 8 bits, an empty palette is allocated for the surface. If the depth is greater than 8 bits, the pixel format is set using the flags '[RGB]mask'.
*
Frees the resources used by a previously created SDL_Surface. If the surface was created using SDL_CreateRGBSurfaceFrom() then the pixel data is not freed.
*
