mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Added restart test
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
PShape cube;
|
||||
|
||||
public void setup() {
|
||||
size(400, 400, P3D);
|
||||
|
||||
cube = createShape(BOX, 100);
|
||||
}
|
||||
|
||||
public void draw() {
|
||||
background(120);
|
||||
|
||||
lights();
|
||||
|
||||
translate(mouseX, mouseY);
|
||||
rotateX(frameCount * 0.01f);
|
||||
rotateY(frameCount * 0.01f);
|
||||
|
||||
shape(cube);
|
||||
}
|
||||
|
||||
public void keyPressed() {
|
||||
// Restarts the OpenGL surface. Automatically
|
||||
// recreates all the current GL resources.
|
||||
((PGraphicsOpenGL)g).restartPGL();
|
||||
}
|
||||
Reference in New Issue
Block a user