Skip to content

Setting custom textures #130

Answered by emilk
chrisboyce asked this question in Q&A
Jan 21, 2021 · 1 comments · 4 replies
Discussion options

You must be logged in to vote

You use the tex_allocator() method in epi::Frame: https://docs.rs/epi/0.8.0/epi/struct.Frame.html#method.tex_allocator

let tex_allocator = frame.tex_allocator().unwrap();
let texture_id = tex_allocator.alloc_srgba_premultiplied(size, pixels);

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@lucasw
Comment options

@emilk
Comment options

@vojty
Comment options

@emilk
Comment options

Answer selected by chrisboyce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants