diff --git a/core/src/processing/opengl/PJOGL.java b/core/src/processing/opengl/PJOGL.java index a9005b73b..3393d9d6e 100644 --- a/core/src/processing/opengl/PJOGL.java +++ b/core/src/processing/opengl/PJOGL.java @@ -143,7 +143,7 @@ public class PJOGL extends PGL { protected GL2GL3 gl3; /** GL2 desktop functionality (blit framebuffer, map buffer range, - * multisampled renerbuffers) */ + * multisampled renderbuffers) */ protected GL2 gl2x; /** The AWT-OpenGL canvas */ @@ -226,9 +226,9 @@ public class PJOGL extends PGL { public Canvas getCanvas() { return canvas; } +*/ - @Override protected void setFps(float fps) { if (!setFps || targetFps != fps) { if (60 < fps) { @@ -243,7 +243,7 @@ public class PJOGL extends PGL { setFps = true; } } -*/ + /* @Override diff --git a/core/src/processing/opengl/PSurfaceNEWT.java b/core/src/processing/opengl/PSurfaceNEWT.java index 013aed09e..220e29c22 100644 --- a/core/src/processing/opengl/PSurfaceNEWT.java +++ b/core/src/processing/opengl/PSurfaceNEWT.java @@ -417,7 +417,12 @@ public class PSurfaceNEWT implements PSurface { } public void setFrameRate(float fps) { - animator.setFPS((int)fps); + if (animator != null) { + animator.stop(); + animator.setFPS((int)fps); + pgl.setFps(fps); + animator.start(); + } } public void requestFocus() {