Example #1
0
	/**
	* Initialize the input layout given the current description
	* @param
	*	const RenderDevice& The render device used to create
	* @param
	*	ID3D10Blob* The target shader for this input layout
	* @return
	*	bool Returns true if successful
	*/
	bool InputLayout::Initialize(const RenderDevice& device, ID3D10Blob* targetShader)
	{
		// Get the layout description
		D3D11_INPUT_ELEMENT_DESC* layoutDescription = GetInputLayoutDesc();

		// Initialize the layout
		HRESULT result = device.GetD3DDevice()->CreateInputLayout(layoutDescription, _parameters.size(), targetShader->GetBufferPointer(), targetShader->GetBufferSize(), &_inputLayout);
		return SUCCEEDED(result);
	}