public static HRESULT CreateRootSignature(ID3D12Device *device, [NativeTypeName("const D3D12_ROOT_SIGNATURE_DESC *")] D3D12_ROOT_SIGNATURE_DESC *rootSignatureDesc, ID3D12RootSignature **rootSignature) { using ComPtr <ID3DBlob> pSignature = new ComPtr <ID3DBlob>(); using ComPtr <ID3DBlob> pError = new ComPtr <ID3DBlob>(); HRESULT hr = D3D12SerializeRootSignature(rootSignatureDesc, D3D_ROOT_SIGNATURE_VERSION_1, pSignature.GetAddressOf(), pError.GetAddressOf()); if (SUCCEEDED(hr)) { hr = device->CreateRootSignature(0, pSignature.Get()->GetBufferPointer(), pSignature.Get()->GetBufferSize(), __uuidof <ID3D12RootSignature>(), (void **)rootSignature); } return(hr); }
public static extern HRESULT D3D12SerializeRootSignature([NativeTypeName("const D3D12_ROOT_SIGNATURE_DESC *")] D3D12_ROOT_SIGNATURE_DESC *pRootSignature, D3D_ROOT_SIGNATURE_VERSION Version, ID3DBlob **ppBlob, ID3DBlob **ppErrorBlob);
public static extern HRESULT SerializeRootSignature( [In] D3D12_ROOT_SIGNATURE_DESC *pRootSignature, [In] D3D_ROOT_SIGNATURE_VERSION Version, [Out] ID3DBlob **ppBlob, [Out, Optional] ID3DBlob **ppErrorBlob );