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 🔒