How Do I Switch Renderers?
in
Programming Questions
•
2 months ago
The code below causes a RendererChangeException--what's the proper way to display for awhile in P2D, and then in the default renderer?
- int phase = 1;
- public void setup(){
- size(200,300,P2D);
- }
- public void draw(){
- if(phase == 1 && frameCount > 100 ) {
- setupPhaseTwo();
- phase = 2;
- //draw something in P2D here
- } else if (phase == 2) {
- //draw soemthing in default renderer here
- }
- }
- void setupPhaseTwo(){
- size(200,300);
- }
1