Is render_to_texture without clearing possible? Bug?
Hi, I tried to render drawings to texture (not to window) using code from example draw_capture_hi_res.rs - but I need to render another frame on top of previous frame (with no clearing). It is perfectly possible to do this in main draw function (just if you remove the draw.background() call you can render frames without clearing).
I thought it should be possible with rendering to texture but it results with black texture no matter what... Even some other shapes drawn in main window on top of that faulty texture becomes black.
You can reproduce the problem by commenting out line 103 of draw_capture_hi_res.rs example and you will get transparent output images instead of rendered drawings.
Is it a bug or I can achieve needed behaviour another way? Thanks!
Hello, anyone here? ;)
Perhaps your blend mode isn't set -- do you have a code sample? Commenting out line 103 is a different situation since it's the main framebuffer and is hardcoded to not be cleared.
Perhaps you can try not having a draw.background() for the main framebuffer. Then for the texture, ensure it is cleared with a transparent alpha channel and drawn with an appropriate blend mode.