|
⇤ ← Revision 1 as of 2009-11-19 17:56:49
Size: 1002
Comment: create page, add content
|
Size: 998
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 12: | Line 12: |
| SDL_Surface* surface) | SDL_Surface* surface) |
SDL_CreateTextureFromSurface
Use this function to create a texture from an existing surface.
Contents
Syntax
SDL_TextureID SDL_CreateTextureFromSurface(Uint32 format,
SDL_Surface* surface)
Function Parameters
format |
the format of the texture, or 0 to pick an appropriate format |
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.
