Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Texture2d::write in chunks? #2016

Open
lattice0 opened this issue Jul 14, 2022 · 0 comments
Open

Texture2d::write in chunks? #2016

lattice0 opened this issue Jul 14, 2022 · 0 comments

Comments

@lattice0
Copy link

https://docs.rs/glium/latest/glium/texture/texture2d/struct.Texture2d.html#method.write only allows for writing an entire image, but on a decoded video, sometimes there are alignment strides so I have to upload in parts (or copy to a vector, which is slow).

I'm using PixelBuffer because it allows for such thing https://docs.rs/glium/latest/glium/texture/pixel_buffer/struct.PixelBuffer.html#method.as_mut_slice but I also wanted to support uploading to the texture itself without pixel buffers, because the pixel buffer approach currently is not working on Android for some reason.

Is there a way to upload to a texture2d according to a stride alignment? That is, upload in part?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant