This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float rand(vec2 co){ | |
return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for(vector<bloomPop>::iterator it = bloomPool.begin(); it != bloomPool.end();){ // loop through vector with iterator | |
it->update(); // update all objects in vector | |
if(it->time < 0){ /// if condition matches... | |
it = bloomPool.erase(it); // ..go to hell.. | |
}else{ | |
++it; // ..or keep counting and continue! | |
} | |
} |
NewerOlder