Beispiel #1
0
 /// <summary>
 /// Sets information in a compilation result.
 /// </summary>
 /// <param name="part">The part.</param>
 /// <param name="partData">The part data.</param>
 /// <returns>The new shader in which the new part data is set.</returns>
 /// <unmanaged>HRESULT D3DSetBlobPart([In, Buffer] const void* pSrcData,[In] SIZE_T SrcDataSize,[In] D3D_BLOB_PART Part,[In] unsigned int Flags,[In, Buffer] const void* pPart,[In] SIZE_T PartSize,[Out] ID3D10Blob** ppNewShader)</unmanaged>
 public unsafe ShaderBytecode SetPart(ShaderBytecodePart part, DataStream partData)
 {
     Blob blob;
     fixed (void* bufferPtr = Data)
         D3D.SetBlobPart((IntPtr)bufferPtr, Data.Length, part, 0, partData.DataPointer, (int)partData.Length, out blob);
     return new ShaderBytecode(blob);
 }
Beispiel #2
0
 /// <summary>	
 /// Retrieves a specific part from a compilation result.	
 /// </summary>	
 /// <remarks>	
 /// D3DGetBlobPart retrieves the part of a blob (arbitrary length data buffer) that contains the type of data that the  Part parameter specifies. 	
 /// </remarks>	
 /// <param name="part">A <see cref="SharpDX.D3DCompiler.ShaderBytecodePart"/>-typed value that specifies the part of the buffer to retrieve. </param>
 /// <returns>Returns the extracted part. </returns>
 /// <unmanaged>HRESULT D3DGetBlobPart([In, Buffer] const void* pSrcData,[In] SIZE_T SrcDataSize,[In] D3D_BLOB_PART Part,[In] int Flags,[Out] ID3DBlob** ppPart)</unmanaged>
 public unsafe ShaderBytecode GetPart(ShaderBytecodePart part)
 {
     Blob blob;
     fixed (void* bufferPtr = Data)
         D3D.GetBlobPart((IntPtr)bufferPtr, Data.Length, part, 0, out blob);
     return new ShaderBytecode(blob);
 }