]> git.sesse.net Git - casparcg/commitdiff
2.0. Added ogl device check for swap validation.
authorronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Fri, 29 Jul 2011 12:21:21 +0000 (12:21 +0000)
committerronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Fri, 29 Jul 2011 12:21:21 +0000 (12:21 +0000)
git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches/2.0.0.2@1014 362d55ac-95cf-4e76-9f9a-cbaa9c17b72d

core/producer/stage.cpp

index 76f1f5dee7adbed4cfbe66cc64b73851d2eae2ff..5796d0bc96654d953be7926d6b9f13bfa14b359d 100644 (file)
@@ -169,8 +169,8 @@ public:
                        swap_layer(index, other_index);\r
                else\r
                {\r
-                       if(channel_.get_format_desc() != other.impl_->channel_.get_format_desc())\r
-                               BOOST_THROW_EXCEPTION(not_supported() << msg_info("Cannot swap between channels with different formats."));\r
+                       if(channel_.get_format_desc() != other.impl_->channel_.get_format_desc() || &channel_.ogl() != &other.impl_->channel_.ogl())\r
+                               BOOST_THROW_EXCEPTION(not_supported() << msg_info("Cannot swap between incompatible channels."));\r
 \r
                        auto func = [&]{layers_[index].swap(other.impl_->layers_[other_index]);};\r
                \r
@@ -182,9 +182,9 @@ public:
        {\r
                if(other.impl_.get() == this)\r
                        return;\r
-\r
-               if(channel_.get_format_desc() != other.impl_->channel_.get_format_desc())\r
-                       BOOST_THROW_EXCEPTION(not_supported() << msg_info("Cannot swap between channels with different formats."));\r
+               \r
+               if(channel_.get_format_desc() != other.impl_->channel_.get_format_desc() || &channel_.ogl() != &other.impl_->channel_.ogl())\r
+                       BOOST_THROW_EXCEPTION(not_supported() << msg_info("Cannot swap between incompatible channels."));\r
 \r
                auto func = [&]\r
                {\r