//-----------------------------------------------------------------------------
void CPUTRenderStateBlockDX11::SetRenderStates( CPUTRenderParameters &renderParams )
{
    ID3D11DeviceContext *pContext = ((CPUTRenderParametersDX*)&renderParams)->mpContext;

    pContext->OMSetBlendState( mpBlendState, mStateDesc.BlendFactor, mStateDesc.SampleMask );
    pContext->OMSetDepthStencilState( mpDepthStencilState, 0 ); // TODO: read stecil ref from config file
    pContext->RSSetState( mpRasterizerState );
    pContext->PSSetSamplers( 0, mNumSamplers, mpSamplerState );
    pContext->VSSetSamplers( 0, mNumSamplers, mpSamplerState );
    pContext->GSSetSamplers( 0, mNumSamplers, mpSamplerState );
} // CPUTRenderStateBlockDX11::SetRenderState()
Пример #2
0
		virtual	void	Apply(uint32 iStage, bool bVS, bool bGS, bool bTessellation)
		{
			ID3D11DeviceContext* pDC = g_pRenderSys->GetDeviceContext();
			pDC->PSSetSamplers(iStage, 1, &m_pSamp);

			if (bVS)
			{
				pDC->VSSetSamplers(iStage, 1, &m_pSamp);
			}
			if (bGS)
			{
				pDC->GSSetSamplers(iStage, 1, &m_pSamp);
			}
			if (bTessellation)
			{
				pDC->HSSetSamplers(iStage, 1, &m_pSamp);
				pDC->DSSetSamplers(iStage, 1, &m_pSamp);
			}
		}