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

Texture update requiring encoder flush not obvious #291

Open
werner291 opened this issue Mar 1, 2021 · 0 comments
Open

Texture update requiring encoder flush not obvious #291

werner291 opened this issue Mar 1, 2021 · 0 comments

Comments

@werner291
Copy link

werner291 commented Mar 1, 2021

Hello,

I was trying to use G2dTexture::update to attempt to stream an animation to the window, but nothing was happening. Method call returned Ok, and there were no subequent errors or warnings.

After some time debugging, it turned out that I needed to flush the texture context's encoder (from PistonWindow::create_texture_context), where the device parameter is the device from PistonWindow.

This is not obvious, especially for a user who does not know about buffers and flushing, and just wants to put pixels on the screen.

Would it be possible to at least document on G2dTexture::update that the encoder needs to be flushed? Or somehow produce a warning or an error if the user never flushes the buffer? (Though that might be hard without making breaking changes.)

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