mirror of
https://github.com/processing/processing4.git
synced 2026-02-12 01:50:44 +01:00
disables v-sync when setting framerate to more than 60fps
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user