コード例 #1
0
ファイル: X3DAudio29.cs プロジェクト: alexey-bez/SharpDX
 /// <summary>	
 /// <p>Calculates DSP settings with respect to 3D parameters.</p>	
 /// </summary>	
 /// <param name="instance"><dd> <p>3D audio instance handle. Call <strong><see cref="SharpDX.X3DAudio.X3DAudio.X3DAudioInitialize"/></strong> to get this handle.</p> </dd></param>	
 /// <param name="listenerRef"><dd> <p>Pointer to an <strong><see cref="SharpDX.X3DAudio.Listener"/></strong> representing the point of reception.</p> </dd></param>	
 /// <param name="emitterRef"><dd> <p>Pointer to an <strong><see cref="SharpDX.X3DAudio.Emitter"/></strong> representing the sound source.</p> </dd></param>	
 /// <param name="flags"><dd> <table> <tr><th>Value</th><th>Description</th></tr> <tr><td><see cref="SharpDX.X3DAudio.CalculateFlags.Matrix"/></td><td>Enables matrix coefficient table calculation.?</td></tr> <tr><td><see cref="SharpDX.X3DAudio.CalculateFlags.Delay"/></td><td>Enables delay time array calculation (stereo only).?</td></tr> <tr><td><see cref="SharpDX.X3DAudio.CalculateFlags.LpfDirect"/></td><td>Enables low pass filter (LPF) direct-path coefficient calculation.?</td></tr> <tr><td><see cref="SharpDX.X3DAudio.CalculateFlags.LpfReverb"/></td><td>Enables LPF reverb-path coefficient calculation.?</td></tr> <tr><td><see cref="SharpDX.X3DAudio.CalculateFlags.Reverb"/></td><td>Enables reverb send level calculation.?</td></tr> <tr><td><see cref="SharpDX.X3DAudio.CalculateFlags.Doppler"/></td><td>Enables Doppler shift factor calculation.?</td></tr> <tr><td><see cref="SharpDX.X3DAudio.CalculateFlags.EmitterAngle"/></td><td>Enables emitter-to-listener interior angle calculation.?</td></tr> <tr><td><see cref="SharpDX.X3DAudio.CalculateFlags.ZeroCenter"/></td><td>Fills the center channel with silence. This flag allows you to keep a 6-channel matrix so you do not have to remap the channels,  but the center channel will be silent.  This flag is only valid if you also set <see cref="SharpDX.X3DAudio.CalculateFlags.Matrix"/>.?</td></tr> <tr><td><see cref="SharpDX.X3DAudio.CalculateFlags.RedirectToLfe"/></td><td> Applies an equal mix of all source channels to a low frequency effect (LFE) destination channel. It only applies to matrix calculations with a source that does not have an LFE channel and a destination that does have an LFE channel.  This flag is only valid  if you also set <see cref="SharpDX.X3DAudio.CalculateFlags.Matrix"/>.?</td></tr> </table> <p>?</p> </dd></param>	
 /// <param name="dSPSettingsRef"><dd> <p>Pointer to an <strong><see cref="SharpDX.X3DAudio.DspSettings"/></strong> structure that receives the calculation results.</p> </dd></param>	
 /// <remarks>	
 /// <p>You typically call <strong><see cref="SharpDX.X3DAudio.X3DAudio.X3DAudioCalculate"/></strong> once for each pair of emitting objects and listeners in the scene. After each call, to apply the 3D effects, the app manually applies the calculation results at <em>pDSPSettings</em> to the XAUDIO2 graph. For more info, see How to: Integrate X3DAudio with XAudio2.</p><p><strong>Important</strong>?? The listener and emitter values must be valid. Floating-point specials (NaN, QNaN, +INF, -INF) can cause the entire audio output to go silent if introduced into a running audio graph.</p>	
 /// </remarks>	
 /// <include file='..\..\Documentation\CodeComments.xml' path="/comments/comment[@id='X3DAudioCalculate']/*"/>	
 /// <msdn-id>microsoft.directx_sdk.x3daudio.x3daudiocalculate</msdn-id>	
 /// <unmanaged>void X3DAudioCalculate([In] const X3DAUDIOHANDLE* Instance,[In] const X3DAUDIO_LISTENER* pListener,[In] const X3DAUDIO_EMITTER* pEmitter,[In] X3DAudioCalculateFlags Flags,[In] void* pDSPSettings)</unmanaged>	
 /// <unmanaged-short>X3DAudioCalculate</unmanaged-short>	
 public static void X3DAudioCalculate(ref SharpDX.X3DAudio.X3DAudioHandle instance, SharpDX.X3DAudio.Listener listenerRef, SharpDX.X3DAudio.Emitter emitterRef, SharpDX.X3DAudio.CalculateFlags flags, System.IntPtr dSPSettingsRef) {
     unsafe {
         var listenerRef_ = new SharpDX.X3DAudio.Listener.__Native();
         listenerRef.__MarshalTo(ref listenerRef_);
         var emitterRef_ = new SharpDX.X3DAudio.Emitter.__Native();
         emitterRef.__MarshalTo(ref emitterRef_);
         fixed (void* instance_ = &instance)
             X3DAudioCalculate_(instance_, &listenerRef_, &emitterRef_, unchecked((int)flags), (void*)dSPSettingsRef);		
         listenerRef.__MarshalFree(ref listenerRef_);
         emitterRef.__MarshalFree(ref emitterRef_);
     }
 }
コード例 #2
0
ファイル: Interfaces.cs プロジェクト: alexey-bez/SharpDX
        /// <summary>	
        /// The CreateCaptureBuffer method creates a buffer for capturing waveform audio.	
        /// </summary>	
        /// <param name="cDSCBufferDescRef"><dd> Pointer to a <see cref="SharpDX.DirectSound.CaptureBufferDescription"/> structure containing values for the capture buffer being created. </dd></param>	
        /// <param name="dSCBufferOut"><dd> Address of a variable that receives an <see cref="SharpDX.DirectSound.CaptureBufferBase"/> interface reference. Use QueryInterface to obtain <see cref="SharpDX.DirectSound.CaptureBuffer"/>. See Remarks. </dd></param>	
        /// <param name="unkOuterRef"><dd> Address of the controlling object's <see cref="SharpDX.ComObject"/> interface for COM aggregation. Must be <c>null</c>. </dd></param>	
        /// <returns><p>If the method succeeds, the return value is DS_OK. If the method fails, the return value may be one of the following error values.</p> <table> <tr><td>Return code</td></tr> <tr><td>DSERR_INVALIDPARAM </td></tr> <tr><td>DSERR_BADFORMAT </td></tr> <tr><td>DSERR_GENERIC </td></tr> <tr><td>DSERR_NODRIVER </td></tr> <tr><td>DSERR_OUTOFMEMORY </td></tr> <tr><td>DSERR_UNINITIALIZED </td></tr> </table></returns>	
        /// <remarks>	
        /// <p>On Microsoft Windows98 and Windows2000, each capture device supports a single buffer.</p> <p>The <see cref="SharpDX.DirectSound.CaptureBuffer"/> interface is supported only on buffers created by an object of class CLSID_DirectSoundCapture8. If the IDirectSoundCapture8 interface was obtained from DirectSoundCaptureCreate8, <see cref="SharpDX.DirectSound.CaptureBuffer"/> is supported. If IDirectSoundCapture8 was obtained from the earlier DirectSoundCaptureCreate function, only <see cref="SharpDX.DirectSound.CaptureBufferBase"/> is supported.</p>	
        /// </remarks>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='IDirectSoundCapture::CreateCaptureBuffer']/*"/>	
        /// <msdn-id>microsoft.directx_sdk.idirectsoundcapture8.idirectsoundcapture8.createcapturebuffer</msdn-id>	
        /// <unmanaged>HRESULT IDirectSoundCapture::CreateCaptureBuffer([In] const DSCBUFFERDESC* pcDSCBufferDesc,[Out] IDirectSoundCaptureBuffer** ppDSCBuffer,[In] IUnknown* pUnkOuter)</unmanaged>	
        /// <unmanaged-short>IDirectSoundCapture::CreateCaptureBuffer</unmanaged-short>	
        internal void CreateCaptureBuffer(SharpDX.DirectSound.CaptureBufferDescription cDSCBufferDescRef, out SharpDX.DirectSound.CaptureBufferBase dSCBufferOut, SharpDX.ComObject unkOuterRef) {
            unsafe {
                var cDSCBufferDescRef_ = SharpDX.DirectSound.CaptureBufferDescription.__NewNative();
                cDSCBufferDescRef.__MarshalTo(ref cDSCBufferDescRef_);
                IntPtr dSCBufferOut_ = IntPtr.Zero;
                SharpDX.Result __result__;
                __result__= 
				SharpDX.DirectSound.LocalInterop.Calliint(_nativePointer, &cDSCBufferDescRef_, &dSCBufferOut_, (void*)((unkOuterRef == null)?IntPtr.Zero:unkOuterRef.NativePointer),((void**)(*(void**)_nativePointer))[3]);		
                cDSCBufferDescRef.__MarshalFree(ref cDSCBufferDescRef_);
                dSCBufferOut= (dSCBufferOut_ == IntPtr.Zero)?null:new SharpDX.DirectSound.CaptureBufferBase(dSCBufferOut_);	
                __result__.CheckError();
            }
        }
コード例 #3
0
ファイル: Functions.cs プロジェクト: JoeErickson/SharpDX
         /// <summary>	
         /// <p>Creates a font object.</p><p><strong>Note</strong>??Instead of using this function, we recommend that you use DirectWrite and the DirectXTK library, <strong>SpriteFont</strong> class. </p>	
         /// </summary>	
         /// <param name="deviceRef">No documentation.</param>	
         /// <param name="descRef">No documentation.</param>	
         /// <param name="fontOut">No documentation.</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='D3DX10CreateFontIndirectW']/*"/>	
         /// <msdn-id>bb172665</msdn-id>	
         /// <unmanaged>HRESULT D3DX10CreateFontIndirectW([In] ID3D10Device* pDevice,[In] const D3DX10_FONT_DESCW* pDesc,[Out, Fast] ID3DX10Font** ppFont)</unmanaged>	
         /// <unmanaged-short>D3DX10CreateFontIndirectW</unmanaged-short>	
         public static void CreateFontIndirect(SharpDX.Direct3D10.Device deviceRef, ref SharpDX.Direct3D10.FontDescription descRef, SharpDX.Direct3D10.Font fontOut) {
             unsafe {
                 var descRef_ = new SharpDX.Direct3D10.FontDescription.__Native();
                 descRef.__MarshalTo(ref descRef_);
                 IntPtr fontOut_ = IntPtr.Zero;
                 SharpDX.Result __result__;
                 __result__= 
 				D3DX10CreateFontIndirectW_((void*)((deviceRef == null)?IntPtr.Zero:deviceRef.NativePointer), &descRef_, &fontOut_);		
                 descRef.__MarshalFree(ref descRef_);
                 ((SharpDX.Direct3D10.Font)fontOut).NativePointer = fontOut_;
                 __result__.CheckError();
             }
         }
コード例 #4
0
ファイル: Functions.cs プロジェクト: alexey-bez/SharpDX
        /// <summary>	
        /// <p>Counts number of frames in a subtree that have non-null names.</p>	
        /// </summary>	
        /// <param name="frameRootRef"><dd>  <p>Pointer to the root node of the subtree.</p> </dd></param>	
        /// <returns><p>Returns the frame count.</p></returns>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='D3DXFrameNumNamedMatrices']/*"/>	
        /// <msdn-id>bb172850</msdn-id>	
        /// <unmanaged>unsigned int D3DXFrameNumNamedMatrices([In] const D3DXFRAME* pFrameRoot)</unmanaged>	
        /// <unmanaged-short>D3DXFrameNumNamedMatrices</unmanaged-short>	
        public static int FrameNumNamedMatrices(ref SharpDX.Direct3D9.Frame frameRootRef) {
            unsafe {
                var frameRootRef_ = new SharpDX.Direct3D9.Frame.__Native();
                frameRootRef.__MarshalTo(ref frameRootRef_);
                int __result__;
                __result__= 
				D3DXFrameNumNamedMatrices_(&frameRootRef_);		
                frameRootRef.__MarshalFree(ref frameRootRef_);
                return __result__;
            }
        }
