Wiki Page Content

Differences between revisions 1 and 2
Revision 1 as of 2010-02-25 21:36:57
Size: 1369
Editor: SheenaSmith
Comment: create page, add content (Rev 5540)
Revision 2 as of 2010-02-26 05:42:12
Size: 1305
Editor: SheenaSmith
Comment: removed content (deprecated)
Deletions are marked like this. Additions are marked like this.
Line 33: Line 33:
This function is used internally by [[SDL_DisplayFormat]]().

DRAFT

SDL_ConvertSurface

Use this function to create a new surface of the specified format, and then copy and map the given surface to it so the blit of the converted surface will be as fast as possible.

Syntax

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

Function Parameters

src

the surface to copy and map from

fmt

the SDL_PixelFormat to apply

flags

;see Remarks for details

Return Value

Returns the new surface, or NULL if this function fails; call SDL_GetError() for more information.

Code Examples

You can add your code example here

Remarks

The \c flags parameter is passed to SDL_CreateRGBSurface() and has those semantics. You can also pass SDL_RLEACCEL in the flags parameter and SDL will try to RLE accelerate colorkey and alpha blits in the resulting surface.


CategoryAPI, CategorySurface

None: SDL_ConvertSurface (last edited 2020-03-10 19:12:34 by ChrisBush)

(Page Info.)
Feedback
Please include your contact information if you'd like to receive a reply.
Submit