Background image slows down sketch
in
Programming Questions
•
8 months ago
Hello,
after inserting a background image ,the
sketch tends to run much more less smoother
I read somewhere that it's because your background image is loading with every frame rate but i am not sure about that
Any form of help would be much appreciated
- void setup() {
- size(1026, 770, P3D);
- frameRate(40);
- b = loadImage("data/2.jpg");
- font = loadFont("TrebuchetMS-Italic-20.vlw");
- textFont(font);
- textMode(SCREEN);
- println(Serial.list());
- serial = new Serial(this, Serial.list()[serialPort], 115200);
- for(int i = 0; i < sen; i++) {
- n[i] = new Normalize();
- cama[i] = new MomentumAverage(.01);
- axyz[i] = new MomentumAverage(.15);
- }
- reset();
- }
- void draw() {
- background(b);
- updateSerial();
- drawBoard();
- }
Any form of help would be much appreciated
1