コード例 #5
0
ファイル: Functions.cs プロジェクト: alexey-bez/SharpDX
        /// <summary>	
        /// <p>Finds the child frame of a root frame.</p>	
        /// </summary>	
        /// <param name="frameRootRef"><dd>  <p>Pointer to the root frame. See <strong><see cref="SharpDX.Direct3D9.Frame"/></strong>.</p> </dd></param>	
        /// <param name="name"><dd>  <p>Name of the child frame to find.</p> </dd></param>	
        /// <returns><p>Returns the child frame if it is found, or <strong><c>null</c></strong> otherwise. See <strong><see cref="SharpDX.Direct3D9.Frame"/></strong>.</p></returns>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='D3DXFrameFind']/*"/>	
        /// <msdn-id>bb172849</msdn-id>	
        /// <unmanaged>D3DXFRAME* D3DXFrameFind([In] const D3DXFRAME* pFrameRoot,[In] const char* Name)</unmanaged>	
        /// <unmanaged-short>D3DXFrameFind</unmanaged-short>	
        public static SharpDX.Direct3D9.Frame FrameFind(ref SharpDX.Direct3D9.Frame frameRootRef, string name) {
            unsafe {
                var frameRootRef_ = new SharpDX.Direct3D9.Frame.__Native();
                frameRootRef.__MarshalTo(ref frameRootRef_);
                IntPtr name_ = Utilities.StringToHGlobalAnsi(name);
                SharpDX.Direct3D9.Frame __result__;
                __result__= 
				D3DXFrameFind_(&frameRootRef_, (void*)name_);		
                frameRootRef.__MarshalFree(ref frameRootRef_);
                Marshal.FreeHGlobal(name_ );
                return __result__;
            }
        }
コード例 #6
0
ファイル: Functions.cs プロジェクト: alexey-bez/SharpDX
        /// <summary>	
        /// <p>Creates a .x file and saves the mesh hierarchy and corresponding animations in it.</p>	
        /// </summary>	
        /// <param name="filename"><dd>  <p>Pointer to a string that specifies the name of the .x file identifying the saved mesh. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the string data type resolves to LPCSTR. See Remarks.</p> </dd></param>	
        /// <param name="xFormat"><dd>  <p>Format of the .x file (text or binary, compressed or not). See <see cref="SharpDX.Direct3D9.XFileFormat"/>. <see cref="SharpDX.Direct3D9.XFileFormat.Compressed"/> can be combined (using a logical OR) with either the <see cref="SharpDX.Direct3D9.XFileFormat.Binary"/> or <see cref="SharpDX.Direct3D9.XFileFormat.Text"/> flags to reduce the output file size.</p> </dd></param>	
        /// <param name="frameRootRef"><dd>  <p>Root node of the hierarchy to be saved. See <strong><see cref="SharpDX.Direct3D9.Frame"/></strong>.</p> </dd></param>	
        /// <param name="animControllerRef"><dd>  <p>Animation controller that has animation sets to be stored. See <strong><see cref="SharpDX.Direct3D9.AnimationController"/></strong>.</p> </dd></param>	
        /// <param name="userDataSaverRef"><dd>  <p>Application-provided interface that allows saving of user data. See <strong><see cref="SharpDX.Direct3D9.ISaveUserData"/></strong>.</p> </dd></param>	
        /// <returns><p>If the function succeeds, the return value is <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. If the function fails, the return value can be: <see cref="SharpDX.Direct3D9.ResultCode.InvalidCall"/>.</p></returns>	
        /// <remarks>	
        /// <p>The compiler setting also determines the function version. If Unicode is defined, the function call resolves to <see cref="SharpDX.Direct3D9.D3DX9.SaveMeshHierarchyToFileW"/>. Otherwise, the function call resolves to D3DXSaveMeshHierarchyToFileA.</p><p>This function does not save compressed animation sets.</p>	
        /// </remarks>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='D3DXSaveMeshHierarchyToFileW']/*"/>	
        /// <msdn-id>bb205427</msdn-id>	
        /// <unmanaged>HRESULT D3DXSaveMeshHierarchyToFileW([In] const wchar_t* Filename,[In] unsigned int XFormat,[In] const D3DXFRAME* pFrameRoot,[In] ID3DXAnimationController* pAnimController,[In] ID3DXSaveUserData* pUserDataSaver)</unmanaged>	
        /// <unmanaged-short>D3DXSaveMeshHierarchyToFileW</unmanaged-short>	
        public static void SaveMeshHierarchyToFileW(string filename, int xFormat, ref SharpDX.Direct3D9.Frame frameRootRef, SharpDX.Direct3D9.AnimationController animControllerRef, SharpDX.Direct3D9.ISaveUserData userDataSaverRef) {
            unsafe {
                IntPtr filename_ = Utilities.StringToHGlobalUni(filename);
                var frameRootRef_ = new SharpDX.Direct3D9.Frame.__Native();
                frameRootRef.__MarshalTo(ref frameRootRef_);
                SharpDX.Result __result__;
                __result__= 
				D3DXSaveMeshHierarchyToFileW_((void*)filename_, xFormat, &frameRootRef_, (void*)((animControllerRef == null)?IntPtr.Zero:animControllerRef.NativePointer), (void*)((userDataSaverRef == null)?IntPtr.Zero:userDataSaverRef.NativePointer));		
                Marshal.FreeHGlobal(filename_ );
                frameRootRef.__MarshalFree(ref frameRootRef_);
                __result__.CheckError();
            }
        }
コード例 #7
0
ファイル: Functions.cs プロジェクト: alexey-bez/SharpDX
        /// <summary>	
        /// <p>Given a frame hierarchy, registers all the named matrices in the animation mixer.</p>	
        /// </summary>	
        /// <param name="frameRootRef"><dd>  <p>The top level node in the frame hierarchy.</p> </dd></param>	
        /// <param name="animControllerRef"><dd>  <p>Pointer to the animation controller object.</p> </dd></param>	
        /// <returns><p>If the function succeeds, the return value is <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. If the function fails, the return value can be one of the following values: <see cref="SharpDX.Direct3D9.ResultCode.InvalidCall"/>, E_OUTOFMEMORY.</p></returns>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='D3DXFrameRegisterNamedMatrices']/*"/>	
        /// <msdn-id>bb172851</msdn-id>	
        /// <unmanaged>HRESULT D3DXFrameRegisterNamedMatrices([In] D3DXFRAME* pFrameRoot,[In] ID3DXAnimationController* pAnimController)</unmanaged>	
        /// <unmanaged-short>D3DXFrameRegisterNamedMatrices</unmanaged-short>	
        public static void FrameRegisterNamedMatrices(ref SharpDX.Direct3D9.Frame frameRootRef, SharpDX.Direct3D9.AnimationController animControllerRef) {
            unsafe {
                var frameRootRef_ = new SharpDX.Direct3D9.Frame.__Native();
                frameRootRef.__MarshalTo(ref frameRootRef_);
                SharpDX.Result __result__;
                __result__= 
				D3DXFrameRegisterNamedMatrices_(&frameRootRef_, (void*)((animControllerRef == null)?IntPtr.Zero:animControllerRef.NativePointer));		
                frameRootRef.__MarshalFree(ref frameRootRef_);
                __result__.CheckError();
            }
        }
