mirror of https://github.com/bjornbytes/lovr.git
Fix Canvas flushing;
This commit is contained in:
parent
9f0826e3b7
commit
a3b791a7e7
|
@ -422,6 +422,9 @@ Canvas* lovrGraphicsGetCanvas() {
|
|||
|
||||
void lovrGraphicsSetCanvas(Canvas* canvas) {
|
||||
if (state.canvas && canvas != state.canvas) {
|
||||
// The canvas must be flushed because if someone uses its textures to do a draw there is no way
|
||||
// to know that using that Texture requires the Canvas' batches to be flushed.
|
||||
lovrGraphicsFlushCanvas(state.canvas);
|
||||
lovrCanvasResolve(state.canvas);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue