/// <summary> /// Gets a single constant description in the constant table. /// </summary> /// <param name="effectHandle">The effect handle.</param> /// <returns>The constant description</returns> /// <unmanaged>HRESULT ID3DXConstantTable::GetConstantDesc([In] D3DXHANDLE hConstant,[Out, Buffer] D3DXCONSTANT_DESC* pConstantDesc,[InOut] unsigned int* pCount)</unmanaged> public ConstantDescription GetConstantDescription(SharpDX.Direct3D9.EffectHandle effectHandle) { int count = 1; var descriptions = new ConstantDescription[1]; GetConstantDescription(effectHandle, descriptions, ref count); return(descriptions[0]); }
protected override void DisposeResource() { if (_EffectHandle != null) { _EffectHandle.Dispose(); _EffectHandle = null; } }
/// <summary> /// Gets an array of constant descriptions in the constant table. /// </summary> /// <param name="effectHandle">The effect handle.</param> /// <returns>An array of constant descriptions</returns> /// <unmanaged>HRESULT ID3DXConstantTable::GetConstantDesc([In] D3DXHANDLE hConstant,[Out, Buffer] D3DXCONSTANT_DESC* pConstantDesc,[InOut] unsigned int* pCount)</unmanaged> public ConstantDescription[] GetConstantDescriptionArray(SharpDX.Direct3D9.EffectHandle effectHandle) { int count = 0; GetConstantDescription(effectHandle, null, ref count); var descriptions = new ConstantDescription[count]; GetConstantDescription(effectHandle, descriptions, ref count); return(descriptions); }
public EffectHandle(SharpDX.Direct3D9.EffectHandle effectHandle) { _EffectHandle = effectHandle; }
/// <summary> /// <p>Searches for the next valid technique, starting at the technique after the specified technique.</p> /// </summary> /// <param name="hTechnique"><dd> <p>Unique identifier to a technique. See Handles (Direct3D 9). Specify <strong><c>null</c></strong> for this parameter to find the first valid technique.</p> </dd></param> /// <returns><dd> <p>Pointer to an identifier for the next technique. <strong><c>null</c></strong> is returned if this is the last technique. See Handles (Direct3D 9).</p> </dd></returns> /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3DXEffect::FindNextValidTechnique']/*"/> /// <msdn-id>bb205824</msdn-id> /// <unmanaged>HRESULT ID3DXEffect::FindNextValidTechnique([In] D3DXHANDLE hTechnique,[Out] D3DXHANDLE* pTechnique)</unmanaged> /// <unmanaged-short>ID3DXEffect::FindNextValidTechnique</unmanaged-short> public SharpDX.Direct3D9.EffectHandle FindNextValidTechnique(SharpDX.Direct3D9.EffectHandle hTechnique) { unsafe { var hTechnique_ = new SharpDX.Direct3D9.EffectHandle.__Native(); SharpDX.Direct3D9.EffectHandle.__MarshalTo(ref hTechnique, ref hTechnique_); SharpDX.Direct3D9.EffectHandle techniqueRef; var techniqueRef_ = new SharpDX.Direct3D9.EffectHandle.__Native(); SharpDX.Result __result__; __result__= SharpDX.Direct3D9.LocalInterop.Calliint(_nativePointer, hTechnique_, &techniqueRef_,((void**)(*(void**)_nativePointer))[61]); SharpDX.Direct3D9.EffectHandle.__MarshalFree(ref hTechnique, ref hTechnique_); techniqueRef = new SharpDX.Direct3D9.EffectHandle(); SharpDX.Direct3D9.EffectHandle.__MarshalFrom(ref techniqueRef, ref techniqueRef_); __result__.CheckError(); return techniqueRef; } }