Go to main content

man pages section 3: Library Interfaces and Headers

Exit Print View

Updated: Thursday, June 13, 2019
 
 

SDL_ConvertSurface (3)

Name

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

Synopsis

#include "SDL/SDL.h"

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

Description

SDL_ConvertSurface(3)          SDL API Reference         SDL_ConvertSurface(3)



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

SYNOPSIS
       #include "SDL/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.

       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.


ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       +---------------+------------------+
       |ATTRIBUTE TYPE | ATTRIBUTE VALUE  |
       +---------------+------------------+
       |Availability   | library/sdl      |
       +---------------+------------------+
       |Stability      | Volatile         |
       +---------------+------------------+
SEE ALSO
       SDL_CreateRGBSurface, SDL_DisplayFormat, SDL_PixelFormat, SDL_Surface



NOTES
       This     software     was    built    from    source    available    at
       https://github.com/oracle/solaris-userland.   The  original   community
       source        was        downloaded        from        https://www.lib-
       sdl.org/release/SDL-1.2.15.tar.gz

       Further information about this software can be found on the open source
       community website at https://www.libsdl.org/.



SDL                         Tue 11 Sep 2001, 23:01       SDL_ConvertSurface(3)