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
{\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