Move renderer clear call from MapView to system loop
This commit is contained in:
parent
d9f829f10a
commit
519119db3d
2 changed files with 2 additions and 2 deletions
|
@ -71,6 +71,8 @@ void RPGEdit::systemLoop() {
|
|||
|
||||
lastFrameTicks = SDL_GetTicks();
|
||||
|
||||
SDL_RenderClear(window->getRenderer());
|
||||
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(modelMutex);
|
||||
|
||||
|
|
|
@ -95,8 +95,6 @@ void MapView::clearEntities() {
|
|||
}
|
||||
|
||||
void MapView::render(const Model::Map *map, Model::Position<float> center, uint64_t time) {
|
||||
SDL_RenderClear(window->getRenderer());
|
||||
|
||||
std::pair<int, int> viewport = window->getViewport();
|
||||
|
||||
float pixels = std::max(viewport.first/20.0f, viewport.second/15.0f);
|
||||
|
|
Reference in a new issue