Esempio n. 1
0
 /// <summary>	
 /// <p>Create a texture from another resource.</p>	
 /// </summary>	
 /// <param name="deviceRef"><dd>  <p>A reference to the device (see <strong><see cref="SharpDX.Direct3D10.Device"/> Interface</strong>) that will use the resource.</p> </dd></param>	
 /// <param name="hSrcModule"><dd>  <p>A handle to the source resource. HMODULE can be obtained with  GetModuleHandle Function.</p> </dd></param>	
 /// <param name="srcResourceRef"><dd>  <p>A string that contains the name of the source resource.  If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the data type resolves to LPCSTR. </p> </dd></param>	
 /// <param name="loadInfoRef"><dd>  <p>Optional. Identifies the characteristics of a texture (see <strong><see cref="SharpDX.Direct3D10.ImageLoadInformation"/></strong>) when the data processor is created;  set this to <strong><c>null</c></strong> to read the characteristics of a texture when the texture is loaded.</p> </dd></param>	
 /// <param name="pumpRef"><dd>  <p>A reference to a thread pump interface (see <strong><see cref="System.IntPtr"/> Interface</strong>). If <strong><c>null</c></strong> is specified, this function will behave synchronously  and will not return until it is finished.</p> </dd></param>	
 /// <param name="textureOut"><dd>  <p>The address of a reference to the texture resource (see <strong><see cref="SharpDX.Direct3D10.Resource"/> Interface</strong>).</p> </dd></param>	
 /// <param name="hResultRef"><dd>  <p>A reference to the return value. May be <strong><c>null</c></strong>. If <em>pPump</em> is not <strong><c>null</c></strong>, then <em>pHResult</em> must be a  valid memory location until the asynchronous execution completes.</p> </dd></param>	
 /// <returns><p>The return value is one of the values listed in Direct3D 10 Return Codes.</p></returns>	
 /// <remarks>	
 /// <p>For a list of supported image formats see <strong><see cref="SharpDX.Direct3D10.ImageFileFormat"/></strong>.</p>	
 /// </remarks>	
 /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='D3DX10CreateTextureFromResourceW']/*"/>	
 /// <msdn-id>bb172673</msdn-id>	
 /// <unmanaged>HRESULT D3DX10CreateTextureFromResourceW([In] ID3D10Device* pDevice,[In] HINSTANCE hSrcModule,[In] const wchar_t* pSrcResource,[In, Optional] D3DX10_IMAGE_LOAD_INFO* pLoadInfo,[In] ID3DX10ThreadPump* pPump,[Out] void** ppTexture,[Out] HRESULT* pHResult)</unmanaged>	
 /// <unmanaged-short>D3DX10CreateTextureFromResourceW</unmanaged-short>	
 internal static void CreateTextureFromResource(SharpDX.Direct3D10.Device deviceRef, System.IntPtr hSrcModule, string srcResourceRef, SharpDX.Direct3D10.ImageLoadInformation? loadInfoRef, System.IntPtr pumpRef, out System.IntPtr textureOut, out SharpDX.Result hResultRef) {
     unsafe {
         SharpDX.Direct3D10.ImageLoadInformation loadInfoRef_;
         if (loadInfoRef.HasValue)
             loadInfoRef_ = loadInfoRef.Value;				
         hResultRef = new SharpDX.Result();
         SharpDX.Result __result__;
         fixed (char* srcResourceRef_ = srcResourceRef)
             fixed (void* textureOut_ = &textureOut)
                 fixed (void* hResultRef_ = &hResultRef)
                     __result__= 
     				D3DX10CreateTextureFromResourceW_((void*)((deviceRef == null)?IntPtr.Zero:deviceRef.NativePointer), (void*)hSrcModule, (void*)srcResourceRef_, (loadInfoRef.HasValue)?&loadInfoRef_:(void*)IntPtr.Zero, (void*)pumpRef, textureOut_, hResultRef_);		
             __result__.CheckError();
         }
     }
Esempio n. 2
0
 /// <summary>	
 /// <p>Retrieves information about a given image file.</p>	
 /// </summary>	
 /// <param name="srcFileRef"><dd>  <p>File name of image to retrieve information about. If UNICODE or _UNICODE are defined, this parameter type is LPCWSTR, otherwise, the type is LPCSTR.</p> </dd></param>	
 /// <param name="pumpRef"><dd>  <p>Optional thread pump that can be used to load the info asynchronously. Can be <strong><c>null</c></strong>. See <strong><see cref="System.IntPtr"/></strong>.</p> </dd></param>	
 /// <param name="srcInfoRef"><dd>  <p>Pointer to a <see cref="SharpDX.Direct3D10.ImageInformation"/> structure to be filled with the description of the data in the source file.</p> </dd></param>	
 /// <param name="hResultRef"><dd>  <p>A reference to the return value. May be <strong><c>null</c></strong>. If <em>pPump</em> is not <strong><c>null</c></strong>, then <em>pHResult</em> must be a valid memory location until the asynchronous execution completes.</p> </dd></param>	
 /// <returns><p>If the function succeeds, the return value is D3D_OK. If the function fails, the return value can be the following: D3DERR_INVALIDCALL</p></returns>	
 /// <remarks>	
 /// <p>This function supports both Unicode and ANSI strings.</p>	
 /// </remarks>	
 /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='D3DX10GetImageInfoFromFileW']/*"/>	
 /// <msdn-id>bb172677</msdn-id>	
 /// <unmanaged>HRESULT D3DX10GetImageInfoFromFileW([In] const wchar_t* pSrcFile,[In] ID3DX10ThreadPump* pPump,[In] D3DX10_IMAGE_INFO* pSrcInfo,[Out] HRESULT* pHResult)</unmanaged>	
 /// <unmanaged-short>D3DX10GetImageInfoFromFileW</unmanaged-short>	
 public static void GetImageInfoFromFile(string srcFileRef, System.IntPtr pumpRef, ref SharpDX.Direct3D10.ImageInformation srcInfoRef, out SharpDX.Result hResultRef) {
     unsafe {
         hResultRef = new SharpDX.Result();
         SharpDX.Result __result__;
         fixed (char* srcFileRef_ = srcFileRef)
             fixed (void* srcInfoRef_ = &srcInfoRef)
                 fixed (void* hResultRef_ = &hResultRef)
                     __result__= 
     				D3DX10GetImageInfoFromFileW_((void*)srcFileRef_, (void*)pumpRef, srcInfoRef_, hResultRef_);		
             __result__.CheckError();
         }
     }
Esempio n. 3
0
     /// <summary>	
     /// <p>Create a shader-resource view from a file in memory.</p>	
     /// </summary>	
     /// <param name="deviceRef"><dd>  <p>A reference to the device (see <strong><see cref="SharpDX.Direct3D10.Device"/> Interface</strong>) that will use the resource.</p> </dd></param>	
     /// <param name="srcDataRef"><dd>  <p>Pointer to the file in memory that contains the shader-resource view.</p> </dd></param>	
     /// <param name="srcDataSize"><dd>  <p>Size of the file in memory.</p> </dd></param>	
     /// <param name="loadInfoRef"><dd>  <p>Optional. Identifies the characteristics of a texture (see <strong><see cref="SharpDX.Direct3D10.ImageLoadInformation"/></strong>) when the data processor is created; set this to <strong><c>null</c></strong> to read the characteristics of a texture when the texture is loaded.</p> </dd></param>	
     /// <param name="pumpRef"><dd>  <p>A reference to a thread pump interface (see <strong><see cref="System.IntPtr"/> Interface</strong>). If <strong><c>null</c></strong> is specified, this function will behave synchronously and will not return until it is finished.</p> </dd></param>	
     /// <param name="shaderResourceViewOut"><dd>  <p>Address of a reference to the newly created shader resource view. See <strong><see cref="SharpDX.Direct3D10.ShaderResourceView"/> Interface</strong>.</p> </dd></param>	
     /// <param name="hResultRef"><dd>  <p>A reference to the return value. May be <strong><c>null</c></strong>. If <em>pPump</em> is not <strong><c>null</c></strong>, then <em>pHResult</em> must be a valid memory location until the asynchronous execution completes.</p> </dd></param>	
     /// <returns><p>The return value is one of the values listed in Direct3D 10 Return Codes.</p></returns>	
     /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='D3DX10CreateShaderResourceViewFromMemory']/*"/>	
     /// <msdn-id>bb172668</msdn-id>	
     /// <unmanaged>HRESULT D3DX10CreateShaderResourceViewFromMemory([In] ID3D10Device* pDevice,[In] const void* pSrcData,[In] SIZE_T SrcDataSize,[In, Optional] D3DX10_IMAGE_LOAD_INFO* pLoadInfo,[In] ID3DX10ThreadPump* pPump,[In] ID3D10ShaderResourceView** ppShaderResourceView,[Out] HRESULT* pHResult)</unmanaged>	
     /// <unmanaged-short>D3DX10CreateShaderResourceViewFromMemory</unmanaged-short>	
     public static void CreateShaderResourceViewFromMemory(SharpDX.Direct3D10.Device deviceRef, System.IntPtr srcDataRef, SharpDX.PointerSize srcDataSize, SharpDX.Direct3D10.ImageLoadInformation? loadInfoRef, System.IntPtr pumpRef, out SharpDX.Direct3D10.ShaderResourceView shaderResourceViewOut, out SharpDX.Result hResultRef) {
         unsafe {
             SharpDX.Direct3D10.ImageLoadInformation loadInfoRef_;
             if (loadInfoRef.HasValue)
                 loadInfoRef_ = loadInfoRef.Value;				
             IntPtr shaderResourceViewOut_ = IntPtr.Zero;
             hResultRef = new SharpDX.Result();
             SharpDX.Result __result__;
             fixed (void* hResultRef_ = &hResultRef)
                 __result__= 
 				D3DX10CreateShaderResourceViewFromMemory_((void*)((deviceRef == null)?IntPtr.Zero:deviceRef.NativePointer), (void*)srcDataRef, (void*)srcDataSize, (loadInfoRef.HasValue)?&loadInfoRef_:(void*)IntPtr.Zero, (void*)pumpRef, &shaderResourceViewOut_, hResultRef_);		
             shaderResourceViewOut= (shaderResourceViewOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.ShaderResourceView(shaderResourceViewOut_);	
             __result__.CheckError();
         }
     }
Esempio n. 4
0
         /// <summary>	
         /// <p>Create an effect from a resource.</p>	
         /// </summary>	
         /// <param name="hModule"><dd>  <p>A handle to the resource module containing the effect. HMODULE can be obtained with GetModuleHandle Function.</p> </dd></param>	
         /// <param name="resourceNameRef"><dd>  <p>Name of the resource in hModule. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the data type resolves to LPCSTR.</p> </dd></param>	
         /// <param name="srcFileNameRef"><dd>  <p>Optional. Effect file name, which is used for error messages only. Can be <strong><c>null</c></strong>.</p> </dd></param>	
         /// <param name="definesRef"><dd>  <p>A <c>null</c>-terminated array of shader macros (see <strong>D3D10_SHADER_MACRO</strong>); set this to <strong><c>null</c></strong> to specify no macros.</p> </dd></param>	
         /// <param name="includeRef"><dd>  <p>A reference to an include interface (see <strong>ID3D10Include Interface</strong>). This parameter can be <strong><c>null</c></strong>.</p> </dd></param>	
         /// <param name="profileRef"><dd>  <p>A string that specifies the shader profile, or shader model.</p> </dd></param>	
         /// <param name="hLSLFlags"><dd>  <p>HLSL compile options (see D3D10_SHADER Constants).</p> </dd></param>	
         /// <param name="fXFlags"><dd>  <p>Effect compile options (see Compile and Effect Flags).</p> </dd></param>	
         /// <param name="deviceRef"><dd>  <p>A reference to the device (see <strong><see cref="SharpDX.Direct3D10.Device"/> Interface</strong>) that will use the resources.</p> </dd></param>	
         /// <param name="effectPoolRef"><dd>  <p>Pointer to an effect pool (see <strong><see cref="SharpDX.Direct3D10.EffectPool"/> Interface</strong>) for sharing variables between effects.</p> </dd></param>	
         /// <param name="pumpRef"><dd>  <p>A reference to a thread pump interface (see <strong><see cref="System.IntPtr"/> Interface</strong>). Use <strong><c>null</c></strong> to specify that this function should not return until it is completed.</p> </dd></param>	
         /// <param name="effectOut"><dd>  <p>Address of a reference to the effect (see <strong><see cref="SharpDX.Direct3D10.Effect"/> Interface</strong>) that is created.</p> </dd></param>	
         /// <param name="errorsOut"><dd>  <p>The address of a reference to memory (see <strong><see cref="SharpDX.Direct3D.Blob"/> Interface</strong>) that contains effect compile errors, if there were any.</p> </dd></param>	
         /// <param name="hResultRef"><dd>  <p>A reference to the return value. May be <strong><c>null</c></strong>. If <em>pPump</em> is not <strong><c>null</c></strong>, then <em>pHResult</em> must be a valid memory location until the asynchronous execution completes.</p> </dd></param>	
         /// <returns><p>The return value is one of the values listed in Direct3D 10 Return Codes.</p></returns>	
         /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='D3DX10CreateEffectFromResourceW']/*"/>	
         /// <msdn-id>bb172660</msdn-id>	
         /// <unmanaged>HRESULT D3DX10CreateEffectFromResourceW([In] HINSTANCE hModule,[In] const wchar_t* pResourceName,[In] const wchar_t* pSrcFileName,[In, Buffer, Optional] const D3D_SHADER_MACRO* pDefines,[In] ID3DInclude* pInclude,[In] const char* pProfile,[In] unsigned int HLSLFlags,[In] unsigned int FXFlags,[In] ID3D10Device* pDevice,[In] ID3D10EffectPool* pEffectPool,[In] ID3DX10ThreadPump* pPump,[In] ID3D10Effect** ppEffect,[In] ID3D10Blob** ppErrors,[Out] HRESULT* pHResult)</unmanaged>	
         /// <unmanaged-short>D3DX10CreateEffectFromResourceW</unmanaged-short>	
         public static void CreateEffectFromResource(System.IntPtr hModule, string resourceNameRef, string srcFileNameRef, SharpDX.Direct3D.ShaderMacro[] definesRef, System.IntPtr includeRef, string profileRef, int hLSLFlags, int fXFlags, SharpDX.Direct3D10.Device deviceRef, SharpDX.Direct3D10.EffectPool effectPoolRef, System.IntPtr pumpRef, out SharpDX.Direct3D10.Effect effectOut, out SharpDX.Direct3D.Blob errorsOut, out SharpDX.Result hResultRef) {
             unsafe {
                 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 profileRef_ = Utilities.StringToHGlobalAnsi(profileRef);
                 IntPtr effectOut_ = IntPtr.Zero;
                 IntPtr errorsOut_ = IntPtr.Zero;
                 hResultRef = new SharpDX.Result();
                 SharpDX.Result __result__;
                 fixed (char* resourceNameRef_ = resourceNameRef)
                     fixed (char* srcFileNameRef_ = srcFileNameRef)
                         fixed (void* definesRef_ = definesRef__)
                             fixed (void* hResultRef_ = &hResultRef)
                                 __result__= 
                 				D3DX10CreateEffectFromResourceW_((void*)hModule, (void*)resourceNameRef_, (void*)srcFileNameRef_, definesRef_, (void*)includeRef, (void*)profileRef_, hLSLFlags, fXFlags, (void*)((deviceRef == null)?IntPtr.Zero:deviceRef.NativePointer), (void*)((effectPoolRef == null)?IntPtr.Zero:effectPoolRef.NativePointer), (void*)pumpRef, &effectOut_, &errorsOut_, hResultRef_);		
                         if (definesRef != null )															
                         for (int i = 0; i < definesRef.Length; i++)
                             definesRef[i].__MarshalFree(ref definesRef__[i]);
                         Marshal.FreeHGlobal(profileRef_ );
                         effectOut= (effectOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D10.Effect(effectOut_);	
                         errorsOut= (errorsOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D.Blob(errorsOut_);	
                         __result__.CheckError();
                     }
                 }
Esempio n. 5
0
 /// <summary>	
 /// <p>Get information about an image already loaded into memory.</p>	
 /// </summary>	
 /// <param name="srcDataRef"><dd>  <p>Pointer to the image in memory.</p> </dd></param>	
 /// <param name="srcDataSize"><dd>  <p>Size of the image in memory, in bytes.</p> </dd></param>	
 /// <param name="pumpRef"><dd>  <p>Optional thread pump that can be used to load the info asynchronously. Can be <strong><c>null</c></strong>. See <strong><see cref="System.IntPtr"/></strong>.</p> </dd></param>	
 /// <param name="srcInfoRef"><dd>  <p>Information about the image in memory.</p> </dd></param>	
 /// <param name="hResultRef"><dd>  <p>A reference to the return value. May be <strong><c>null</c></strong>. If <em>pPump</em> is not <strong><c>null</c></strong>, then <em>pHResult</em> must be a valid memory location until the asynchronous execution completes.</p> </dd></param>	
 /// <returns><p>The return value is one of the values listed in Direct3D 10 Return Codes.</p></returns>	
 /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='D3DX10GetImageInfoFromMemory']/*"/>	
 /// <msdn-id>bb172678</msdn-id>	
 /// <unmanaged>HRESULT D3DX10GetImageInfoFromMemory([In] const void* pSrcData,[In] SIZE_T SrcDataSize,[In] ID3DX10ThreadPump* pPump,[In] D3DX10_IMAGE_INFO* pSrcInfo,[Out] HRESULT* pHResult)</unmanaged>	
 /// <unmanaged-short>D3DX10GetImageInfoFromMemory</unmanaged-short>	
 public static void GetImageInfoFromMemory(System.IntPtr srcDataRef, SharpDX.PointerSize srcDataSize, System.IntPtr pumpRef, ref SharpDX.Direct3D10.ImageInformation srcInfoRef, out SharpDX.Result hResultRef) {
     unsafe {
         hResultRef = new SharpDX.Result();
         SharpDX.Result __result__;
         fixed (void* srcInfoRef_ = &srcInfoRef)
             fixed (void* hResultRef_ = &hResultRef)
                 __result__= 
 				D3DX10GetImageInfoFromMemory_((void*)srcDataRef, (void*)srcDataSize, (void*)pumpRef, srcInfoRef_, hResultRef_);		
         __result__.CheckError();
     }
 }
Esempio n. 6
0
 /// <summary>	
 /// <p>Create a texture resource from a file residing in system memory.</p>	
 /// </summary>	
 /// <param name="deviceRef"><dd>  <p>A reference to the device (see <strong><see cref="SharpDX.Direct3D10.Device"/> Interface</strong>) that will use the resource.</p> </dd></param>	
 /// <param name="srcDataRef"><dd>  <p>Pointer to the resource in system memory.</p> </dd></param>	
 /// <param name="srcDataSize"><dd>  <p>Size of the resource in system memory.</p> </dd></param>	
 /// <param name="loadInfoRef"><dd>  <p>Optional. Identifies the characteristics of a texture (see <strong><see cref="SharpDX.Direct3D10.ImageLoadInformation"/></strong>) when the data processor is created;  set this to <strong><c>null</c></strong> to read the characteristics of a texture when the texture is loaded.</p> </dd></param>	
 /// <param name="pumpRef"><dd>  <p>A reference to a thread pump interface (see <strong><see cref="System.IntPtr"/> Interface</strong>). If <strong><c>null</c></strong> is specified, this function will behave synchronously  and will not return until it is finished.</p> </dd></param>	
 /// <param name="textureOut"><dd>  <p>Address of a reference to the created resource. See <strong><see cref="SharpDX.Direct3D10.Resource"/> Interface</strong>.</p> </dd></param>	
 /// <param name="hResultRef"><dd>  <p>A reference to the return value. May be <strong><c>null</c></strong>. If <em>pPump</em> is not <strong><c>null</c></strong>, then <em>pHResult</em> must be a  valid memory location until the asynchronous execution completes.</p> </dd></param>	
 /// <returns><p>The return value is one of the values listed in Direct3D 10 Return Codes.</p></returns>	
 /// <remarks>	
 /// <p>For a list of supported image formats see <strong><see cref="SharpDX.Direct3D10.ImageFileFormat"/></strong>.</p>	
 /// </remarks>	
 /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='D3DX10CreateTextureFromMemory']/*"/>	
 /// <msdn-id>bb172672</msdn-id>	
 /// <unmanaged>HRESULT D3DX10CreateTextureFromMemory([In] ID3D10Device* pDevice,[In] const void* pSrcData,[In] SIZE_T SrcDataSize,[In, Optional] D3DX10_IMAGE_LOAD_INFO* pLoadInfo,[In] ID3DX10ThreadPump* pPump,[Out] void** ppTexture,[Out] HRESULT* pHResult)</unmanaged>	
 /// <unmanaged-short>D3DX10CreateTextureFromMemory</unmanaged-short>	
 internal static void CreateTextureFromMemory(SharpDX.Direct3D10.Device deviceRef, System.IntPtr srcDataRef, SharpDX.PointerSize srcDataSize, SharpDX.Direct3D10.ImageLoadInformation? loadInfoRef, System.IntPtr pumpRef, out System.IntPtr textureOut, out SharpDX.Result hResultRef) {
     unsafe {
         SharpDX.Direct3D10.ImageLoadInformation loadInfoRef_;
         if (loadInfoRef.HasValue)
             loadInfoRef_ = loadInfoRef.Value;				
         hResultRef = new SharpDX.Result();
         SharpDX.Result __result__;
         fixed (void* textureOut_ = &textureOut)
             fixed (void* hResultRef_ = &hResultRef)
                 __result__= 
 				D3DX10CreateTextureFromMemory_((void*)((deviceRef == null)?IntPtr.Zero:deviceRef.NativePointer), (void*)srcDataRef, (void*)srcDataSize, (loadInfoRef.HasValue)?&loadInfoRef_:(void*)IntPtr.Zero, (void*)pumpRef, textureOut_, hResultRef_);		
         __result__.CheckError();
     }
 }
 void UnsupportedGPU(MyGuiControlButton sender)
 {
     // DXGI_ERROR_UNSUPPORTED
     SharpDX.Result res = new SharpDX.Result(0x887A0004);
     res.CheckError();
 }
Esempio n. 8
0
 void UnsupportedGPU(MyGuiControlButton sender)
 {
     // DXGI_ERROR_UNSUPPORTED
     SharpDX.Result res = new SharpDX.Result(0x887A0004);
     res.CheckError();
 }
 /// <summary>
 /// <p>Ends drawing operations  on the render target and indicates the current error state and associated tags. </p>
 /// </summary>
 /// <param name="tag1"><dd>  <p>When this method returns, contains the tag for drawing operations that caused errors or 0 if there were no errors. This parameter is passed uninitialized.</p> </dd></param>
 /// <param name="tag2"><dd>  <p>When this method returns, contains the tag for drawing operations that caused errors or 0 if there were no errors. This parameter is passed uninitialized.</p> </dd></param>
 /// <returns><p>If the method succeeds, it returns <strong><see cref="SharpDX.Result.Ok"/></strong>. Otherwise, it returns an <strong><see cref="SharpDX.Result"/></strong> error code and sets <em>tag1</em> and <em>tag2</em> to the tags that were active when the error occurred. </p></returns>
 /// <remarks>
 /// <p>Drawing operations can only be issued between a <strong>BeginDraw</strong> and <strong>EndDraw</strong> call.</p><p> <strong>BeginDraw</strong> and <strong>EndDraw</strong> are use to indicate that a render target is in use by the Direct2D system. Different implementations of <strong><see cref="SharpDX.Direct2D1.RenderTarget"/></strong> might behave differently when <strong>BeginDraw</strong> is called. An <strong><see cref="SharpDX.Direct2D1.BitmapRenderTarget"/></strong> may be locked between <strong>BeginDraw</strong>/<strong>EndDraw</strong> calls, a DXGI surface render target might be acquired on <strong>BeginDraw</strong> and released on <strong>EndDraw</strong>, while an <strong><see cref="SharpDX.Direct2D1.WindowRenderTarget"/></strong> may begin batching at <strong>BeginDraw</strong> and may present on <strong>EndDraw</strong>, for example.</p><p> The <strong>BeginDraw</strong> method must be called before rendering operations can be called, though state-setting and state-retrieval operations can be performed even outside of <strong>BeginDraw</strong>/<strong>EndDraw</strong>. </p><p>After <strong>BeginDraw</strong> is called, a render target will normally build up a batch of rendering commands, but defer processing of these commands until either an internal buffer is full, the <strong>Flush</strong> method is called, or until <strong>EndDraw</strong> is called. The <strong>EndDraw</strong> method causes any batched drawing operations to complete, and then returns an <strong><see cref="SharpDX.Result"/></strong> indicating the success of the operations and, optionally, the tag state of the render target at the time the error occurred. The <strong>EndDraw</strong> method always succeeds: it should not be called twice even if a previous <strong>EndDraw</strong> resulted in a failing <strong><see cref="SharpDX.Result"/></strong>. </p><p>If <strong>EndDraw</strong> is called without a matched call to <strong>BeginDraw</strong>, it returns an error indicating that <strong>BeginDraw</strong> must be called before <strong>EndDraw</strong>. Calling <strong>BeginDraw</strong> twice on a render target puts the target into an error state where nothing further is drawn, and returns an appropriate <strong><see cref="SharpDX.Result"/></strong> and error information when <strong>EndDraw</strong> is called.
 /// </p>
 /// </remarks>
 /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID2D1RenderTarget::EndDraw']/*"/>
 /// <msdn-id>dd371924</msdn-id>
 /// <unmanaged>HRESULT ID2D1RenderTarget::EndDraw([Out, Optional] unsigned longlong* tag1,[Out, Optional] unsigned longlong* tag2)</unmanaged>
 /// <unmanaged-short>ID2D1RenderTarget::EndDraw</unmanaged-short>
 public void EndDraw(out long tag1, out long tag2)
 {
     SharpDX.Result result = TryEndDraw(out tag1, out tag2);
     result.CheckError();
 }
Esempio n. 10
0
 public static unsafe void Callivoid10(void *thisObject, void *arg0, SharpDX.Result arg1, void *methodPtr)
 {
     throw new NotImplementedException();
 }