Skip to content

cf_texture_update_mip

Category: graphics
GitHub: cute_graphics.h


Updates the contents of a specific mip level of a CF_Texture.

void cf_texture_update_mip(CF_Texture texture, void* data, int size, int mip_level);
Parameters Description
texture The texture to update.
data Pointer to the raw pixel data to upload.
size Size in bytes of data.
mip_level The mipmap level to update (0 = base level).

Remarks

If you update the texture frequently (e.g., once per frame), it's recommended to set stream = true when creating the texture using CF_TextureParams.

CF_TextureParams
CF_Texture
cf_make_texture
cf_destroy_texture
cf_texture_update
cf_generate_mipmaps