Hi There,
Been thrashing at this for some time now and could really use the help.
I have an ofxPD project that runs well on an iPad 2 but sluggishly on an iPad air 2. Good on non-retina, bad on retina.
Removing antialiasing in main.mm alleviates the issue as does disabling retina, but i think this is just treating the symptoms, not the problem.
Im not sure whether the way i have formed this project is good practice or not.
The format is like this:
in ofApp:
partSys particleSystem;
in particleSystem:
vector<Particle> particles; // 1500 of these get made as circles (i resize the vector to 1500 before i create them)
vector<Bolt> bolts; //these only get created when theres an interaction
vector<Blobage> blobs; // one gets made every 600 frames and gets erased soon after
in Blobage:
vector<Shard>shards; //200 of these are made when one of the blobs gets created, again i resize the vector before i create them.
All of these (apart from particleSystem) are created, updated and drawn in for loops, the framerate lowers instantly after ofApp::setup
Im using this structure to create the particles in their vector:
void partSys::createParticle(int z) {
Particle p;
p.setup(sceneNum);
p.pos.set(ofRandom(width), ofRandom(height));
p.vel.x=ofRandom(-3,3);
p.vel.y=ofRandom(-3,3);
particles[z]=p;
}
Theres a for loop in partSys::setup which calls createParticle(int from for loop)
I setup, update and draw the particleSystem from ofApp with this style of syntax:
particleSystem.update();
Do i need to start looking into threading? or should i be wearing the dunce hat?
Any help would be hugely appreciated
Thanks
Miles