Exemple #1
0
	void D3D11EffectMaterial::SetVectorByName(const char* szName, const math::Vector3& v)
	{
		ID3DX11EffectVariable* pVal = m_pEffect->GetVariableByName(szName);
		pVal->AsVector()->SetFloatVector(v.v);

		//m_pEffect->GetVariableByName(szName)->AsScalar()->SetFloatArray(v.v, 0, 3);
	}
Exemple #2
0
	void D3D11EffectMaterial::SetVectorBySemantic(const char* szName, const math::Vector2& v)
	{
		ID3DX11EffectVariable* pVal = m_pEffect->GetVariableBySemantic(szName);
		if(pVal)
		{
			pVal->AsVector()->SetFloatVector(v.v);
		}
	}