예제 #1
0
void emit_sampler_state_declarations( const TList< wrSamplerState >& samplerStates, mxTextWriter & tw )
{
	for( UINT iSamplerState = 0;
		iSamplerState < samplerStates.Num();
		iSamplerState++ )
	{
		const wrSamplerState& samplerState = samplerStates[ iSamplerState ];
		tw	<< MXC("extern SamplerState samplerState_") << samplerState.name << MXC(";");
		emit_source_location_comment( samplerState.pos, tw );
	}
}
예제 #2
0
void emit_render_target_declarations( const TList< wrRenderTarget >& renderTargets, mxTextWriter & tw )
{
	for( UINT iRenderTarget = 0;
		iRenderTarget < renderTargets.Num();
		iRenderTarget++ )
	{
		const wrRenderTarget& renderTarget = renderTargets[ iRenderTarget ];
		tw	<< MXC("extern RenderTarget renderTarget_") << renderTarget.name << MXC(";");
		emit_source_location_comment( renderTarget.pos, tw );
	}
}
예제 #3
0
void emit_depth_stencil_states_declarations( const TList< wrDepthStencilState >& depthStencilStates, mxTextWriter & tw )
{
	for( UINT iDepthStencilState = 0;
		iDepthStencilState < depthStencilStates.Num();
		iDepthStencilState++ )
	{
		const wrDepthStencilState& depthStencilState = depthStencilStates[ iDepthStencilState ];
		tw	<< MXC("extern DepthStencilState depthStencilState_") << depthStencilState.name << MXC(";");
		emit_source_location_comment( depthStencilState.pos, tw );
	}
}
예제 #4
0
void emit_initialize_depth_stencil_states( const TList< wrDepthStencilState >& depthStencilStates, mxTextWriter & tw )
{
	tw	<< MXC("void SetupDepthStencilStates( const SHADER_LIB_CREATE& creationParams )\n{\n")
		<< MXC("D3D11_DEPTH_STENCIL_DESC depthStencilDesc;\n")
		<< MXC("ZERO_OUT( depthStencilDesc );\n")
		;
	for( UINT iDepthStencilState = 0;
		iDepthStencilState < depthStencilStates.Num();
		iDepthStencilState++ )
	{
		const wrDepthStencilState& depthStencilState = depthStencilStates[ iDepthStencilState ];
		GenDepthStencilStateInit( depthStencilState, tw );
	}
	tw << MXC("\n}//SetupDepthStencilStates\n");
}
예제 #5
0
void Emit_initialize_sampler_states( const TList< wrSamplerState >& samplerStates, mxTextWriter & tw )
{
	tw	<< MXC("void SetupSamplerStates( const SHADER_LIB_CREATE& creationParams )\n{\n")
		<< MXC("D3D11_SAMPLER_DESC samplerDesc;\n")
		<< MXC("ZERO_OUT( samplerDesc );\n")
		;
	for( UINT iSamplerState = 0;
		iSamplerState < samplerStates.Num();
		iSamplerState++ )
	{
		const wrSamplerState& samplerState = samplerStates[ iSamplerState ];
		Emit_initialize_sampler_state( samplerState, tw );
	}
	tw << MXC("\n}//SetupSamplerStates\n");
}
예제 #6
0
void Emit_initialize_render_targets( const TList< wrRenderTarget >& renderTargets, mxTextWriter & tw )
{
	tw	<< MXC("void SetupRenderTargets( const SHADER_LIB_CREATE& creationParams )\n{\n")
		<< MXC("D3D11_TEXTURE2D_DESC texDesc;\n")
		<< MXC("D3D11_RENDER_TARGET_VIEW_DESC rtvDesc;\n")
		<< MXC("D3D11_SHADER_RESOURCE_VIEW_DESC srvDesc;\n")
		<< MXC("ZERO_OUT( texDesc );\n")
		<< MXC("ZERO_OUT( rtvDesc );\n")
		<< MXC("ZERO_OUT( srvDesc );\n")
		;
	for( UINT iRenderTarget = 0;
		iRenderTarget < renderTargets.Num();
		iRenderTarget++ )
	{
		const wrRenderTarget& renderTarget = renderTargets[ iRenderTarget ];
		Emit_initialize_render_target( renderTarget, tw );
	}
	tw << MXC("\n}//SetupRenderTargets\n");
}