コード例 #8
0
ファイル: Functions.cs プロジェクト: alexey-bez/SharpDX
        /// <summary>	
        /// <p>Generates a simplified mesh using the provided weights that come as close as possible to the given MinValue.</p>	
        /// </summary>	
        /// <param name="meshRef"><dd>  <p>Pointer to an <strong><see cref="SharpDX.Direct3D9.Mesh"/></strong> interface, representing the source mesh.</p> </dd></param>	
        /// <param name="adjacencyRef"><dd>  <p>Pointer to an array of three  DWORDs per face that specify the three neighbors for each face in the mesh to be simplified.</p> </dd></param>	
        /// <param name="vertexAttributeWeightsRef"><dd>  <p>Pointer to a <strong><see cref="SharpDX.Direct3D9.AttributeWeights"/></strong> structure, containing the weight for each vertex component. If this parameter is set to <strong><c>null</c></strong>, a default structure is used. See Remarks.</p> </dd></param>	
        /// <param name="vertexWeightsRef"><dd>  <p>Pointer to an array of vertex weights. If this parameter is set to <strong><c>null</c></strong>, all vertex weights are set to 1.0.</p> </dd></param>	
        /// <param name="minValue"><dd>  <p>Number of vertices or faces, depending on the flag set in the  <em>Options</em> parameter, by which to simplify the source mesh.</p> </dd></param>	
        /// <param name="options"><dd>  <p>Specifies simplification options for the mesh. One of the flags in <strong>D3DXMESHSIMP</strong> can be set.</p> </dd></param>	
        /// <param name="meshOut"><dd>  <p>Address of a reference to an <strong><see cref="SharpDX.Direct3D9.Mesh"/></strong> interface, representing the returned simplification mesh.</p> </dd></param>	
        /// <returns><p>If the function succeeds, the return value is <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. If the function fails, the return value can be one of the following: <see cref="SharpDX.Direct3D9.ResultCode.InvalidCall"/>, D3DXERR_INVALIDDATA, E_OUTOFMEMORY.</p></returns>	
        /// <remarks>	
        /// <p>This function generates a mesh that has <em>MinValue</em> vertices or faces.</p><p>If the simplification process cannot reduce the mesh to <em>MinValue</em>, the call still succeeds because <em>MinValue</em> is a desired minimum, not an absolute minimum.</p><p>If <em>pVertexAttributeWeights</em> is set to <strong><c>null</c></strong>, the following values are assigned to the default <strong><see cref="SharpDX.Direct3D9.AttributeWeights"/></strong> structure.</p><pre> <see cref="SharpDX.Direct3D9.AttributeWeights"/> AttributeWeights; AttributeWeights.Position  = 1.0;	
        /// AttributeWeights.Boundary =  1.0;	
        /// AttributeWeights.Normal   =  1.0;	
        /// AttributeWeights.Diffuse  =  0.0;	
        /// AttributeWeights.Specular =  0.0;	
        /// AttributeWeights.Tex[8]   =  {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};	
        /// </pre><p>This default structure is what most applications should use because it considers only geometric and normal adjustment. Only in special cases will the other member fields need to be modified. </p>	
        /// </remarks>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='D3DXSimplifyMesh']/*"/>	
        /// <msdn-id>bb205463</msdn-id>	
        /// <unmanaged>HRESULT D3DXSimplifyMesh([In] ID3DXMesh* pMesh,[In] const unsigned int* pAdjacency,[In] const D3DXATTRIBUTEWEIGHTS* pVertexAttributeWeights,[In] const float* pVertexWeights,[In] unsigned int MinValue,[In] unsigned int Options,[In] ID3DXMesh** ppMesh)</unmanaged>	
        /// <unmanaged-short>D3DXSimplifyMesh</unmanaged-short>	
        public static void SimplifyMesh(SharpDX.Direct3D9.Mesh meshRef, int adjacencyRef, ref SharpDX.Direct3D9.AttributeWeights vertexAttributeWeightsRef, float vertexWeightsRef, int minValue, int options, out SharpDX.Direct3D9.Mesh meshOut) {
            unsafe {
                var vertexAttributeWeightsRef_ = new SharpDX.Direct3D9.AttributeWeights.__Native();
                vertexAttributeWeightsRef.__MarshalTo(ref vertexAttributeWeightsRef_);
                IntPtr meshOut_ = IntPtr.Zero;
                SharpDX.Result __result__;
                __result__= 
				D3DXSimplifyMesh_((void*)((meshRef == null)?IntPtr.Zero:meshRef.NativePointer), &adjacencyRef, &vertexAttributeWeightsRef_, &vertexWeightsRef, minValue, options, &meshOut_);		
                vertexAttributeWeightsRef.__MarshalFree(ref vertexAttributeWeightsRef_);
                meshOut= (meshOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D9.Mesh(meshOut_);	
                __result__.CheckError();
            }
        }
コード例 #9
0
ファイル: Interfaces.cs プロジェクト: alexey-bez/SharpDX
        /// <summary>	
        /// Creates and initializes an instance of an effect identified by the effect globally unique identifier (<see cref="System.Guid"/>).	
        /// </summary>	
        /// <param name="arg0"><dd> Reference to (C++) or address of (C) the <see cref="System.Guid"/> identifying the effect to be created. This can be a predefined effect <see cref="System.Guid"/>, or it can be a <see cref="System.Guid"/> obtained from <see cref="SharpDX.DirectInput.Device.EnumEffects"/>. The following standard effect GUIDs are defined: <ul> <li><p><see cref="SharpDX.DirectInput.EffectGuid.ConstantForce"/> </p></li> <li><p><see cref="SharpDX.DirectInput.EffectGuid.RampForce"/> </p></li> <li><p><see cref="SharpDX.DirectInput.EffectGuid.Square"/> </p></li> <li><p><see cref="SharpDX.DirectInput.EffectGuid.Sine"/> </p></li> <li><p><see cref="SharpDX.DirectInput.EffectGuid.Triangle"/> </p></li> <li><p><see cref="SharpDX.DirectInput.EffectGuid.SawtoothUp"/> </p></li> <li><p><see cref="SharpDX.DirectInput.EffectGuid.SawtoothDown"/> </p></li> <li><p><see cref="SharpDX.DirectInput.EffectGuid.Spring"/> </p></li> <li><p><see cref="SharpDX.DirectInput.EffectGuid.Damper"/> </p></li> <li><p><see cref="SharpDX.DirectInput.EffectGuid.Inertia"/> </p></li> <li><p><see cref="SharpDX.DirectInput.EffectGuid.Friction"/> </p></li> <li><p><see cref="SharpDX.DirectInput.EffectGuid.CustomForce"/> </p></li> </ul> </dd></param>	
        /// <param name="arg1"><dd> <see cref="SharpDX.DirectInput.EffectParameters"/> structure that provides parameters for the created effect. This parameter is optional. If it is <c>null</c>, the effect object is created without parameters. The application must then call the <see cref="SharpDX.DirectInput.Effect.SetParameters"/> method to set the parameters of the effect before it can download the effect.  </dd></param>	
        /// <param name="arg2"><dd> Address of a variable to receive a reference to the  <see cref="SharpDX.DirectInput.Effect"/> Interface interface if successful.  </dd></param>	
        /// <param name="arg3"><dd> Controlling unknown for COM aggregation. The value is <c>null</c> if the interface is not aggregated. Most calling applications pass <c>null</c>.  </dd></param>	
        /// <returns><p>If the method succeeds, the return value is <see cref="SharpDX.DirectInput.ResultCode.Ok"/>. If the method fails, the return value can be one of the following error values: <see cref="SharpDX.DirectInput.ResultCode.DeviceFull"/>, <see cref="SharpDX.DirectInput.ResultCode.DeviceNotRegistered"/>,<see cref="SharpDX.DirectInput.ResultCode.InvalidParam"/>, <see cref="SharpDX.DirectInput.ResultCode.NotInitialized"/>.</p></returns>	
        /// <remarks>	
        /// <p>If the return value is <see cref="SharpDX.Result.Ok"/>, the effect was created, and the parameters of the effect were updated, but the effect was not necessarily downloaded. For it to be downloaded, the device must be acquired in exclusive mode.</p>	
        /// </remarks>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='IDirectInputDevice8W::CreateEffect']/*"/>	
        /// <msdn-id>microsoft.directx_sdk.idirectinputdevice8.idirectinputdevice8.createeffect</msdn-id>	
        /// <unmanaged>HRESULT IDirectInputDevice8W::CreateEffect([In] const GUID&amp; arg0,[In] const DIEFFECT* arg1,[Out, Fast] IDirectInputEffect** arg2,[In] IUnknown* arg3)</unmanaged>	
        /// <unmanaged-short>IDirectInputDevice8W::CreateEffect</unmanaged-short>	
        internal void CreateEffect(System.Guid arg0, SharpDX.DirectInput.EffectParameters arg1, SharpDX.DirectInput.Effect arg2, SharpDX.ComObject arg3) {
            unsafe {
                var arg1_ = SharpDX.DirectInput.EffectParameters.__NewNative();
                arg1.__MarshalTo(ref arg1_);
                IntPtr arg2_ = IntPtr.Zero;
                SharpDX.Result __result__;
                __result__= 
				SharpDX.DirectInput.LocalInterop.Calliint(_nativePointer, &arg0, &arg1_, &arg2_, (void*)((arg3 == null)?IntPtr.Zero:arg3.NativePointer),((void**)(*(void**)_nativePointer))[18]);		
                arg1.__MarshalFree(ref arg1_);
                ((SharpDX.DirectInput.Effect)arg2).NativePointer = arg2_;
                __result__.CheckError();
            }
        }
コード例 #10
0
ファイル: Interfaces.cs プロジェクト: alexey-bez/SharpDX
        /// <summary>	
        /// Sets the data format for the DirectInput  device.	
        /// </summary>	
        /// <param name="arg0"><dd> Address of a structure that describes the format of the data that the DirectInputDevice should return. An application can define its own <see cref="SharpDX.DirectInput.DataFormat"/> structure or use one of the following predefined global variables: <ul> <li><p> c_dfDIKeyboard </p></li> <li><p> c_dfDIMouse </p></li> <li><p> c_dfDIMouse2 </p></li> <li><p> c_dfDIJoystick </p></li> <li><p> c_dfDIJoystick2 </p></li> </ul> </dd></param>	
        /// <returns><p>If the method succeeds, the return value is <see cref="SharpDX.DirectInput.ResultCode.Ok"/>. If the method fails, the return value can be one of the following error values: <see cref="SharpDX.DirectInput.ResultCode.Acquired"/>, <see cref="SharpDX.DirectInput.ResultCode.InvalidParam"/>, <see cref="SharpDX.DirectInput.ResultCode.NotInitialized"/>.</p></returns>	
        /// <remarks>	
        /// <p>The data format must be set before the device can be acquired by using the <see cref="SharpDX.DirectInput.Device"/> Interface method. It is necessary to set the data format only once. The data format cannot be changed while the device is acquired.</p> <p>If the application is using action mapping, the data format is set instead by the call to <see cref="SharpDX.DirectInput.Device.SetActionMap"/>.</p>	
        /// </remarks>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='IDirectInputDevice8W::SetDataFormat']/*"/>	
        /// <msdn-id>microsoft.directx_sdk.idirectinputdevice8.idirectinputdevice8.setdataformat</msdn-id>	
        /// <unmanaged>HRESULT IDirectInputDevice8W::SetDataFormat([In] const DIDATAFORMAT* arg0)</unmanaged>	
        /// <unmanaged-short>IDirectInputDevice8W::SetDataFormat</unmanaged-short>	
        internal void SetDataFormat(SharpDX.DirectInput.DataFormat arg0) {
            unsafe {
                var arg0_ = SharpDX.DirectInput.DataFormat.__NewNative();
                arg0.__MarshalTo(ref arg0_);
                SharpDX.Result __result__;
                __result__= 
				SharpDX.DirectInput.LocalInterop.Calliint(_nativePointer, &arg0_,((void**)(*(void**)_nativePointer))[11]);		
                arg0.__MarshalFree(ref arg0_);
                __result__.CheckError();
            }
        }
コード例 #11
0
ファイル: Interfaces.cs プロジェクト: alexey-bez/SharpDX
        /// <summary>	
        /// No documentation.	
        /// </summary>	
        /// <param name="arg0">No documentation.</param>	
        /// <param name="arg1">No documentation.</param>	
        /// <returns>No documentation.</returns>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='IDirectInputEffect::SetParameters']/*"/>	
        /// <unmanaged>HRESULT IDirectInputEffect::SetParameters([In] const DIEFFECT* arg0,[In] DIEP arg1)</unmanaged>	
        /// <unmanaged-short>IDirectInputEffect::SetParameters</unmanaged-short>	
        public void SetParameters(SharpDX.DirectInput.EffectParameters arg0, SharpDX.DirectInput.EffectParameterFlags arg1) {
            unsafe {
                var arg0_ = SharpDX.DirectInput.EffectParameters.__NewNative();
                arg0.__MarshalTo(ref arg0_);
                SharpDX.Result __result__;
                __result__= 
				SharpDX.DirectInput.LocalInterop.Calliint(_nativePointer, &arg0_, unchecked((int)arg1),((void**)(*(void**)_nativePointer))[6]);		
                arg0.__MarshalFree(ref arg0_);
                __result__.CheckError();
            }
        }
コード例 #12
0
ファイル: Interfaces.cs プロジェクト: alexey-bez/SharpDX
        /// <summary>	
        /// Enumerates devices that most closely match the application-specified action map.	
        /// </summary>	
        /// <param name="arg0"><dd> String identifying the current user, or <c>null</c> to specify the user logged onto the system. The user name is taken into account when enumerating devices. A device with user mappings is preferred to a device without any user mappings. By default, devices in use by other users are not enumerated for this user. </dd></param>	
        /// <param name="arg1"><dd> Address of a <see cref="SharpDX.DirectInput.ActionFormat"/> structure that specifies the action map for which suitable devices are enumerated.  </dd></param>	
        /// <param name="arg2"><dd> Address of a callback function to be called once for each device enumerated. See DIEnumDevicesBySemanticsCallback.  </dd></param>	
        /// <param name="arg3"><dd> Application-defined 32-bit value to pass to the enumeration callback each time it is called.  </dd></param>	
        /// <param name="arg4"><dd> Flag value that specifies the scope of the enumeration. This parameter can be one or more of the following values.  <dl> <dt>DIEDBSFL_ATTACHEDONLY</dt> <dd>Only attached and installed devices are enumerated. </dd> <dt>DIEDBSFL_AVAILABLEDEVICES</dt> <dd>Only unowned, installed devices are enumerated. </dd> <dt>DIEDBSFL_FORCEFEEDBACK</dt> <dd>Only devices that support force feedback are enumerated. </dd> <dt>DIEDBSFL_MULTIMICEKEYBOARDS</dt> <dd>Only secondary (non-system) keyboard and mouse devices. </dd> <dt>DIEDBSFL_NONGAMINGDEVICES</dt> <dd>Only HID-compliant devices whose primary purpose is not as a gaming device. Devices such as USB speakers and multimedia buttons on some keyboards would fall within this value. </dd> <dt>DIEDBSFL_THISUSER</dt> <dd>All installed devices for the user identified by  ptszUserName, and all unowned devices, are enumerated. </dd> <dt>DIEDBSFL_VALID</dt> <dd>DIEDBSFL_VALID is also defined in Dinput.h, but is not used by applications. </dd> </dl> </dd></param>	
        /// <returns><p>If the method succeeds, the return value is <see cref="SharpDX.DirectInput.ResultCode.Ok"/>. If the method fails, the return value can be one of the following error values: <see cref="SharpDX.DirectInput.ResultCode.InvalidParam"/>, <see cref="SharpDX.DirectInput.ResultCode.NotInitialized"/>.</p></returns>	
        /// <remarks>	
        /// <p>The keyboard and mouse are enumerated last.</p> <table><tr><th>Note </th></tr><tr><td>The order in which devices are enumerated by DirectInput is not guaranteed.</td></tr></table>	
        /// </remarks>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='IDirectInput8W::EnumDevicesBySemantics']/*"/>	
        /// <msdn-id>microsoft.directx_sdk.idirectinput8.idirectinput8.enumdevicesbysemantics</msdn-id>	
        /// <unmanaged>HRESULT IDirectInput8W::EnumDevicesBySemantics([In] const wchar_t* arg0,[In] DIACTIONFORMATW* arg1,[In] __function__stdcall* arg2,[In] void* arg3,[In] unsigned int arg4)</unmanaged>	
        /// <unmanaged-short>IDirectInput8W::EnumDevicesBySemantics</unmanaged-short>	
        internal void EnumDevicesBySemantics(string arg0, ref SharpDX.DirectInput.ActionFormat arg1, SharpDX.FunctionCallback arg2, System.IntPtr arg3, int arg4) {
            unsafe {
                IntPtr arg0_ = Utilities.StringToHGlobalUni(arg0);
                var arg1_ = new SharpDX.DirectInput.ActionFormat.__Native();
                arg1.__MarshalTo(ref arg1_);
                SharpDX.Result __result__;
                __result__= 
				SharpDX.DirectInput.LocalInterop.Calliint(_nativePointer, (void*)arg0_, &arg1_, arg2, (void*)arg3, arg4,((void**)(*(void**)_nativePointer))[9]);		
                Marshal.FreeHGlobal(arg0_ );
                arg1.__MarshalFree(ref arg1_);
                __result__.CheckError();
            }
        }
コード例 #13
0
ファイル: Interfaces.cs プロジェクト: alexey-bez/SharpDX
     /// <summary>	
     /// The CreateSoundBuffer method creates a sound buffer object to manage audio samples.	
     /// </summary>	
     /// <param name="cDSBufferDescRef"><dd> Address of a <see cref="SharpDX.DirectSound.SoundBufferDescription"/> structure that describes the sound buffer to create. </dd></param>	
     /// <param name="dSBufferOut"><dd> Address of a variable that receives the <see cref="SharpDX.DirectSound.SoundBuffer"/> interface of the new buffer object. Use QueryInterface to obtain <see cref="SharpDX.DirectSound.SecondarySoundBuffer"/>. <see cref="SharpDX.DirectSound.SecondarySoundBuffer"/> is not available for the primary buffer. </dd></param>	
     /// <param name="unkOuterRef"><dd> Address of the controlling object's <see cref="SharpDX.ComObject"/> interface for COM aggregation. Must be <c>null</c>. </dd></param>	
     /// <returns><p>If the method succeeds, the return value is DS_OK, or DS_NO_VIRTUALIZATION if a requested 3D algorithm was not available and stereo panning was substituted. See the description of the guid3DAlgorithm member of <see cref="SharpDX.DirectSound.SoundBufferDescription"/>. If the method fails, the return value may be one of the error values shown in the following table.</p> <table> <tr><td>Return code</td></tr> <tr><td>DSERR_ALLOCATED </td></tr> <tr><td>DSERR_BADFORMAT </td></tr> <tr><td>DSERR_BUFFERTOOSMALL </td></tr> <tr><td>DSERR_CONTROLUNAVAIL </td></tr> <tr><td>DSERR_DS8_REQUIRED </td></tr> <tr><td>DSERR_INVALIDCALL </td></tr> <tr><td>DSERR_INVALIDPARAM </td></tr> <tr><td>DSERR_NOAGGREGATION </td></tr> <tr><td>DSERR_OUTOFMEMORY </td></tr> <tr><td>DSERR_UNINITIALIZED </td></tr> <tr><td>DSERR_UNSUPPORTED </td></tr> </table></returns>	
     /// <remarks>	
     /// <p>DirectSound does not initialize the contents of the buffer, and the application cannot assume that it contains silence.</p> <p>If an attempt is made to create a buffer with the <see cref="SharpDX.DirectSound.BufferFlags.Hardware"/> flag on a system where hardware acceleration is not available, the method fails with either DSERR_CONTROLUNAVAIL or DSERR_INVALIDCALL, depending on the operating system.</p>	
     /// </remarks>	
     /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='IDirectSound::CreateSoundBuffer']/*"/>	
     /// <msdn-id>microsoft.directx_sdk.idirectsound8.idirectsound8.createsoundbuffer</msdn-id>	
     /// <unmanaged>HRESULT IDirectSound::CreateSoundBuffer([In] const DSBUFFERDESC* pcDSBufferDesc,[Out] void** ppDSBuffer,[In] IUnknown* pUnkOuter)</unmanaged>	
     /// <unmanaged-short>IDirectSound::CreateSoundBuffer</unmanaged-short>	
     internal void CreateSoundBuffer(SharpDX.DirectSound.SoundBufferDescription cDSBufferDescRef, out System.IntPtr dSBufferOut, SharpDX.ComObject unkOuterRef) {
         unsafe {
             var cDSBufferDescRef_ = SharpDX.DirectSound.SoundBufferDescription.__NewNative();
             cDSBufferDescRef.__MarshalTo(ref cDSBufferDescRef_);
             SharpDX.Result __result__;
             fixed (void* dSBufferOut_ = &dSBufferOut)
                 __result__= 
 				SharpDX.DirectSound.LocalInterop.Calliint(_nativePointer, &cDSBufferDescRef_, dSBufferOut_, (void*)((unkOuterRef == null)?IntPtr.Zero:unkOuterRef.NativePointer),((void**)(*(void**)_nativePointer))[3]);		
             cDSBufferDescRef.__MarshalFree(ref cDSBufferDescRef_);
             __result__.CheckError();
         }
     }
コード例 #14
0
ファイル: Interfaces.cs プロジェクト: alexey-bez/SharpDX
        /// <summary>	
        /// The SetAllParameters method sets all 3D parameters of the sound environment and the listener.	
        /// </summary>	
        /// <param name="cListenerRef"><dd> Address of a <see cref="SharpDX.DirectSound.Listener3DSettings"/> structure that contains information describing all 3D listener parameters. </dd></param>	
        /// <param name="apply"><dd> Value that specifies when the setting should be applied. This value must be one of the following: <table> <tr><td>Value</td><td>Description</td></tr> <tr><td>DS3D_DEFERRED</td><td>Settings are not applied until the application calls the CommitDeferredSettings method. This allows the application to change several settings and generate a single recalculation.</td></tr> <tr><td>DS3D_IMMEDIATE</td><td>Settings are applied immediately, causing the system to recalculate the 3D coordinates for all 3D sound buffers.</td></tr> </table> </dd></param>	
        /// <returns><p>If the method succeeds, the return value is DS_OK. If the method fails, the return value may be DSERR_INVALIDPARAM.</p></returns>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='IDirectSound3DListener::SetAllParameters']/*"/>	
        /// <msdn-id>microsoft.directx_sdk.idirectsound3dlistener8.idirectsound3dlistener8.setallparameters</msdn-id>	
        /// <unmanaged>HRESULT IDirectSound3DListener::SetAllParameters([In] const DS3DLISTENER* pcListener,[In] unsigned int dwApply)</unmanaged>	
        /// <unmanaged-short>IDirectSound3DListener::SetAllParameters</unmanaged-short>	
        internal void SetAllParameters(SharpDX.DirectSound.Listener3DSettings cListenerRef, int apply) {
            unsafe {
                var cListenerRef_ = SharpDX.DirectSound.Listener3DSettings.__NewNative();
                cListenerRef.__MarshalTo(ref cListenerRef_);
                SharpDX.Result __result__;
                __result__= 
				SharpDX.DirectSound.LocalInterop.Calliint(_nativePointer, &cListenerRef_, apply,((void**)(*(void**)_nativePointer))[10]);		
                cListenerRef.__MarshalFree(ref cListenerRef_);
                __result__.CheckError();
            }
        }
コード例 #15
0
ファイル: Interfaces.cs プロジェクト: alexey-bez/SharpDX
        /// <summary>	
        /// The Initialize method initializes a sound buffer object if it has not yet been initialized.	
        /// </summary>	
        /// <param name="directSoundRef"><dd> Address of the device object associated with this buffer. </dd></param>	
        /// <param name="cDSBufferDescRef"><dd> Address of a <see cref="SharpDX.DirectSound.SoundBufferDescription"/> structure that contains the values used to initialize this sound buffer. </dd></param>	
        /// <returns><p>If the method succeeds, the return value is DS_OK. If the method fails, the return value may be one of the following error values.</p> <table> <tr><td>Return code</td></tr> <tr><td>DSERR_INVALIDPARAM </td></tr> <tr><td>DSERR_ALREADYINITIALIZED </td></tr> </table></returns>	
        /// <remarks>	
        /// <p>Because the CreateSoundBuffer method calls Initialize internally, applications do not need to call this method.</p>	
        /// </remarks>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='IDirectSoundBuffer::Initialize']/*"/>	
        /// <msdn-id>microsoft.directx_sdk.idirectsoundbuffer8.idirectsoundbuffer8.initialize</msdn-id>	
        /// <unmanaged>HRESULT IDirectSoundBuffer::Initialize([In] IDirectSound* pDirectSound,[In] const DSBUFFERDESC* pcDSBufferDesc)</unmanaged>	
        /// <unmanaged-short>IDirectSoundBuffer::Initialize</unmanaged-short>	
        public void Initialize(SharpDX.DirectSound.DirectSoundBase directSoundRef, SharpDX.DirectSound.SoundBufferDescription cDSBufferDescRef) {
            unsafe {
                var cDSBufferDescRef_ = SharpDX.DirectSound.SoundBufferDescription.__NewNative();
                cDSBufferDescRef.__MarshalTo(ref cDSBufferDescRef_);
                SharpDX.Result __result__;
                __result__= 
				SharpDX.DirectSound.LocalInterop.Calliint(_nativePointer, (void*)((directSoundRef == null)?IntPtr.Zero:directSoundRef.NativePointer), &cDSBufferDescRef_,((void**)(*(void**)_nativePointer))[10]);		
                cDSBufferDescRef.__MarshalFree(ref cDSBufferDescRef_);
                __result__.CheckError();
            }
        }
コード例 #16
0
ファイル: Functions.cs プロジェクト: alexey-bez/SharpDX
        /// <summary>	
        /// No documentation.	
        /// </summary>	
        /// <param name="meshRef">No documentation.</param>	
        /// <param name="adjacencyRef">No documentation.</param>	
        /// <param name="vertexAttributeWeightsRef">No documentation.</param>	
        /// <param name="vertexWeightsRef">No documentation.</param>	
        /// <param name="sMeshOut">No documentation.</param>	
        /// <returns>No documentation.</returns>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='D3DXCreateSPMesh']/*"/>	
        /// <unmanaged>HRESULT D3DXCreateSPMesh([In] ID3DXMesh* pMesh,[In] const unsigned int* pAdjacency,[In] const D3DXATTRIBUTEWEIGHTS* pVertexAttributeWeights,[In] const float* pVertexWeights,[In] ID3DXSPMesh** ppSMesh)</unmanaged>	
        /// <unmanaged-short>D3DXCreateSPMesh</unmanaged-short>	
        public static void CreateSPMesh(SharpDX.Direct3D9.Mesh meshRef, int adjacencyRef, ref SharpDX.Direct3D9.AttributeWeights vertexAttributeWeightsRef, float vertexWeightsRef, out SharpDX.Direct3D9.SimplificationMesh sMeshOut) {
            unsafe {
                var vertexAttributeWeightsRef_ = new SharpDX.Direct3D9.AttributeWeights.__Native();
                vertexAttributeWeightsRef.__MarshalTo(ref vertexAttributeWeightsRef_);
                IntPtr sMeshOut_ = IntPtr.Zero;
                SharpDX.Result __result__;
                __result__= 
				D3DXCreateSPMesh_((void*)((meshRef == null)?IntPtr.Zero:meshRef.NativePointer), &adjacencyRef, &vertexAttributeWeightsRef_, &vertexWeightsRef, &sMeshOut_);		
                vertexAttributeWeightsRef.__MarshalFree(ref vertexAttributeWeightsRef_);
                sMeshOut= (sMeshOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D9.SimplificationMesh(sMeshOut_);	
                __result__.CheckError();
            }
        }
コード例 #17
0
ファイル: Functions.cs プロジェクト: alexey-bez/SharpDX
        /// <summary>	
        /// <p>Adds a child frame to a frame.</p>	
        /// </summary>	
        /// <param name="frameParentRef"><dd>  <p>Pointer to the parent node.</p> </dd></param>	
        /// <param name="frameChildRef"><dd>  <p>Pointer to the child node.</p> </dd></param>	
        /// <returns><p>If the function succeeds, the return value is <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. If the function fails, the return value can be one of the following values: <see cref="SharpDX.Direct3D9.ResultCode.InvalidCall"/>, E_OUTOFMEMORY.</p></returns>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='D3DXFrameAppendChild']/*"/>	
        /// <msdn-id>bb172846</msdn-id>	
        /// <unmanaged>HRESULT D3DXFrameAppendChild([In] D3DXFRAME* pFrameParent,[In] const D3DXFRAME* pFrameChild)</unmanaged>	
        /// <unmanaged-short>D3DXFrameAppendChild</unmanaged-short>	
        public static void FrameAppendChild(ref SharpDX.Direct3D9.Frame frameParentRef, ref SharpDX.Direct3D9.Frame frameChildRef) {
            unsafe {
                var frameParentRef_ = new SharpDX.Direct3D9.Frame.__Native();
                frameParentRef.__MarshalTo(ref frameParentRef_);
                var frameChildRef_ = new SharpDX.Direct3D9.Frame.__Native();
                frameChildRef.__MarshalTo(ref frameChildRef_);
                SharpDX.Result __result__;
                __result__= 
				D3DXFrameAppendChild_(&frameParentRef_, &frameChildRef_);		
                frameParentRef.__MarshalFree(ref frameParentRef_);
                frameChildRef.__MarshalFree(ref frameChildRef_);
                __result__.CheckError();
            }
        }
コード例 #18
0
ファイル: Interfaces.cs プロジェクト: alexey-bez/SharpDX
        /// <summary>	
        /// Sets the data format for a device and maps application-defined actions to device objects. It also sets the buffer size for buffered data.	
        /// </summary>	
        /// <param name="arg0"><dd> Address of a <see cref="SharpDX.DirectInput.ActionFormat"/> structure containing information about the action map to be applied.  </dd></param>	
        /// <param name="arg1"><dd> Unicode string that specifies the name of the user for which the action map is being set. A value of <c>null</c> specifies the user currently logged into the system.  </dd></param>	
        /// <param name="arg2"><dd> DWORD value that specifies how the action map is applied. This can be one of the following values.  <dl> <dt>DIDSAM_DEFAULT</dt> <dd> Set the action map for this user. If the map differs from the current map, the new settings are saved to disk. </dd> <dt>DIDSAM_FORCESAVE</dt> <dd> Always save the configuration to disk. </dd> <dt>DIDSAM_NOUSER</dt> <dd> Reset user ownership for this device in the default configuration property sheet. Resetting user ownership does not remove the current action map. </dd> </dl> </dd></param>	
        /// <returns><p>If the method succeeds, the return value can be one of the following error values: <see cref="SharpDX.DirectInput.ResultCode.Ok"/>, <see cref="SharpDX.DirectInput.ResultCode.SettingsNotSaved"/>, or <see cref="SharpDX.DirectInput.ResultCode.WriteProtect"/>. If the method fails, the return value can be one of the following error values: <see cref="SharpDX.DirectInput.ResultCode.Acquired"/> or <see cref="SharpDX.DirectInput.ResultCode.InvalidParam"/>, <see cref="SharpDX.DirectInput.ResultCode.SettingsNotSaved"/>, <see cref="SharpDX.DirectInput.ResultCode.WriteProtect"/>, <see cref="SharpDX.DirectInput.ResultCode.Acquired"/>, <see cref="SharpDX.DirectInput.ResultCode.InvalidParam"/>.</p></returns>	
        /// <remarks>	
        /// <p>This method provides the mechanism to change action-to-control mapping from the device defaults. An application must use this method to map its in-game actions to virtual controls.</p> <p>The user name passed to this method binds a set of action mappings for a device to a specific user. Settings are automatically saved to disk when they differ from the currently applied map. Applications that accept input from multiple users should be very careful when applying action maps to the system mouse or keyboard, as the action maps for each user may conflict.</p> <p>The method can be called only when the device is not acquired.</p> <p>If <see cref="SharpDX.DirectInput.Device.BuildActionMap"/> succeeds but no actions have been mapped, a subsequent call to <see cref="SharpDX.DirectInput.Device.SetActionMap"/> will return <see cref="SharpDX.DirectInput.ResultCode.Ok"/> but a call to <see cref="SharpDX.DirectInput.Device"/> Interface will fail with <see cref="SharpDX.DirectInput.ResultCode.InvalidParam"/>.</p>	
        /// </remarks>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='IDirectInputDevice8W::SetActionMap']/*"/>	
        /// <msdn-id>microsoft.directx_sdk.idirectinputdevice8.idirectinputdevice8.setactionmap</msdn-id>	
        /// <unmanaged>HRESULT IDirectInputDevice8W::SetActionMap([In] DIACTIONFORMATW* arg0,[In] const wchar_t* arg1,[In] unsigned int arg2)</unmanaged>	
        /// <unmanaged-short>IDirectInputDevice8W::SetActionMap</unmanaged-short>	
        internal void SetActionMap(ref SharpDX.DirectInput.ActionFormat arg0, string arg1, int arg2) {
            unsafe {
                var arg0_ = new SharpDX.DirectInput.ActionFormat.__Native();
                arg0.__MarshalTo(ref arg0_);
                IntPtr arg1_ = Utilities.StringToHGlobalUni(arg1);
                SharpDX.Result __result__;
                __result__= 
				SharpDX.DirectInput.LocalInterop.Calliint(_nativePointer, &arg0_, (void*)arg1_, arg2,((void**)(*(void**)_nativePointer))[30]);		
                arg0.__MarshalFree(ref arg0_);
                Marshal.FreeHGlobal(arg1_ );
                __result__.CheckError();
            }
        }
コード例 #19
0
ファイル: Functions.cs プロジェクト: alexey-bez/SharpDX
        /// <summary>	
        /// <p>Loads the first frame hierarchy from a .x file.</p>	
        /// </summary>	
        /// <param name="filename"><dd>  <p>Pointer to a string that specifies the filename. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the string data type resolves to LPCSTR. See Remarks.</p> </dd></param>	
        /// <param name="meshOptions"><dd>  <p>Combination of one or more flags from the <strong>D3DXMESH</strong> enumeration that specify creation options for the mesh.</p> </dd></param>	
        /// <param name="d3DDeviceRef"><dd>  <p>Pointer to an <strong><see cref="SharpDX.Direct3D9.Device"/></strong> interface, the device object associated with the mesh.</p> </dd></param>	
        /// <param name="allocRef"><dd>  <p>Pointer to an <strong><see cref="SharpDX.Direct3D9.IAllocateHierarchy"/></strong> interface.</p> </dd></param>	
        /// <param name="userDataLoaderRef"><dd>  <p>Application provided interface that allows loading of user data. See <strong><see cref="SharpDX.Direct3D9.ILoadUserData"/></strong>.</p> </dd></param>	
        /// <param name="frameHierarchyOut"><dd>  <p>Returns a reference to the loaded frame hierarchy. See <strong><see cref="SharpDX.Direct3D9.Frame"/></strong>.</p> </dd></param>	
        /// <param name="animControllerOut"><dd>  <p>Returns a reference to the animation controller corresponding to animation in the .x file. This is created with default tracks and events. See <strong><see cref="SharpDX.Direct3D9.AnimationController"/></strong>.</p> </dd></param>	
        /// <returns><p>If the function succeeds, the return value is <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. If the function fails, the return value can be one of the following values: <see cref="SharpDX.Direct3D9.ResultCode.InvalidCall"/>, E_OUTOFMEMORY.</p></returns>	
        /// <remarks>	
        /// <p>The compiler setting also determines the function version. If Unicode is defined, the function call resolves to <see cref="SharpDX.Direct3D9.D3DX9.LoadMeshHierarchyFromXW"/>. Otherwise, the function call resolves to D3DXLoadMeshHierarchyFromXA.</p><p>All the meshes in the file will be collapsed into one output mesh. If the file contains a frame hierarchy, all the transformations will be applied to the mesh.</p><p><strong><see cref="SharpDX.Direct3D9.D3DX9.LoadMeshHierarchyFromXW"/></strong> loads the animation data and frame hierarchy from a .x file. It scans the .x file and builds a frame hierarchy and animation controller according to the <strong><see cref="SharpDX.Direct3D9.IAllocateHierarchy"/></strong>-derived object passed to it through pAlloc. Loading the data requires several steps as follows:</p><ol> <li>Derive <strong><see cref="SharpDX.Direct3D9.IAllocateHierarchy"/></strong>, implementing each method.  This controls how frames and meshes are allocated and freed.</li> <li>Derive <strong><see cref="SharpDX.Direct3D9.ILoadUserData"/></strong>, implementing each method. If your .x file has no embedded user-defined data, or if you do not need it, you can skip this part.</li> <li>Create an object of your <strong><see cref="SharpDX.Direct3D9.IAllocateHierarchy"/></strong> class, and optionally of your LoadUserData class. You do not need to call any methods of these objects yourself.</li> <li>Call <strong><see cref="SharpDX.Direct3D9.D3DX9.LoadMeshHierarchyFromXW"/></strong>, passing in your <strong><see cref="SharpDX.Direct3D9.IAllocateHierarchy"/></strong> object and your <strong><see cref="SharpDX.Direct3D9.ILoadUserData"/></strong> object (or <strong><c>null</c></strong>) to create the frame hierarchy and animation controller.  All the animation sets and frames are automatically registered to the animation controller.</li> </ol><p>During the load, <strong>CreateFrame</strong> and <strong>LoadFrameChildData</strong> are called back on each frame to control loading and allocation of the frame.  The application defines these methods to control how frames are stored.  <strong>CreateMeshContainer</strong> and <strong>LoadMeshChildData</strong> are called back on each mesh object to control loading and allocation of mesh objects.  <strong>LoadTopLevelData</strong> is called back for each top level object that doesn't get loaded by the other methods.</p><p>To free this data, call ID3DXAnimationController::Release to free the animation sets, and <strong>D3DXFRAMEDestroy</strong>, passing in the root node of the frame hierarchy and an object of your derived <strong><see cref="SharpDX.Direct3D9.IAllocateHierarchy"/></strong> class.  <strong>DestroyFrame</strong> and <strong>DestroyMeshContainer</strong> will each be called for every frame and mesh object in the frame hierarchy.  Your implementation of <strong>DestroyFrame</strong> should release everything allocated by <strong>CreateFrame</strong>, and likewise for the mesh container methods.</p>	
        /// </remarks>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='D3DXLoadMeshHierarchyFromXW']/*"/>	
        /// <msdn-id>bb172894</msdn-id>	
        /// <unmanaged>HRESULT D3DXLoadMeshHierarchyFromXW([In] const wchar_t* Filename,[In] unsigned int MeshOptions,[In] IDirect3DDevice9* pD3DDevice,[In] ID3DXAllocateHierarchy* pAlloc,[In] ID3DXLoadUserData* pUserDataLoader,[In] D3DXFRAME** ppFrameHierarchy,[In] ID3DXAnimationController** ppAnimController)</unmanaged>	
        /// <unmanaged-short>D3DXLoadMeshHierarchyFromXW</unmanaged-short>	
        public static void LoadMeshHierarchyFromXW(string filename, int meshOptions, SharpDX.Direct3D9.Device d3DDeviceRef, SharpDX.Direct3D9.IAllocateHierarchy allocRef, SharpDX.Direct3D9.ILoadUserData userDataLoaderRef, ref SharpDX.Direct3D9.Frame frameHierarchyOut, out SharpDX.Direct3D9.AnimationController animControllerOut) {
            unsafe {
                IntPtr filename_ = Utilities.StringToHGlobalUni(filename);
                var frameHierarchyOut_ = new SharpDX.Direct3D9.Frame.__Native();
                frameHierarchyOut.__MarshalTo(ref frameHierarchyOut_);
                IntPtr animControllerOut_ = IntPtr.Zero;
                SharpDX.Result __result__;
                __result__= 
				D3DXLoadMeshHierarchyFromXW_((void*)filename_, meshOptions, (void*)((d3DDeviceRef == null)?IntPtr.Zero:d3DDeviceRef.NativePointer), (void*)((allocRef == null)?IntPtr.Zero:allocRef.NativePointer), (void*)((userDataLoaderRef == null)?IntPtr.Zero:userDataLoaderRef.NativePointer), &frameHierarchyOut_, &animControllerOut_);		
                Marshal.FreeHGlobal(filename_ );
                frameHierarchyOut.__MarshalFree(ref frameHierarchyOut_);
                animControllerOut= (animControllerOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D9.AnimationController(animControllerOut_);	
                __result__.CheckError();
            }
        }
コード例 #20
0
ファイル: Interfaces.cs プロジェクト: alexey-bez/SharpDX
        /// <summary>	
        /// Retrieves information about a device image for use in a configuration property sheet.	
        /// </summary>	
        /// <param name="arg0"><dd> Address of a <see cref="SharpDX.DirectInput.DeviceImageHeader"/> structure that receives information about the device image.  </dd></param>	
        /// <returns><p>If the method succeeds, the return value is <see cref="SharpDX.DirectInput.ResultCode.Ok"/>. If the method fails, the return value can be one of the following error values: <see cref="SharpDX.DirectInput.ResultCode.InvalidParam"/>, <see cref="SharpDX.DirectInput.ResultCode.MapFileFail"/>, <see cref="SharpDX.DirectInput.ResultCode.MoreData"/>, <see cref="SharpDX.DirectInput.ResultCode.NotInitialized"/>, <see cref="SharpDX.DirectInput.ResultCode.ObjectNotFound"/>.</p></returns>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='IDirectInputDevice8W::GetImageInfo']/*"/>	
        /// <msdn-id>microsoft.directx_sdk.idirectinputdevice8.idirectinputdevice8.getimageinfo</msdn-id>	
        /// <unmanaged>HRESULT IDirectInputDevice8W::GetImageInfo([InOut] DIDEVICEIMAGEINFOHEADERW* arg0)</unmanaged>	
        /// <unmanaged-short>IDirectInputDevice8W::GetImageInfo</unmanaged-short>	
        internal void GetImageInfo(SharpDX.DirectInput.DeviceImageHeader arg0) {
            unsafe {
                var arg0_ = SharpDX.DirectInput.DeviceImageHeader.__NewNative();
                arg0.__MarshalTo(ref arg0_);
                SharpDX.Result __result__;
                __result__= 
				SharpDX.DirectInput.LocalInterop.Calliint(_nativePointer, &arg0_,((void**)(*(void**)_nativePointer))[31]);		
                arg0.__MarshalFrom(ref arg0_);
                arg0.__MarshalFree(ref arg0_);
                __result__.CheckError();
            }
        }
コード例 #21
0
ファイル: Functions.cs プロジェクト: alexey-bez/SharpDX
        /// <summary>	
        /// <p>Loads the first frame hierarchy from a .x file.</p>	
        /// </summary>	
        /// <param name="memory"><dd>  <p>Pointer to a buffer that contains the mesh hierarchy.</p> </dd></param>	
        /// <param name="sizeOfMemory"><dd>  <p>Size of the pMemory buffer, in bytes.</p> </dd></param>	
        /// <param name="meshOptions"><dd>  <p>Combination of one or more flags from the <strong>D3DXMESH</strong> enumeration that specify creation options for the mesh.</p> </dd></param>	
        /// <param name="d3DDeviceRef"><dd>  <p>Pointer to an <strong><see cref="SharpDX.Direct3D9.Device"/></strong> interface, the device object associated with the mesh.</p> </dd></param>	
        /// <param name="allocRef"><dd>  <p>Pointer to an <strong><see cref="SharpDX.Direct3D9.IAllocateHierarchy"/></strong> interface.</p> </dd></param>	
        /// <param name="userDataLoaderRef"><dd>  <p>Application provided interface that allows loading of user data. See <strong><see cref="SharpDX.Direct3D9.ILoadUserData"/></strong>.</p> </dd></param>	
        /// <param name="frameHierarchyOut"><dd>  <p>Returns a reference to the loaded frame hierarchy. See <strong><see cref="SharpDX.Direct3D9.Frame"/></strong>.</p> </dd></param>	
        /// <param name="animControllerOut"><dd>  <p>Returns a reference to the animation controller corresponding to animation in the .x file. This is created with default tracks and events. See <strong><see cref="SharpDX.Direct3D9.AnimationController"/></strong>.</p> </dd></param>	
        /// <returns><p>If the function succeeds, the return value is <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. If the function fails, the return value can be one of the following values: <see cref="SharpDX.Direct3D9.ResultCode.InvalidCall"/>, E_OUTOFMEMORY.</p></returns>	
        /// <remarks>	
        /// <p>All the meshes in the file will be collapsed into one output mesh. If the file contains a frame hierarchy, all the transformations will be applied to the mesh.</p>	
        /// </remarks>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='D3DXLoadMeshHierarchyFromXInMemory']/*"/>	
        /// <msdn-id>bb172895</msdn-id>	
        /// <unmanaged>HRESULT D3DXLoadMeshHierarchyFromXInMemory([In] const void* Memory,[In] unsigned int SizeOfMemory,[In] unsigned int MeshOptions,[In] IDirect3DDevice9* pD3DDevice,[In] ID3DXAllocateHierarchy* pAlloc,[In] ID3DXLoadUserData* pUserDataLoader,[In] D3DXFRAME** ppFrameHierarchy,[In] ID3DXAnimationController** ppAnimController)</unmanaged>	
        /// <unmanaged-short>D3DXLoadMeshHierarchyFromXInMemory</unmanaged-short>	
        public static void LoadMeshHierarchyFromXInMemory(System.IntPtr memory, int sizeOfMemory, int meshOptions, SharpDX.Direct3D9.Device d3DDeviceRef, SharpDX.Direct3D9.IAllocateHierarchy allocRef, SharpDX.Direct3D9.ILoadUserData userDataLoaderRef, ref SharpDX.Direct3D9.Frame frameHierarchyOut, out SharpDX.Direct3D9.AnimationController animControllerOut) {
            unsafe {
                var frameHierarchyOut_ = new SharpDX.Direct3D9.Frame.__Native();
                frameHierarchyOut.__MarshalTo(ref frameHierarchyOut_);
                IntPtr animControllerOut_ = IntPtr.Zero;
                SharpDX.Result __result__;
                __result__= 
				D3DXLoadMeshHierarchyFromXInMemory_((void*)memory, sizeOfMemory, meshOptions, (void*)((d3DDeviceRef == null)?IntPtr.Zero:d3DDeviceRef.NativePointer), (void*)((allocRef == null)?IntPtr.Zero:allocRef.NativePointer), (void*)((userDataLoaderRef == null)?IntPtr.Zero:userDataLoaderRef.NativePointer), &frameHierarchyOut_, &animControllerOut_);		
                frameHierarchyOut.__MarshalFree(ref frameHierarchyOut_);
                animControllerOut= (animControllerOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D9.AnimationController(animControllerOut_);	
                __result__.CheckError();
            }
        }
コード例 #22
0
ファイル: Functions.cs プロジェクト: alexey-bez/SharpDX
        /// <summary>	
        /// <p>The <strong>DirectSoundFullDuplexCreate</strong> function is documented under a different name. For complete documentation of this function, see DirectSoundFullDuplexCreate8. </p>	
        /// </summary>	
        /// <param name="cGuidCaptureDeviceRef">No documentation.</param>	
        /// <param name="cGuidRenderDeviceRef">No documentation.</param>	
        /// <param name="cDSCBufferDescRef">No documentation.</param>	
        /// <param name="cDSBufferDescRef">No documentation.</param>	
        /// <param name="hWnd">No documentation.</param>	
        /// <param name="dwLevel">No documentation.</param>	
        /// <param name="dSFDOut">No documentation.</param>	
        /// <param name="dSCBuffer8Out">No documentation.</param>	
        /// <param name="dSBuffer8Out">No documentation.</param>	
        /// <param name="unkOuterRef">No documentation.</param>	
        /// <returns><p>If this function succeeds, it returns <strong><see cref="SharpDX.Result.Ok"/></strong>. Otherwise, it returns an <strong><see cref="SharpDX.Result"/></strong> error code.</p></returns>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='DirectSoundFullDuplexCreate']/*"/>	
        /// <msdn-id>bb432248</msdn-id>	
        /// <unmanaged>HRESULT DirectSoundFullDuplexCreate([In, Optional] const GUID* pcGuidCaptureDevice,[In, Optional] const GUID* pcGuidRenderDevice,[In] const DSCBUFFERDESC* pcDSCBufferDesc,[In] const DSBUFFERDESC* pcDSBufferDesc,[In] HWND hWnd,[In] unsigned int dwLevel,[Out, Fast] IDirectSoundFullDuplex** ppDSFD,[Out] IDirectSoundCaptureBuffer8** ppDSCBuffer8,[Out] IDirectSoundBuffer8** ppDSBuffer8,[In] IUnknown* pUnkOuter)</unmanaged>	
        /// <unmanaged-short>DirectSoundFullDuplexCreate</unmanaged-short>	
        public static void FullDuplexCreate(System.Guid? cGuidCaptureDeviceRef, System.Guid? cGuidRenderDeviceRef, SharpDX.DirectSound.CaptureBufferDescription cDSCBufferDescRef, SharpDX.DirectSound.SoundBufferDescription cDSBufferDescRef, System.IntPtr hWnd, int dwLevel, SharpDX.DirectSound.FullDuplex dSFDOut, out SharpDX.DirectSound.CaptureBuffer dSCBuffer8Out, out SharpDX.DirectSound.SecondarySoundBuffer dSBuffer8Out, SharpDX.ComObject unkOuterRef) {
            unsafe {
                System.Guid cGuidCaptureDeviceRef_;
                if (cGuidCaptureDeviceRef.HasValue)
                    cGuidCaptureDeviceRef_ = cGuidCaptureDeviceRef.Value;				
                System.Guid cGuidRenderDeviceRef_;
                if (cGuidRenderDeviceRef.HasValue)
                    cGuidRenderDeviceRef_ = cGuidRenderDeviceRef.Value;				
                var cDSCBufferDescRef_ = SharpDX.DirectSound.CaptureBufferDescription.__NewNative();
                cDSCBufferDescRef.__MarshalTo(ref cDSCBufferDescRef_);
                var cDSBufferDescRef_ = SharpDX.DirectSound.SoundBufferDescription.__NewNative();
                cDSBufferDescRef.__MarshalTo(ref cDSBufferDescRef_);
                IntPtr dSFDOut_ = IntPtr.Zero;
                IntPtr dSCBuffer8Out_ = IntPtr.Zero;
                IntPtr dSBuffer8Out_ = IntPtr.Zero;
                SharpDX.Result __result__;
                __result__= 
				DirectSoundFullDuplexCreate_((cGuidCaptureDeviceRef.HasValue)?&cGuidCaptureDeviceRef_:(void*)IntPtr.Zero, (cGuidRenderDeviceRef.HasValue)?&cGuidRenderDeviceRef_:(void*)IntPtr.Zero, &cDSCBufferDescRef_, &cDSBufferDescRef_, (void*)hWnd, dwLevel, &dSFDOut_, &dSCBuffer8Out_, &dSBuffer8Out_, (void*)((unkOuterRef == null)?IntPtr.Zero:unkOuterRef.NativePointer));		
                cDSCBufferDescRef.__MarshalFree(ref cDSCBufferDescRef_);
                cDSBufferDescRef.__MarshalFree(ref cDSBufferDescRef_);
                ((SharpDX.DirectSound.FullDuplex)dSFDOut).NativePointer = dSFDOut_;
                dSCBuffer8Out= (dSCBuffer8Out_ == IntPtr.Zero)?null:new SharpDX.DirectSound.CaptureBuffer(dSCBuffer8Out_);	
                dSBuffer8Out= (dSBuffer8Out_ == IntPtr.Zero)?null:new SharpDX.DirectSound.SecondarySoundBuffer(dSBuffer8Out_);	
                __result__.CheckError();
            }
        }
コード例 #23
0
ファイル: Functions.cs プロジェクト: alexey-bez/SharpDX
        /// <summary>	
        /// <p>Computes the bounding sphere of all the meshes in the frame hierarchy.</p>	
        /// </summary>	
        /// <param name="frameRootRef"><dd>  <p>Pointer to the root node.</p> </dd></param>	
        /// <param name="objectCenterRef"><dd>  <p>Returns the center of the bounding sphere.</p> </dd></param>	
        /// <param name="objectRadiusRef"><dd>  <p>Returns the radius of the bounding sphere.</p> </dd></param>	
        /// <returns><p>If the function succeeds, the return value is <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. If the function fails, the return value can be one of the following values: <see cref="SharpDX.Direct3D9.ResultCode.InvalidCall"/>, E_OUTOFMEMORY.</p></returns>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='D3DXFrameCalculateBoundingSphere']/*"/>	
        /// <msdn-id>bb172847</msdn-id>	
        /// <unmanaged>HRESULT D3DXFrameCalculateBoundingSphere([In] const D3DXFRAME* pFrameRoot,[In] D3DXVECTOR3* pObjectCenter,[In] float* pObjectRadius)</unmanaged>	
        /// <unmanaged-short>D3DXFrameCalculateBoundingSphere</unmanaged-short>	
        public static void FrameCalculateBoundingSphere(ref SharpDX.Direct3D9.Frame frameRootRef, SharpDX.Mathematics.Interop.RawVector3 objectCenterRef, float objectRadiusRef) {
            unsafe {
                var frameRootRef_ = new SharpDX.Direct3D9.Frame.__Native();
                frameRootRef.__MarshalTo(ref frameRootRef_);
                SharpDX.Result __result__;
                __result__= 
				D3DXFrameCalculateBoundingSphere_(&frameRootRef_, &objectCenterRef, &objectRadiusRef);		
                frameRootRef.__MarshalFree(ref frameRootRef_);
                __result__.CheckError();
            }
        }
コード例 #24
0
ファイル: Functions.cs プロジェクト: alexey-bez/SharpDX
        /// <summary>	
        /// <p>Saves a mesh to a .x file.</p>	
        /// </summary>	
        /// <param name="filenameRef"><dd>  <p>Pointer to a string that specifies the filename. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the string data type resolves to LPCSTR. See Remarks.</p> </dd></param>	
        /// <param name="meshRef"><dd>  <p>Pointer to an <strong><see cref="SharpDX.Direct3D9.Mesh"/></strong> interface, representing the mesh to save to a .x file.</p> </dd></param>	
        /// <param name="adjacencyRef"><dd>  <p>Pointer to an array of three DWORDs per face that specify the three neighbors for each face in the mesh. This parameter may be <strong><c>null</c></strong>.</p> </dd></param>	
        /// <param name="materialsRef"><dd>  <p>Pointer to an array of <strong><see cref="SharpDX.Direct3D9.ExtendedMaterial"/></strong> structures, containing material information to be saved in the .x file.</p> </dd></param>	
        /// <param name="effectInstancesRef"><dd>  <p>Pointer to an array of effect instances, one per attribute group in the mesh. This parameter may be <strong><c>null</c></strong>. An effect instance is a particular instance of state information used to initialize an effect. For more information, see <strong><see cref="SharpDX.Direct3D9.EffectInstance"/></strong>.</p> </dd></param>	
        /// <param name="numMaterials"><dd>  <p>Number of <strong><see cref="SharpDX.Direct3D9.ExtendedMaterial"/></strong> structures in the <em>pMaterials</em> array.</p> </dd></param>	
        /// <param name="format"><dd>  <p>A combination of file format and save options when saving an .x file. See D3DX X File Constants.</p> </dd></param>	
        /// <returns><p>If the function succeeds, the return value is <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. If the function fails, the return value can be one of the following: <see cref="SharpDX.Direct3D9.ResultCode.InvalidCall"/>.</p></returns>	
        /// <remarks>	
        /// <p>The compiler setting also determines the function version. If Unicode is defined, the function call resolves to <see cref="SharpDX.Direct3D9.D3DX9.SaveMeshToXW"/>. Otherwise, the function call resolves to D3DXSaveMeshToXA because ANSI strings are being used.</p><p>The default file format is binary; however, if a file is specified as both a binary and a text file, it will be saved as a text file. Regardless of the file format, you may also use the compressed format to reduce the file size. </p><p>The following is a typical code example of how to use this function. </p><pre> <see cref="SharpDX.Direct3D9.Mesh"/>*    m_pMesh;           // Mesh object to be saved to a .x file	
        /// <see cref="SharpDX.Direct3D9.ExtendedMaterial"/>* m_pMaterials;      // Array of material structs in the mesh	
        /// DWORD         m_dwNumMaterials;  // Number of material structs in the mesh DWORD dwFormat = <see cref="SharpDX.Direct3D9.XFileFormat.Binary"/>;  // Binary-format .x file (default)	
        /// // DWORD dwFormat = <see cref="SharpDX.Direct3D9.XFileFormat.Text"/>; // Text-format .x file // Load mesh into m_pMesh and determine values of m_pMaterials and 	
        /// // m_dwNumMaterials with calls to D3DXLoadMeshxxx or other D3DX functions // ... <see cref="SharpDX.Direct3D9.D3DX9.SaveMeshToXW"/>( L"outputxfilename.x", m_pMesh, <c>null</c>, m_pMaterials, <c>null</c>, m_dwNumMaterials, dwFormat );	
        /// </pre>	
        /// </remarks>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='D3DXSaveMeshToXW']/*"/>	
        /// <msdn-id>bb205428</msdn-id>	
        /// <unmanaged>HRESULT D3DXSaveMeshToXW([In] const wchar_t* pFilename,[In] ID3DXMesh* pMesh,[In] const unsigned int* pAdjacency,[In] const D3DXMATERIAL* pMaterials,[In] const D3DXEFFECTINSTANCE* pEffectInstances,[In] unsigned int NumMaterials,[In] unsigned int Format)</unmanaged>	
        /// <unmanaged-short>D3DXSaveMeshToXW</unmanaged-short>	
        public static void SaveMeshToXW(string filenameRef, SharpDX.Direct3D9.Mesh meshRef, int adjacencyRef, ref SharpDX.Direct3D9.ExtendedMaterial materialsRef, SharpDX.Direct3D9.EffectInstance effectInstancesRef, int numMaterials, int format) {
            unsafe {
                IntPtr filenameRef_ = Utilities.StringToHGlobalUni(filenameRef);
                var materialsRef_ = new SharpDX.Direct3D9.ExtendedMaterial.__Native();
                materialsRef.__MarshalTo(ref materialsRef_);
                var effectInstancesRef_ = new SharpDX.Direct3D9.EffectInstance.__Native();
                effectInstancesRef.__MarshalTo(ref effectInstancesRef_);
                SharpDX.Result __result__;
                __result__= 
				D3DXSaveMeshToXW_((void*)filenameRef_, (void*)((meshRef == null)?IntPtr.Zero:meshRef.NativePointer), &adjacencyRef, &materialsRef_, &effectInstancesRef_, numMaterials, format);		
                Marshal.FreeHGlobal(filenameRef_ );
                materialsRef.__MarshalFree(ref materialsRef_);
                effectInstancesRef.__MarshalFree(ref effectInstancesRef_);
                __result__.CheckError();
            }
        }
コード例 #25
0
ファイル: Functions.cs プロジェクト: alexey-bez/SharpDX
        /// <summary>	
        /// <p>Destroys the subtree of frames under the root, including the root.</p>	
        /// </summary>	
        /// <param name="frameRootRef"><dd>  <p>Pointer to the root node.</p> </dd></param>	
        /// <param name="allocRef"><dd>  <p>Allocation interface used to deallocate nodes of the frame hierarchy.</p> </dd></param>	
        /// <returns><p>If the function succeeds, the return value is <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. If the function fails, the return value can be one of the following values: <see cref="SharpDX.Direct3D9.ResultCode.InvalidCall"/>, E_OUTOFMEMORY.</p></returns>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='D3DXFrameDestroy']/*"/>	
        /// <msdn-id>bb172848</msdn-id>	
        /// <unmanaged>HRESULT D3DXFrameDestroy([In] D3DXFRAME* pFrameRoot,[In] ID3DXAllocateHierarchy* pAlloc)</unmanaged>	
        /// <unmanaged-short>D3DXFrameDestroy</unmanaged-short>	
        public static void FrameDestroy(ref SharpDX.Direct3D9.Frame frameRootRef, SharpDX.Direct3D9.IAllocateHierarchy allocRef) {
            unsafe {
                var frameRootRef_ = new SharpDX.Direct3D9.Frame.__Native();
                frameRootRef.__MarshalTo(ref frameRootRef_);
                SharpDX.Result __result__;
                __result__= 
				D3DXFrameDestroy_(&frameRootRef_, (void*)((allocRef == null)?IntPtr.Zero:allocRef.NativePointer));		
                frameRootRef.__MarshalFree(ref frameRootRef_);
                __result__.CheckError();
            }
        }
コード例 #26
0
ファイル: Functions.cs プロジェクト: alexey-bez/SharpDX
        /// <summary>	
        /// <p>Welds together replicated vertices that have equal attributes. This method uses specified epsilon values for equality comparisons.</p>	
        /// </summary>	
        /// <param name="meshRef"><dd>  <p>Pointer to an <strong><see cref="SharpDX.Direct3D9.Mesh"/></strong> object, the mesh from which to weld vertices.</p> </dd></param>	
        /// <param name="flags"><dd>  <p>Combination of one or more flags from <strong>D3DXWELDEPSILONSFLAGS</strong>.</p> </dd></param>	
        /// <param name="epsilonsRef"><dd>  <p>Pointer to a <strong>D3DXWeldEpsilons</strong> structure, specifying the epsilon values to be used for this method. Use <strong><c>null</c></strong> to initialize all structure members to a default value of 1.0e-6f.</p> </dd></param>	
        /// <param name="adjacencyInRef"><dd>  <p>Pointer to an array of three DWORDs per face that specify the three neighbors for each face in the source mesh. If the edge has no adjacent faces, the value is 0xffffffff. If this parameter is set to <strong><c>null</c></strong>, <strong><see cref="SharpDX.Direct3D9.BaseMesh.GenerateAdjacency"/></strong> will be called to create logical adjacency information.</p> </dd></param>	
        /// <param name="adjacencyOutRef"><dd>  <p>Pointer to an array of three DWORDs per face that specify the three neighbors for each face in the optimized mesh. If the edge has no adjacent faces, the value is 0xffffffff.</p> </dd></param>	
        /// <param name="faceRemapRef"><dd>  <p>An array of DWORDs, one per face, that identifies the original mesh face that corresponds to each face in the welded mesh.</p> </dd></param>	
        /// <param name="vertexRemapOut"><dd>  <p>Address of a reference to an <strong><see cref="SharpDX.Direct3D.Blob"/></strong> interface, which contains a DWORD for each vertex that specifies how the new vertices map to the old vertices. This remap is useful if you need to alter external data based on the new vertex mapping.</p> </dd></param>	
        /// <returns><p>If the function succeeds, the return value is <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. If the function fails, the return value can be one of the following: <see cref="SharpDX.Direct3D9.ResultCode.InvalidCall"/>, E_OUTOFMEMORY.</p></returns>	
        /// <remarks>	
        /// <p>This function uses supplied adjacency information to determine the points that are replicated. Vertices are merged based on an epsilon comparison. Vertices with equal position must already have been calculated and represented by point-representative data.</p><p>This function combines logically-welded vertices that have similar components, such as normals or texture coordinates within pEpsilons.</p><p>The following example code calls this function with welding enabled. Vertices are compared using epsilon values for normal vector and vertex position. A reference is returned to a face remapping array (<em>pFaceRemap</em>).</p><pre> TCHAR            strMediaPath[512];       // X-file path 	
        /// LPD3DXBUFFER     pAdjacencyBuffer = <c>null</c>; // adjacency data buffer	
        /// LPD3DXBUFFER     pD3DXMtrlBuffer  = <c>null</c>; // material buffer	
        /// LPD3DXMESH       pMesh            = <c>null</c>; // mesh object	
        /// DWORD            m_dwNumMaterials;        // number of materials	
        /// <see cref="SharpDX.Direct3D9.WeldEpsilons"/> Epsilons;                // structure with epsilon values	
        /// DWORD            *pFaceRemap[65536];      // face remapping array	
        /// DWORD            i;                       // internal variable // Load the mesh from the specified file hr = <see cref="SharpDX.Direct3D9.D3DX9.LoadMeshFromXW"/> ( strMediaPath, <see cref="SharpDX.Direct3D9.MeshFlags.Managed"/>, m_pd3dDevice, &amp;pAdjacencyBuffer, &amp;pD3DXMtrlBuffer, <c>null</c>, &amp;m_dwNumMaterials, &amp;pMesh ) ) if( FAILED( hr ) )  goto End;              // Go to error handling // Set epsilon values Epsilons.Normal = 0.001; Epsilons.Position = 0.1; // Weld the vertices for( i=0; i &lt; 65536; i++ ) {  pFaceRemap[i] = 0;  } hr = <see cref="SharpDX.Direct3D9.D3DX9.WeldVertices"/> ( pMesh, <see cref="SharpDX.Direct3D9.WeldFlags.WeldPartialMatches"/>, &amp;Epsilons, (DWORD*)pAdjacencyBuffer-&gt;GetBufferPointer(), (DWORD*)pAdjacencyBuffer-&gt;GetBufferPointer(), (DWORD*)pFaceRemap, <c>null</c> ) if( FAILED( hr ) )  goto End;              // Go to error handling	
        /// </pre>	
        /// </remarks>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='D3DXWeldVertices']/*"/>	
        /// <msdn-id>bb205562</msdn-id>	
        /// <unmanaged>HRESULT D3DXWeldVertices([In] ID3DXMesh* pMesh,[In] unsigned int Flags,[In] const D3DXWELDEPSILONS* pEpsilons,[In] const unsigned int* pAdjacencyIn,[In] unsigned int* pAdjacencyOut,[In] unsigned int* pFaceRemap,[In] ID3DXBuffer** ppVertexRemap)</unmanaged>	
        /// <unmanaged-short>D3DXWeldVertices</unmanaged-short>	
        public static void WeldVertices(SharpDX.Direct3D9.Mesh meshRef, int flags, ref SharpDX.Direct3D9.WeldEpsilons epsilonsRef, int adjacencyInRef, int adjacencyOutRef, int faceRemapRef, out SharpDX.Direct3D.Blob vertexRemapOut) {
            unsafe {
                var epsilonsRef_ = new SharpDX.Direct3D9.WeldEpsilons.__Native();
                epsilonsRef.__MarshalTo(ref epsilonsRef_);
                IntPtr vertexRemapOut_ = IntPtr.Zero;
                SharpDX.Result __result__;
                __result__= 
				D3DXWeldVertices_((void*)((meshRef == null)?IntPtr.Zero:meshRef.NativePointer), flags, &epsilonsRef_, &adjacencyInRef, &adjacencyOutRef, &faceRemapRef, &vertexRemapOut_);		
                epsilonsRef.__MarshalFree(ref epsilonsRef_);
                vertexRemapOut= (vertexRemapOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D.Blob(vertexRemapOut_);	
                __result__.CheckError();
            }
        }
コード例 #27
0
ファイル: Functions.cs プロジェクト: JoeErickson/SharpDX
        /// <summary>	
        /// <p>Create a state block.</p>	
        /// </summary>	
        /// <param name="deviceRef"><dd>  <p>The device for which the state block will be created.</p> </dd></param>	
        /// <param name="stateBlockMaskRef"><dd>  <p>Indicates which parts of the device state will be captured when calling <strong><see cref="SharpDX.Direct3D10.StateBlock.Capture"/></strong> and reapplied when calling <strong><see cref="SharpDX.Direct3D10.StateBlock.Apply"/></strong>. See remarks.</p> </dd></param>	
        /// <param name="stateBlockOut"><dd>  <p>Address of a reference to the buffer created (see <strong><see cref="SharpDX.Direct3D10.StateBlock"/> Interface</strong>).</p> </dd></param>	
        /// <returns><p>This method returns one of the following Direct3D 10 Return Codes.</p></returns>	
        /// <remarks>	
        /// <p>A state block is a collection of device state, and is used for saving and restoring device state. Use a state-block mask to enable subsets of state for saving and restoring.</p><p>The <strong><see cref="SharpDX.Direct3D10.StateBlockMask"/></strong> structure can be filled manually or by using any of the D3D10StateBlockMaskXXX APIs. A state block mask can also be obtained by calling <strong><see cref="SharpDX.Direct3D10.EffectTechnique.ComputeStateBlockMask"/></strong> or <strong><see cref="SharpDX.Direct3D10.EffectPass.ComputeStateBlockMask"/></strong>.</p><table> <tr><td> <p>Differences between Direct3D 9 and Direct3D 10:</p> <p>In Direct3D 10, a state block object does not contain any valid information about the state of the device until <strong><see cref="SharpDX.Direct3D10.StateBlock.Capture"/></strong> is called. In Direct3D 9, state is saved in a state block object, when it is created.</p> </td></tr> </table><p>?</p>	
        /// </remarks>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='D3D10CreateStateBlock']/*"/>	
        /// <msdn-id>bb205090</msdn-id>	
        /// <unmanaged>HRESULT D3D10CreateStateBlock([In] ID3D10Device* pDevice,[In] D3D10_STATE_BLOCK_MASK* pStateBlockMask,[Out, Fast] ID3D10StateBlock** ppStateBlock)</unmanaged>	
        /// <unmanaged-short>D3D10CreateStateBlock</unmanaged-short>	
        public static void CreateStateBlock(SharpDX.Direct3D10.Device deviceRef, ref SharpDX.Direct3D10.StateBlockMask stateBlockMaskRef, SharpDX.Direct3D10.StateBlock stateBlockOut) {
            unsafe {
                var stateBlockMaskRef_ = new SharpDX.Direct3D10.StateBlockMask.__Native();
                stateBlockMaskRef.__MarshalTo(ref stateBlockMaskRef_);
                IntPtr stateBlockOut_ = IntPtr.Zero;
                SharpDX.Result __result__;
                __result__= 
				D3D10CreateStateBlock_((void*)((deviceRef == null)?IntPtr.Zero:deviceRef.NativePointer), &stateBlockMaskRef_, &stateBlockOut_);		
                stateBlockMaskRef.__MarshalFree(ref stateBlockMaskRef_);
                ((SharpDX.Direct3D10.StateBlock)stateBlockOut).NativePointer = stateBlockOut_;
                __result__.CheckError();
            }
        }
コード例 #28
0
ファイル: Functions.cs プロジェクト: alexey-bez/SharpDX
        /// <summary>	
        /// <p>Creates a skin mesh from another mesh.</p>	
        /// </summary>	
        /// <param name="meshRef"><dd>  <p>Pointer to an <strong><see cref="SharpDX.Direct3D9.BaseMesh"/></strong> object, the mesh from which to create the skin mesh.</p> </dd></param>	
        /// <param name="numBones"><dd>  <p>The length of the array attached to the BoneId. See <strong><see cref="SharpDX.Direct3D9.BoneCombination"/></strong>.</p> </dd></param>	
        /// <param name="boneCombinationTableRef"><dd>  <p>Pointer to an array of bone combinations. See <strong><see cref="SharpDX.Direct3D9.BoneCombination"/></strong>.</p> </dd></param>	
        /// <param name="skinInfoOut"><dd>  <p>Address of a reference to an <strong><see cref="SharpDX.Direct3D9.SkinInfo"/></strong> interface representing the created skin mesh object.</p> </dd></param>	
        /// <returns><p>If the function succeeds, the return value is <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. If the function fails, the return value can be the following: E_OUTOFMEMORY.</p></returns>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='D3DXCreateSkinInfoFromBlendedMesh']/*"/>	
        /// <msdn-id>bb172793</msdn-id>	
        /// <unmanaged>HRESULT D3DXCreateSkinInfoFromBlendedMesh([In] ID3DXBaseMesh* pMesh,[In] unsigned int NumBones,[In] const D3DXBONECOMBINATION* pBoneCombinationTable,[In] ID3DXSkinInfo** ppSkinInfo)</unmanaged>	
        /// <unmanaged-short>D3DXCreateSkinInfoFromBlendedMesh</unmanaged-short>	
        public static void CreateSkinInfoFromBlendedMesh(SharpDX.Direct3D9.BaseMesh meshRef, int numBones, SharpDX.Direct3D9.BoneCombination boneCombinationTableRef, out SharpDX.Direct3D9.SkinInfo skinInfoOut) {
            unsafe {
                var boneCombinationTableRef_ = new SharpDX.Direct3D9.BoneCombination.__Native();
                boneCombinationTableRef.__MarshalTo(ref boneCombinationTableRef_);
                IntPtr skinInfoOut_ = IntPtr.Zero;
                SharpDX.Result __result__;
                __result__= 
				D3DXCreateSkinInfoFromBlendedMesh_((void*)((meshRef == null)?IntPtr.Zero:meshRef.NativePointer), numBones, &boneCombinationTableRef_, &skinInfoOut_);		
                boneCombinationTableRef.__MarshalFree(ref boneCombinationTableRef_);
                skinInfoOut= (skinInfoOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D9.SkinInfo(skinInfoOut_);	
                __result__.CheckError();
            }
        }
コード例 #29
0
ファイル: Functions.cs プロジェクト: JoeErickson/SharpDX
         /// <summary>	
         /// <p>Load a texture from a texture.</p>	
         /// </summary>	
         /// <param name="srcTextureRef"><dd>  <p>Pointer to the source texture. See <strong><see cref="SharpDX.Direct3D10.Resource"/></strong>.</p> </dd></param>	
         /// <param name="loadInfoRef"><dd>  <p>Pointer to texture loading parameters. See <strong><see cref="SharpDX.Direct3D10.TextureLoadInformation"/></strong>.</p> </dd></param>	
         /// <param name="dstTextureRef"><dd>  <p>Pointer to the destination texture. See <strong><see cref="SharpDX.Direct3D10.Resource"/> Interface</strong>.</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='D3DX10LoadTextureFromTexture']/*"/>	
         /// <msdn-id>bb172680</msdn-id>	
         /// <unmanaged>HRESULT D3DX10LoadTextureFromTexture([In] ID3D10Resource* pSrcTexture,[In] D3DX10_TEXTURE_LOAD_INFO* pLoadInfo,[In] ID3D10Resource* pDstTexture)</unmanaged>	
         /// <unmanaged-short>D3DX10LoadTextureFromTexture</unmanaged-short>	
         public static void LoadTextureFromTexture(SharpDX.Direct3D10.Resource srcTextureRef, SharpDX.Direct3D10.TextureLoadInformation loadInfoRef, SharpDX.Direct3D10.Resource dstTextureRef) {
             unsafe {
                 var loadInfoRef_ = new SharpDX.Direct3D10.TextureLoadInformation.__Native();
                 loadInfoRef.__MarshalTo(ref loadInfoRef_);
                 SharpDX.Result __result__;
                 __result__= 
 				D3DX10LoadTextureFromTexture_((void*)((srcTextureRef == null)?IntPtr.Zero:srcTextureRef.NativePointer), &loadInfoRef_, (void*)((dstTextureRef == null)?IntPtr.Zero:dstTextureRef.NativePointer));		
                 loadInfoRef.__MarshalFree(ref loadInfoRef_);
                 __result__.CheckError();
             }
         }
コード例 #30
0
ファイル: Interfaces.cs プロジェクト: alexey-bez/SharpDX
        /// <summary>	
        /// <p>Requests deallocation of a frame object.</p>	
        /// </summary>	
        /// <param name="frameToFreeRef"><dd>  <p>Pointer to the frame to be deallocated.</p> </dd></param>	
        /// <returns><p>The return values of this method are implemented by an application programmer. In general, if no error occurs, program the method to return <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. Otherwise, program the method to return an appropriate error message  from D3DERR or D3DXERR, as this will cause <strong><see cref="SharpDX.Direct3D9.D3DX9.LoadMeshHierarchyFromXW"/></strong> to fail also, and return the error.</p></returns>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3DXAllocateHierarchy::DestroyFrame']/*"/>	
        /// <msdn-id>bb205622</msdn-id>	
        /// <unmanaged>HRESULT ID3DXAllocateHierarchy::DestroyFrame([In] D3DXFRAME* pFrameToFree)</unmanaged>	
        /// <unmanaged-short>ID3DXAllocateHierarchy::DestroyFrame</unmanaged-short>	
        public void DestroyFrame(ref SharpDX.Direct3D9.Frame frameToFreeRef) {
            unsafe {
                var frameToFreeRef_ = new SharpDX.Direct3D9.Frame.__Native();
                frameToFreeRef.__MarshalTo(ref frameToFreeRef_);
                SharpDX.Result __result__;
                __result__= 
				SharpDX.Direct3D9.LocalInterop.Calliint(_nativePointer, &frameToFreeRef_,((void**)(*(void**)_nativePointer))[2]);		
                frameToFreeRef.__MarshalFree(ref frameToFreeRef_);
                __result__.CheckError();
            }
        }