]> git.sesse.net Git - casparcg/blobdiff - core/mixer/image/image_kernel.cpp
2.0. - image_mixer: Fixed bug where amongst others mixing to alpha did not work.
[casparcg] / core / mixer / image / image_kernel.cpp
index 1e3722762e385e471b99fb1e44721e1da729b070..31e7440ff76101ef0904ebd2fc446821b26ecb8a 100644 (file)
@@ -77,6 +77,12 @@ struct image_kernel::implementation : boost::noncopyable
                if(item.transform.get_opacity() < epsilon)\r
                        return;\r
                \r
+               if(!std::all_of(item.textures.begin(), item.textures.end(), std::mem_fn(&device_buffer::ready)))\r
+               {\r
+                       CASPAR_LOG(warning) << L"[image_mixer] Performance warning. Host to device transfer not complete, GPU will be stalled";\r
+                       ogl.yield(); // Try to give it some more time.\r
+               }               \r
+               \r
                // Bind textures\r
 \r
                for(size_t n = 0; n < item.textures.size(); ++n)\r
@@ -167,7 +173,7 @@ struct image_kernel::implementation : boost::noncopyable
                \r
                ogl.viewport(0, 0, background->width(), background->height());\r
 \r
-               GL(glColor4d(item.transform.get_gain(), item.transform.get_gain(), item.transform.get_gain(), item.transform.get_opacity()));\r
+               GL(glColor4d(item.transform.get_gain(), item.transform.get_gain(), item.transform.get_gain(), item.transform.get_is_key() ? 1.0 : item.transform.get_opacity()));\r
                                                \r
                auto m_p = item.transform.get_clip_translation();\r
                auto m_s = item.transform.get_clip_scale();\r