/// <summary> /// Compiles the effect10 from memory. /// </summary> /// <param name="dataRef">The data ref.</param> /// <param name="dataLength">Length of the data.</param> /// <param name="srcFileNameRef">The SRC file name ref.</param> /// <param name="definesRef">The defines ref.</param> /// <param name="includeRef">The include ref.</param> /// <param name="hlslFlags">The h LSL flags.</param> /// <param name="fxFlags">The f X flags.</param> /// <param name="compiledEffectOut">The compiled effect out.</param> /// <param name="errorsOut">The errors out.</param> /// <returns>Result code.</returns> /// <unmanaged>HRESULT D3D10CompileEffectFromMemory([In] void* pData,[In] SIZE_T DataLength,[In] const char* pSrcFileName,[In, Buffer, Optional] const D3D_SHADER_MACRO* pDefines,[In] ID3DInclude* pInclude,[In] D3DCOMPILE_SHADER_FLAGS HLSLFlags,[In] D3DCOMPILE_EFFECT_FLAGS FXFlags,[In] ID3D10Blob** ppCompiledEffect,[In] ID3D10Blob** ppErrors)</unmanaged> public static SharpDX.Result CompileEffect10FromMemory( System.IntPtr dataRef, SharpDX.PointerSize dataLength, string srcFileNameRef, SharpDX.Direct3D.ShaderMacro[] definesRef, System.IntPtr includeRef, SharpDX.D3DCompiler.ShaderFlags hlslFlags, SharpDX.D3DCompiler.EffectFlags fxFlags, out SharpDX.Direct3D.Blob compiledEffectOut, out SharpDX.Direct3D.Blob errorsOut) { unsafe { IntPtr srcFileNameRef_ = Marshal.StringToHGlobalAnsi(srcFileNameRef); SharpDX.Direct3D.ShaderMacro.__Native[] definesRef__ = (definesRef == null) ? null : new SharpDX.Direct3D.ShaderMacro.__Native[definesRef.Length]; if (definesRef != null) { for (int i = 0; i < definesRef.Length; i++) { definesRef[i].__MarshalTo(ref definesRef__[i]); } } IntPtr compiledEffectOut_ = IntPtr.Zero; IntPtr errorsOut_ = IntPtr.Zero; SharpDX.Result __result__; fixed(void *definesRef_ = definesRef__) { __result__ = SharpDX.D3DCompiler.LocalInterop.CalliFuncint( (void *)dataRef, (void *)dataLength, (void *)srcFileNameRef_, definesRef_, (void *)includeRef, unchecked ((int)hlslFlags), unchecked ((int)fxFlags), &compiledEffectOut_, &errorsOut_, (void *)D3D10CompileEffectFromMemory_); } Marshal.FreeHGlobal(srcFileNameRef_); if (definesRef != null) { for (int i = 0; i < definesRef.Length; i++) { definesRef[i].__MarshalFree(ref definesRef__[i]); } } compiledEffectOut = (compiledEffectOut_ == IntPtr.Zero) ? null : new SharpDX.Direct3D.Blob(compiledEffectOut_); errorsOut = (errorsOut_ == IntPtr.Zero) ? null : new SharpDX.Direct3D.Blob(errorsOut_); __result__.CheckError(); return(__result__); } }
/// <summary> /// No documentation. /// </summary> /// <param name = "rootSignatureRef">No documentation.</param> /// <param name = "version">No documentation.</param> /// <param name = "blobOut">No documentation.</param> /// <param name = "errorBlobOut">No documentation.</param> /// <returns>No documentation.</returns> /// <unmanaged>HRESULT D3D12SerializeRootSignature([In] const D3D12_ROOT_SIGNATURE_DESC* pRootSignature,[In] D3D_ROOT_SIGNATURE_VERSION Version,[Out] ID3D10Blob** ppBlob,[Out, Optional] ID3D10Blob** ppErrorBlob)</unmanaged> /// <unmanaged-short>D3D12SerializeRootSignature</unmanaged-short> public static unsafe SharpDX.Result SerializeRootSignature(System.IntPtr rootSignatureRef, SharpDX.Direct3D12.RootSignatureVersion version, out SharpDX.Direct3D.Blob blobOut, out SharpDX.Direct3D.Blob errorBlobOut) { System.IntPtr blobOut_ = System.IntPtr.Zero; System.IntPtr errorBlobOut_ = System.IntPtr.Zero; SharpDX.Result __result__; __result__ = D3D12SerializeRootSignature_((void *)rootSignatureRef, unchecked ((System.Int32)version), &blobOut_, &errorBlobOut_); if (blobOut_ != System.IntPtr.Zero) { blobOut = new SharpDX.Direct3D.Blob(blobOut_); } else { blobOut = null; } if (errorBlobOut_ != System.IntPtr.Zero) { errorBlobOut = new SharpDX.Direct3D.Blob(errorBlobOut_); } else { errorBlobOut = null; } return(__result__); }
/// <summary> /// No documentation. /// </summary> /// <param name="rootSignatureRef">No documentation.</param> /// <param name="version">No documentation.</param> /// <param name="blobOut">No documentation.</param> /// <param name="errorBlobOut">No documentation.</param> /// <returns>No documentation.</returns> /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='D3D12SerializeRootSignature']/*"/> /// <unmanaged>HRESULT D3D12SerializeRootSignature([In] const void* pRootSignature,[In] D3D_ROOT_SIGNATURE_VERSION Version,[Out] ID3D10Blob** ppBlob,[Out, Optional] ID3D10Blob** ppErrorBlob)</unmanaged> /// <unmanaged-short>D3D12SerializeRootSignature</unmanaged-short> public static SharpDX.Result SerializeRootSignature(System.IntPtr rootSignatureRef, SharpDX.Direct3D12.RootSignatureVersion version, out SharpDX.Direct3D.Blob blobOut, out SharpDX.Direct3D.Blob errorBlobOut) { unsafe { IntPtr blobOut_ = IntPtr.Zero; IntPtr errorBlobOut_ = IntPtr.Zero; SharpDX.Result __result__; __result__ = D3D12SerializeRootSignature_((void *)rootSignatureRef, unchecked ((int)version), &blobOut_, &errorBlobOut_); blobOut = (blobOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D.Blob(blobOut_); errorBlobOut = (errorBlobOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D.Blob(errorBlobOut_); return(__result__); } }