Closed eljeffeg closed 14 years ago
Wow, somehow I completely missed that one. One thing I noticed: When you use SoftFullScreen instead of FullScreen mode and bring another application to the foreground, the sketch runs at full speed. This might be the oddest thing I've ever seen...
Okay, this really seems to be a macos+java+opengl issue. Try this sketch in present-mode (apple+shift+r): import processing.opengl.*; import javax.media.opengl.GL;
void setup(){ size(screen.width, screen.height, OPENGL); frameRate(2000); }
void draw(){ noStroke(); fill( 0, 5 ); rect( 0, 0, width, height ); stroke(0, 255, 0); line(0, frameCount%height, width, frameCount%height ); println( frameRate ); }
it also runs just at 30fps on my computer. The profiler tell's me that 93% of all time is wasted in com.sun.opengl.impl.macosx.CGL.flushBuffer(long), but I have no idea how to fix this...
Seems to be a java+opengl issue, try this:
import processing.opengl.*;
void setup(){ size((int)screen.width, (int)screen.height, OPENGL); frameRate(2000); }
void draw(){ background(0); fill(255); ellipse(150,150,150,150); println(frameRate); }
in present mode, it will also just run at 30fps
Yes, in both the sketches you posted. The frame rate dropped to 30fps.
sorry, i double-posted because my first post didn't show up instantly for some reason. anyway, i forwarded the report to processing.org: http://dev.processing.org/bugs/show_bug.cgi?id=1425
This bug here propably won't close until the processing people fix it...
Okay, the problem is definitely fixable in processing, but there's still some work left to do for me...
It's fixed for the fullscreen-exclusive mode and you can download the temporary fixed library here if you want: http://cloud.github.com/downloads/kritzikratzi/fullscreen-p5/fullscreen-0.98.4-testing.zip
however, softfullscreen mode (which is imho much much more important) still has the same flaws...
i'm scared to close this one, but my unit tests ran fine a couple of times.
Ran fine for me too.
If you set the size of the sketch to the exact size of the screen, it decreased the framerate to 30fps. If I change it by 1 pixel it is back to normal. Also, the OpenGL command "gl.setSwapInterval(1);" seems to have no effect.
Runs at 30fps
Runs at 500fps
Runs at 500fps
Any size that is not the exact resolution of the screen. So something is going on here when the size is equal.
Example sketch: