A
A
Andy Voz2015-10-20 11:06:06
Java
Andy Voz, 2015-10-20 11:06:06

What are the strange fps drops in programs written in Processing?

I took up writing my toy, and as a framework I chose the Java-based Processing language. In general, straight to the point. When rendering large objects that overlap each other, the FPS drops catastrophically, in my game ellipses act as such objects. For clarity, I threw in a small program line (Resizing - wheel):
https://www.dropbox.com/s/hgtdyug1sk8yj5j/lib.7z?dl=0
Maybe someone has come across this and knows why this happens?
And separate source code:

float scale = 1;
void setup(){
  size(800,600);
}
void draw(){
  background(0,0,0);
  for(int i=0;i<120;i++){
    fill(255,255,255,130-i);
    ellipse(400,300,i*scale,i*scale);
  }
  textSize(20);
  fill(255);
  text("FPS: "+(int)frameRate, width - 100,30);
}

void mouseWheel(MouseEvent me){ 
  if(scale > 0.5 && scale < 4){
    scale+=-me.getCount()*0.2;
  } else{
    if(scale <= 0.5){
      if(me.getCount() == -1){
        scale+=-me.getCount()*0.2;
      }
    } else{
      if(me.getCount() == 1){
        scale+=-me.getCount()*0.2;
      }
    }
  }   
}

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Neonoviiwolf, 2015-10-20
@AndreyVoznyk

Do you have a percent or vidyukha processing graphics?

C
Curly Brace, 2015-10-20
@stasuss

translucency hike

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question