Like texture_load_from_file, for an image that is already in memory.
- texture: gets the pixels.
- memory: the bytes of an image file.
- srgb: says the pixels are sRGB-encoded, which is what most image files hold, so they are converted to linear when sampled.
- build_mipmaps: also makes the half-size levels, so the image looks smooth when drawn small.
texture_load_from_memory :: (
texture: *Texture,
memory: [] u8,
srgb := false,
build_mipmaps := false
) -> bool
Like texture_load_from_file, for an image that is already in memory.
Parameters
- texture: *Texture
- gets the pixels.
- memory: [] u8
- the bytes of an image file.
- srgb := false
- says the pixels are sRGB-encoded, which is what most image files hold, so they are converted to linear when sampled.
- build_mipmaps := false
- also makes the half-size levels, so the image looks smooth when drawn small.
Returns
- bool