Wiki Page Content

Differences between revisions 2 and 3
Revision 2 as of 2009-11-24 06:59:50
Size: 998
Editor: SheenaSmith
Comment:
Revision 3 as of 2009-11-24 07:01:42
Size: 1066
Editor: SheenaSmith
Comment:
Deletions are marked like this. Additions are marked like this.
Line 16: Line 16:
||'''format'''||the format of the texture, or 0 to pick an appropriate format|| ||'''format'''||one of the enumerated values in [[SDL_PixelFormatEnum]], or 0 to pick an appropriate format; see [[#Remarks|Remarks]] for details||

SDL_CreateTextureFromSurface

Use this function to create a texture from an existing surface.

Syntax

SDL_TextureID SDL_CreateTextureFromSurface(Uint32       format,
                                           SDL_Surface* surface)

Function Parameters

format

one of the enumerated values in SDL_PixelFormatEnum, or 0 to pick an appropriate format; see Remarks for details

surface

the surface containing pixel data used to fill the texture

Return Value

The created texture is returned, or 0 if no rendering context was active, the format was unsupported, or the surface width or height were out of range; call SDL_GetError() for more information.

Code Examples

You can add your code example here

Remarks

The surface is not modified or freed by this function.

None: SDL_CreateTextureFromSurface (last edited 2017-08-11 23:59:53 by ChliHug)

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