[][src]Function sdl2_sys::SDL_CreateTextureFromSurface

pub unsafe extern "C" fn SDL_CreateTextureFromSurface(
    renderer: *mut SDL_Renderer,
    surface: *mut SDL_Surface
) -> *mut SDL_Texture

\brief Create a texture from an existing surface.

\param renderer The renderer. \param surface The surface containing pixel data used to fill the texture.

\return The created texture is returned, or NULL on error.

\note The surface is not modified or freed by this function.

\sa SDL_QueryTexture() \sa SDL_DestroyTexture()