Module graphic

Source

Re-exportsยง

pub use renderer::SampleStrat;
pub use renderer::Transform;

Modulesยง

pixel_art ๐Ÿ”’
renderer

Structsยง

CacheKey ๐Ÿ”’
Key used to refer to an instance of a graphic that has been uploaded to the GPU.
GraphicCache
Id
PremultiplyLookupTable
TexId
TextureParameters ๐Ÿ”’
These solely determine how a place in an atlas will be found or how a texture will be created to place the image for a graphic.

Enumsยง

CachedDetails ๐Ÿ”’
Graphic
PremultiplyStrategy ๐Ÿ”’
Strategy for how alpha premultiplication will be applied to an image.
Rotation
TextureRequirements ๐Ÿ”’
Requirements that a particular graphic has with respect to the atlas allocation or independent texture it will be stored in.

Constantsยง

ATLAS_CUTOFF_FRAC ๐Ÿ”’
Images larger than this are stored in individual textures Fraction of the total graphic cache size
GRAPHIC_CACHE_RELATIVE_SIZE ๐Ÿ”’
Multiplied by current window size

Functionsยง

aabr_from_alloc_rect ๐Ÿ”’
atlas_size ๐Ÿ”’
create_atlas_texture ๐Ÿ”’
create_image ๐Ÿ”’
create_image_texture ๐Ÿ”’
This creates a texture suitable for sampling from during the UI pass and rendering too during alpha premultiplication upload passes.
fraction_shortcircuit_blocks ๐Ÿ”’
Useful to estimates cost of premultiplying alpha in the provided image via the CPU method.
premultiply_alpha ๐Ÿ”’
prepare_graphic ๐Ÿ”’
Prepare the graphic into the form that will be uploaded to the GPU.
upload_image ๐Ÿ”’