File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
core/src/processing/opengl Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -626,13 +626,15 @@ protected void allocate() {
626
626
public void dispose () { // PGraphics
627
627
super .dispose ();
628
628
629
- // Swap buffers the end to make sure that no
630
- // garbage is shown on the screen, this particularly
631
- // affects non-interactive sketches on windows that
632
- // render only 1 frame, so no enough rendering
633
- // iterations have been conducted so far to properly
634
- // initialize all the buffers.
635
- pgl .swapBuffers ();
629
+ if (primarySurface ) {
630
+ // Swap buffers the end to make sure that no
631
+ // garbage is shown on the screen, this particularly
632
+ // affects non-interactive sketches on windows that
633
+ // render only 1 frame, so no enough rendering
634
+ // iterations have been conducted so far to properly
635
+ // initialize all the buffers.
636
+ pgl .swapBuffers ();
637
+ }
636
638
637
639
deletePolyBuffers ();
638
640
deleteLineBuffers ();
You can’t perform that action at this time.
0 commit comments