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:
@@ -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() );
|
||||
|
||||
Reference in New Issue
Block a user