SDLPP: Don't save textures before render

Since textures should only be manipulated in the main thread (as well
as rendering), let programmers deal with ensuring the texture is
available during rendercopy
This commit is contained in:
2021-01-31 15:56:47 +01:00
parent 392bc4f203
commit f92a94ef01
3 changed files with 2 additions and 7 deletions
+1 -3
View File
@@ -120,10 +120,8 @@ void Scene::renderScene( bool clear_renderer ) {
if ( background && background->getTexturePtr() )
SDL_RenderCopy( renderer->getRendererPtr(), background->getTexturePtr(),
NULL, NULL );
for ( const auto &x : render_objects ) {
x->saveCurTexture();
for ( const auto &x : render_objects )
x->render();
}
}
void Scene::presentScene() {
SDL_RenderPresent( renderer->getRendererPtr() );