]> git.tdb.fi Git - libs/gl.git/commitdiff
Don't bother with RAII here
authorMikko Rasa <tdb@tdb.fi>
Sat, 3 Dec 2016 15:56:50 +0000 (17:56 +0200)
committerMikko Rasa <tdb@tdb.fi>
Sat, 3 Dec 2016 15:56:50 +0000 (17:56 +0200)
There are already RAII objects in the outer scope.

source/pipeline.cpp

index dc1eba1d117cdcca5d6b190c53b3545ed31fd86c..e468825748a640ed53cab215c6fc0ebee8c14fb3 100644 (file)
@@ -214,8 +214,8 @@ void Pipeline::render(Renderer &renderer, const Tag &tag) const
 
        if(target[0])
        {
 
        if(target[0])
        {
-               BindRestore unbind_depth_test(static_cast<DepthTest *>(0));
-               BindRestore unbind_blend(static_cast<Blend *>(0));
+               DepthTest::unbind();
+               Blend::unbind();
 
                if(samples)
                        target[0]->fbo.blit_from(target_ms->fbo, COLOR_BUFFER_BIT|DEPTH_BUFFER_BIT, false);
 
                if(samples)
                        target[0]->fbo.blit_from(target_ms->fbo, COLOR_BUFFER_BIT|DEPTH_BUFFER_BIT, false);