|
Size: 1501
Comment: update formatting - enums, structs, the/an
|
Size: 695
Comment: update content - w/ Sam; remove draft
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 3: | Line 3: |
| ||<tablewidth="100%" style="color: #FF0000;" :> DRAFT|| | |
| Line 6: | Line 5: |
| Use this function to ,,allocate and,, free an RGB surface. | Use this function to free an RGB surface. |
| Line 16: | Line 15: |
| ||'''surface'''||the [[SDL_Surface]] structure ^holding resources to be freed^ ''--or--'' *,,a pointer to,, the surface to delete; ,,it is safe to pass NULL as surface, in which case,, ^if NULL^ [[SDL_FreeSurface]]() will do nothing*|| | ||'''surface'''||the [[SDL_Surface]] structure to free|| |
| Line 24: | Line 23: |
| ''You can add useful comments here'' <<Color2(green,I don't think this note applies to this function but this function was listed with the group below in the header so I'll leave it because it's easier to delete than add when editing.)>> 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'. *<<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>>* |
If the surface was created using [[SDL_CreateRGBSurfaceFrom]]() then the pixel data is not freed. |
| Line 35: | Line 30: |
| .[[SDL_SaveBMP]] .[[SDL_SaveBMP_RW]] |
SDL_FreeSurface
Use this function to free an RGB surface.
Syntax
void SDL_FreeSurface(SDL_Surface* surface)
Function Parameters
surface |
the SDL_Surface structure to free |
Code Examples
You can add your code example here
Remarks
If the surface was created using SDL_CreateRGBSurfaceFrom() then the pixel data is not freed.
