Skip to content

CF_TextureParams

Category: graphics
GitHub: cute_graphics.h


A collection of parameters to create a CF_Texture with cf_make_texture.

Struct Members Description
CF_PixelFormat pixel_format The pixel format for this texture's data. See CF_PixelFormat.
CF_TextureUsageFlags usage The memory access pattern for this texture on the GPU. See CF_TextureUsageBits.
CF_Filter filter The filtering operation to use when fetching data out of the texture, on the GPU. See CF_Filter.
CF_WrapMode wrap_u The texture wrapping behavior when addressing beyond [0,1) for the u-coordinate. See CF_WrapMode.
CF_WrapMode wrap_v The texture wrapping behavior when addressing beyond [0,1) for the v-coordinate. See CF_WrapMode.
CF_MipFilter mip_filter The filtering operation to use when fetching data out of a mipmap, on the GPU. See CF_MipFilter.
int width Number of elements (usually pixels) along the width of the texture.
int height Number of elements (usually pixels) along the height of the texture.
int mip_count 0 = auto compute from dimensions if generate_mipmaps is true, else specify an explicit number.
bool generate_mipmaps Defaulted to false, true to enable mipmap generation and will be initialized with full mipmaps.
float mip_lod_bias Mipmap level bias; positive = blurrier, negative = sharper.
float max_anisotropy Maximum anisotropy level; 1.0 disables anisotropic filtering.
bool stream Set this to true if you plan to update the texture contents each frame.

Remarks

You may get a set of good default values by calling cf_texture_defaults.

cf_texture_update
cf_texture_defaults
CF_Texture
cf_make_texture
cf_destroy_texture