示例#1
0
	implementation(const safe_ptr<ogl_device>& ogl)
		: ogl_(ogl)
		, shader_(ogl_->invoke([&]{return get_image_shader(*ogl, blend_modes_, post_processing_);}))
		, supports_texture_barrier_(glTextureBarrierNV != 0)
	{
		if (!supports_texture_barrier_)
			CASPAR_LOG(warning) << L"[image_mixer] TextureBarrierNV not supported. Post processing will not be available";
	}
示例#2
0
	const boost::iterator_range<const uint8_t*> image_data()
	{
		{
			tbb::mutex::scoped_lock lock(mutex_);

			if(!image_data_->data())
			{
				image_data_.get()->wait(*ogl_);
				ogl_->invoke([=]{image_data_.get()->map();}, high_priority);
			}
		}

		auto ptr = static_cast<const uint8_t*>(image_data_->data());
		return boost::iterator_range<const uint8_t*>(ptr, ptr + image_data_->size());
	}