PImage frame rate behaviour
in
Programming Questions
•
5 months ago
Hi all !
I noticed a weird thing:
I have an image player displaying PImage. when the image is half displayed, the framerate is about 60 fps.
When the image is full-displayed at the center of the screen, the framerate is about 40 fps !!
I would like to understand why ? wouldn't it be possible to have a stable (60fps ;-) ) framerate ?
here's a code which demonstrates the thing:
I noticed a weird thing:
I have an image player displaying PImage. when the image is half displayed, the framerate is about 60 fps.
When the image is full-displayed at the center of the screen, the framerate is about 40 fps !!
I would like to understand why ? wouldn't it be possible to have a stable (60fps ;-) ) framerate ?
here's a code which demonstrates the thing:
- PImage img;
float pos;
void setup()
{
size(1280, 800);
img = loadImage("http://blabla-mic-lola.com/images/page_perso/gd_blabla_10.jpg");
pos = width;
}
void draw()
{
background(0);
pos-=3;
if (pos <-500) pos = width;
image(img, pos, 0, 500, height);
println(frameRate);
}
thanks in advance !!
1