You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.)
The text was updated successfully, but these errors were encountered:
Hello,
I was trying to use
G2dTexture::update
to attempt to stream an animation to the window, but nothing was happening. Method call returnedOk
, 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 thedevice
parameter is thedevice
fromPistonWindow
.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.)The text was updated successfully, but these errors were encountered: