当前位置: 首页>>代码示例>>C++>>正文


C++ Pipeline::ApplyPipelineResources方法代码示例

本文整理汇总了C++中Pipeline::ApplyPipelineResources方法的典型用法代码示例。如果您正苦于以下问题:C++ Pipeline::ApplyPipelineResources方法的具体用法?C++ Pipeline::ApplyPipelineResources怎么用?C++ Pipeline::ApplyPipelineResources使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Pipeline的用法示例。


在下文中一共展示了Pipeline::ApplyPipelineResources方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Begin

void Composite::Begin( Renderer *renderer ) {
	Pipeline *pipeline = renderer->immediate_pipeline();
	
	// TODO Need to look at this more carefully since we need to integrate deferred contexts. Will the deferred context remove all the binded stuff or will it not?
	//std::cout << "Executing composite: " << *this << std::endl;

	// For now, all composite are done on the immediate context.
	// TODO Look into how this will work across different deferred context

	// Grab inputs and bind them
	for (InputEntry entry : inputs_) {
		entry.second->Bind(pipeline);
	}

	// Are there any outputs?
	if (outputs_.size()) {
		// Grab output targets and bind them
		for (OutputEntry entry : outputs_) {
			// We don't want to rebind an input_output since we've already done it in the input entry loop
			if (entry.second->type() != OutputChannel::TYPE_INPUT_OUTPUT) {
				entry.second->Bind(pipeline);
			}
		}
	} else {
		// Set the default output targets
		pipeline->output_merger_stage()->desired().set_render_target_view(0, renderer->render_target_view());		
		pipeline->output_merger_stage()->desired().set_depth_stencil_view(&renderer->depth_stencil_view());
	}

	// TODO figure out how to cleanly handle the render targets between composites!!

	if (!pipeline->output_merger_stage()->desired().render_target_view(0)) {
		pipeline->output_merger_stage()->desired().set_render_target_view(0, renderer->render_target_view());		
	}

	// Apply the new pipeline states
	pipeline->ApplyPipelineResources();
	pipeline->ApplyRenderTargets();
	
}
开发者ID:davidhuynh,项目名称:ludi,代码行数:40,代码来源:Composite.cpp


注:本文中的Pipeline::ApplyPipelineResources方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。