]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/commands.cpp
Clear the pipeline state through Commands
[libs/gl.git] / source / core / commands.cpp
index 2eb4659ad8e6ae0f62ecb2ec2e9aed362dc6afc3..f2c273727c7d2b5fcd7037b77f8df51c1b1f7a1e 100644 (file)
@@ -19,9 +19,11 @@ Commands::Commands():
        pipeline_state(0)
 { }
 
-void Commands::use_pipeline(const PipelineState &ps)
+void Commands::use_pipeline(const PipelineState *ps)
 {
-       pipeline_state = &ps;
+       pipeline_state = ps;
+       if(!pipeline_state)
+               PipelineState::clear();
 }
 
 void Commands::clear(const ClearValue *values)