Flint Engine
Modular C++20 2D game engine powered by SDL3
Loading...
Searching...
No Matches

◆ loadFromMemory()

bool Flint::Texture::loadFromMemory ( SDL_Renderer * renderer,
const void * data,
size_t size )

Load a texture from an in-memory image file.

Decodes the image with SDL_image, creates an SDL_Texture from the resulting surface, and applies nearest-neighbor scaling.

Parameters
rendererSDL renderer to create the texture on.
dataPointer to raw image file bytes.
sizeNumber of bytes in data.
Returns
true on success.