SDL_ConvertSurface

Name

SDL_ConvertSurface -- Converts a surface to the same format as another surface.

Synopsis

#include "SDL.h"

SDL_Surface *SDL_ConvertSurface(SDL_Surface *src, SDL_PixelFormat *fmt, Uint32 flags);

Description

Creates a new surface of the specified format, and then copies and maps the given surface to it. If this function fails, it returns NULL. It is also useful for making a copy of a surface.

The flags parameter is passed to SDL_CreateRGBSurface and has those semantics.

This function is used internally by SDL_DisplayFormat.

This function can only be called after SDL_Init.

Return Value

Returns either a pointer to the new surface, or NULL on error.

See Also

SDL_CreateRGBSurface, SDL_DisplayFormat, SDL_PixelFormat, SDL_Surface

SDL_ConvertSurface (last edited 2008-04-17 08:18:12 by localhost)