Fix flicker output when recording chromosomes. Full screen recording still buggy.
This commit is contained in:
parent
ee03c2cac6
commit
ef5929a851
1 changed files with 2 additions and 1 deletions
|
|
@ -375,10 +375,11 @@ void ScreenGenerations::takeSnapshot(bool manual)
|
|||
sf::Texture tex;
|
||||
sf::Vector2u size = this->control->window.getSize();
|
||||
tex.create(size.x, size.y);
|
||||
tex.update(this->control->window);
|
||||
tex.update(this->control->window); // TODO: redraw screen before this!?
|
||||
tex.copyToImage().saveToFile(filename);
|
||||
} else {
|
||||
// chromosome only
|
||||
Control::fitness->render(Control::generation->individuals[0].chromosome);
|
||||
Control::fitness->saveChromosome(filename);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue