Piston update Texture


#1

Hi,

I use the crate rscam to get frames from my webcam. Now I want to display them using Piston. It works for the initial frame with Texture::create. But after that I should update the texture instead of creating new ones every frame, right? For the update function I need a gfx::Encoder. The documentation says

The Encoder implements From, which is how it is constructed. There is no cross-API way to create a CommandBuffer, however, an API back-end should expose a function to create one in its Factory type. See the specific back-end for details on how to construct a CommandBuffer.

I think, my “specific backend” is OpenGL because I do .opengl(OpenGL::V3_2) in the PistonWindow initialization (copied from an example). How do I get that gfx::Encoder now? I’m on Linux x86_64 btw.