Beispiel #1
0
        /// <summary>	
        /// <p>Sets a floating point value.</p>	
        /// </summary>	
        /// <param name="hParameter"><dd>  <p>Unique identifier. See Handles (Direct3D 9).</p> </dd></param>	
        /// <param name="f"><dd>  <p>Floating point value.</p> </dd></param>	
        /// <returns><p>If the method succeeds, the return value is <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. If the method fails, the return value can be <see cref="SharpDX.Direct3D9.ResultCode.InvalidCall"/>.</p></returns>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3DXBaseEffect::SetFloat']/*"/>	
        /// <msdn-id>bb205716</msdn-id>	
        /// <unmanaged>HRESULT ID3DXBaseEffect::SetFloat([In] D3DXHANDLE hParameter,[In] float f)</unmanaged>	
        /// <unmanaged-short>ID3DXBaseEffect::SetFloat</unmanaged-short>	
        internal void SetFloat(SharpDX.Direct3D9.EffectHandle hParameter, float f) {
            unsafe {
                var hParameter_ = new SharpDX.Direct3D9.EffectHandle.__Native();
                SharpDX.Direct3D9.EffectHandle.__MarshalTo(ref hParameter, ref hParameter_);
                SharpDX.Result __result__;
                __result__= 
				SharpDX.Direct3D9.LocalInterop.Calliint(_nativePointer, hParameter_, f,((void**)(*(void**)_nativePointer))[30]);		
                SharpDX.Direct3D9.EffectHandle.__MarshalFree(ref hParameter, ref hParameter_);
                __result__.CheckError();
            }
        }
Beispiel #2
0
        /// <summary>	
        /// <p>Set a contiguous range of shader constants with a memory copy.</p>	
        /// </summary>	
        /// <param name="hParameter"><dd>  <p>Handle to the value to set, or the name of the value passed in as a string. Passing in a handle is more efficient. See Handles (Direct3D 9). </p> </dd></param>	
        /// <param name="dataRef"><dd>  <p>Pointer to a buffer containing the data to be set. SetRawValue checks for valid memory, but does not do any checking for valid data.</p> </dd></param>	
        /// <param name="byteOffset"><dd>  <p>Number of bytes between the beginning of the effect data and the beginning of the effect constants you are going to set.</p> </dd></param>	
        /// <param name="bytes"><dd>  <p>The size of the buffer to be set, in bytes.</p> </dd></param>	
        /// <returns><p>If the method succeeds, the return value is <see cref="SharpDX.Result.Ok"/>. If the method fails, the return value can be one of the following:E_INVALIDCALL.</p></returns>	
        /// <remarks>	
        /// <p>SetRawValue is a very fast way to set effect constants since it performs a memory copy without performing validation or any data conversion (like converting a row-major matrix to a column-major matrix). Use SetRawValue to set a series of contiguous effect constants. For instance, you could set an array of twenty matrices with 20 calls to <strong><see cref="SharpDX.Direct3D9.BaseEffect.SetMatrix"/></strong> or by using a single SetRawValue.</p><p>All values are expected to be either matrix4x4s or float4s and all matrices are expected to be in column-major order. Int or float values are cast into a float4; therefore, it is highly recommended that you use SetRawValue with only float4 or matrix4x4 data.</p>	
        /// </remarks>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3DXEffect::SetRawValue']/*"/>	
        /// <msdn-id>bb205832</msdn-id>	
        /// <unmanaged>HRESULT ID3DXEffect::SetRawValue([In] D3DXHANDLE hParameter,[In] const void* pData,[In] unsigned int ByteOffset,[In] unsigned int Bytes)</unmanaged>	
        /// <unmanaged-short>ID3DXEffect::SetRawValue</unmanaged-short>	
        internal void SetRawValue(SharpDX.Direct3D9.EffectHandle hParameter, System.IntPtr dataRef, int byteOffset, int bytes) {
            unsafe {
                var hParameter_ = new SharpDX.Direct3D9.EffectHandle.__Native();
                SharpDX.Direct3D9.EffectHandle.__MarshalTo(ref hParameter, ref hParameter_);
                SharpDX.Result __result__;
                __result__= 
				SharpDX.Direct3D9.LocalInterop.Calliint(_nativePointer, hParameter_, (void*)dataRef, byteOffset, bytes,((void**)(*(void**)_nativePointer))[78]);		
                SharpDX.Direct3D9.EffectHandle.__MarshalFree(ref hParameter, ref hParameter_);
                __result__.CheckError();
            }
        }
Beispiel #3
0
        /// <summary>	
        /// <p>Gets a literal status of a parameter. A literal parameter has a value that doesn't change during the lifetime of an effect.</p>	
        /// </summary>	
        /// <param name="hParameter"><dd>  <p>Unique identifier to a parameter. See Handles (Direct3D 9).</p> </dd></param>	
        /// <returns><dd>  <p>Returns True if the parameter is a literal, and False otherwise.</p> </dd></returns>	
        /// <remarks>	
        /// <p>This methods only changes whether the parameter is a literal or not. To change the value of a parameter, use a method like <strong><see cref="SharpDX.Direct3D9.BaseEffect.SetBool"/></strong> or <strong><see cref="SharpDX.Direct3D9.BaseEffect.SetValue"/></strong>.</p>	
        /// </remarks>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3DXEffectCompiler::GetLiteral']/*"/>	
        /// <msdn-id>bb205792</msdn-id>	
        /// <unmanaged>HRESULT ID3DXEffectCompiler::GetLiteral([In] D3DXHANDLE hParameter,[Out] BOOL* pLiteral)</unmanaged>	
        /// <unmanaged-short>ID3DXEffectCompiler::GetLiteral</unmanaged-short>	
        public SharpDX.Mathematics.Interop.RawBool GetLiteral(SharpDX.Direct3D9.EffectHandle hParameter) {
            unsafe {
                var hParameter_ = new SharpDX.Direct3D9.EffectHandle.__Native();
                SharpDX.Direct3D9.EffectHandle.__MarshalTo(ref hParameter, ref hParameter_);
                SharpDX.Mathematics.Interop.RawBool literalRef;
                literalRef = new SharpDX.Mathematics.Interop.RawBool();
                SharpDX.Result __result__;
                __result__= 
				SharpDX.Direct3D9.LocalInterop.Calliint(_nativePointer, hParameter_, &literalRef,((void**)(*(void**)_nativePointer))[58]);		
                SharpDX.Direct3D9.EffectHandle.__MarshalFree(ref hParameter, ref hParameter_);
                __result__.CheckError();
                return literalRef;
            }
        }
Beispiel #4
0
        /// <summary>	
        /// <p>Validate a technique.</p>	
        /// </summary>	
        /// <param name="hTechnique"><dd>  <p>Unique identifier. See Handles (Direct3D 9).</p> </dd></param>	
        /// <returns><p>If the method succeeds, the return value is <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. If the method fails, the return value can be one of the following: <see cref="SharpDX.Direct3D9.ResultCode.InvalidCall"/>, <see cref="SharpDX.Direct3D9.ResultCode.ConflictingRenderState"/>, <see cref="SharpDX.Direct3D9.ResultCode.ConflictingTextureFilter"/>, <see cref="SharpDX.Direct3D9.ResultCode.DeviceLost"/>, <see cref="SharpDX.Direct3D9.ResultCode.DriverInternalError"/>, <see cref="SharpDX.Direct3D9.ResultCode.TooManyOperations"/>, <see cref="SharpDX.Direct3D9.ResultCode.UnsupportedAlphaArgument"/>, <see cref="SharpDX.Direct3D9.ResultCode.UnsupportedAlphaOperation"/>, <see cref="SharpDX.Direct3D9.ResultCode.UnsupportedColorArgument"/>, <see cref="SharpDX.Direct3D9.ResultCode.UnsupportedColorOperation"/>, <see cref="SharpDX.Direct3D9.ResultCode.UnsupportedFactorValue"/>, <see cref="SharpDX.Direct3D9.ResultCode.UnsupportedTextureFilter"/>, and <see cref="SharpDX.Direct3D9.ResultCode.WrongTextureFormat"/>.</p></returns>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3DXEffect::ValidateTechnique']/*"/>	
        /// <msdn-id>bb205835</msdn-id>	
        /// <unmanaged>HRESULT ID3DXEffect::ValidateTechnique([In] D3DXHANDLE hTechnique)</unmanaged>	
        /// <unmanaged-short>ID3DXEffect::ValidateTechnique</unmanaged-short>	
        public void ValidateTechnique(SharpDX.Direct3D9.EffectHandle hTechnique) {
            unsafe {
                var hTechnique_ = new SharpDX.Direct3D9.EffectHandle.__Native();
                SharpDX.Direct3D9.EffectHandle.__MarshalTo(ref hTechnique, ref hTechnique_);
                SharpDX.Result __result__;
                __result__= 
				SharpDX.Direct3D9.LocalInterop.Calliint(_nativePointer, hTechnique_,((void**)(*(void**)_nativePointer))[60]);		
                SharpDX.Direct3D9.EffectHandle.__MarshalFree(ref hTechnique, ref hTechnique_);
                __result__.CheckError();
            }
        }
Beispiel #5
0
        /// <summary>	
        /// <p>Determines if a parameter is used by the technique.</p>	
        /// </summary>	
        /// <param name="hParameter"><dd>  <p>Unique identifier for the parameter.  See Handles (Direct3D 9).</p> </dd></param>	
        /// <param name="hTechnique"><dd>  <p>Unique identifier for the technique.  See Handles (Direct3D 9).</p> </dd></param>	
        /// <returns><p>Returns <strong>TRUE</strong> if the parameter is being used and returns <strong><see cref="SharpDX.Result.False"/></strong> if the parameter is not being used.</p></returns>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3DXEffect::IsParameterUsed']/*"/>	
        /// <msdn-id>bb205829</msdn-id>	
        /// <unmanaged>BOOL ID3DXEffect::IsParameterUsed([In] D3DXHANDLE hParameter,[In] D3DXHANDLE hTechnique)</unmanaged>	
        /// <unmanaged-short>ID3DXEffect::IsParameterUsed</unmanaged-short>	
        public SharpDX.Mathematics.Interop.RawBool IsParameterUsed(SharpDX.Direct3D9.EffectHandle hParameter, SharpDX.Direct3D9.EffectHandle hTechnique) {
            unsafe {
                var hParameter_ = new SharpDX.Direct3D9.EffectHandle.__Native();
                SharpDX.Direct3D9.EffectHandle.__MarshalTo(ref hParameter, ref hParameter_);
                var hTechnique_ = new SharpDX.Direct3D9.EffectHandle.__Native();
                SharpDX.Direct3D9.EffectHandle.__MarshalTo(ref hTechnique, ref hTechnique_);
                SharpDX.Mathematics.Interop.RawBool __result__;
                __result__= 
				SharpDX.Direct3D9.LocalInterop.CalliSharpDXMathematicsInteropRawBool(_nativePointer, hParameter_, hTechnique_,((void**)(*(void**)_nativePointer))[62]);		
                SharpDX.Direct3D9.EffectHandle.__MarshalFree(ref hParameter, ref hParameter_);
                SharpDX.Direct3D9.EffectHandle.__MarshalFree(ref hTechnique, ref hTechnique_);
                return __result__;
            }
        }
Beispiel #6
0
        /// <summary>	
        /// <p>Sets an integer value.</p>	
        /// </summary>	
        /// <param name="deviceRef"><dd>  <p>Pointer to an <strong><see cref="SharpDX.Direct3D9.Device"/></strong> interface, representing the device associated with the constant table.</p> </dd></param>	
        /// <param name="effectHandle"><dd>  <p>Unique identifier to the constant. See <see cref="SharpDX.Direct3D9.EffectHandle"/>.</p> </dd></param>	
        /// <param name="n"><dd>  <p>Integer.</p> </dd></param>	
        /// <returns><p>If the method succeeds, the return value is <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. If the method fails, the return value can be <see cref="SharpDX.Direct3D9.ResultCode.InvalidCall"/>.</p></returns>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3DXConstantTable::SetInt']/*"/>	
        /// <msdn-id>bb205776</msdn-id>	
        /// <unmanaged>HRESULT ID3DXConstantTable::SetInt([In] IDirect3DDevice9* pDevice,[In] D3DXHANDLE hConstant,[In] int n)</unmanaged>	
        /// <unmanaged-short>ID3DXConstantTable::SetInt</unmanaged-short>	
        internal void SetInt(SharpDX.Direct3D9.Device deviceRef, SharpDX.Direct3D9.EffectHandle effectHandle, int n) {
            unsafe {
                var effectHandle_ = new SharpDX.Direct3D9.EffectHandle.__Native();
                SharpDX.Direct3D9.EffectHandle.__MarshalTo(ref effectHandle, ref effectHandle_);
                SharpDX.Result __result__;
                __result__= 
				SharpDX.Direct3D9.LocalInterop.Calliint(_nativePointer, (void*)((deviceRef == null)?IntPtr.Zero:deviceRef.NativePointer), effectHandle_, n,((void**)(*(void**)_nativePointer))[15]);		
                SharpDX.Direct3D9.EffectHandle.__MarshalFree(ref effectHandle, ref effectHandle_);
                __result__.CheckError();
            }
        }
Beispiel #7
0
     /// <summary>	
     /// <p>Sets an array of 4D vectors.</p>	
     /// </summary>	
     /// <param name="deviceRef"><dd>  <p>Pointer to an <strong><see cref="SharpDX.Direct3D9.Device"/></strong> interface, representing the device associated with the constant table.</p> </dd></param>	
     /// <param name="effectHandle"><dd>  <p>Unique identifier to the array of vector constants. See <see cref="SharpDX.Direct3D9.EffectHandle"/>.</p> </dd></param>	
     /// <param name="vectorRef"><dd>  <p>Array of 4D vectors.</p> </dd></param>	
     /// <param name="count"><dd>  <p>Number of vectors in the array.</p> </dd></param>	
     /// <returns><p>If the method succeeds, the return value is <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. If the method fails, the return value can be <see cref="SharpDX.Direct3D9.ResultCode.InvalidCall"/>.</p></returns>	
     /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3DXConstantTable::SetVectorArray']/*"/>	
     /// <msdn-id>bb205787</msdn-id>	
     /// <unmanaged>HRESULT ID3DXConstantTable::SetVectorArray([In] IDirect3DDevice9* pDevice,[In] D3DXHANDLE hConstant,[In, Buffer] const D3DXVECTOR4* pVector,[In] unsigned int Count)</unmanaged>	
     /// <unmanaged-short>ID3DXConstantTable::SetVectorArray</unmanaged-short>	
     internal void SetVectorArray(SharpDX.Direct3D9.Device deviceRef, SharpDX.Direct3D9.EffectHandle effectHandle, SharpDX.Mathematics.Interop.RawVector4[] vectorRef, int count) {
         unsafe {
             var effectHandle_ = new SharpDX.Direct3D9.EffectHandle.__Native();
             SharpDX.Direct3D9.EffectHandle.__MarshalTo(ref effectHandle, ref effectHandle_);
             SharpDX.Result __result__;
             fixed (void* vectorRef_ = vectorRef)
                 __result__= 
 				SharpDX.Direct3D9.LocalInterop.Calliint(_nativePointer, (void*)((deviceRef == null)?IntPtr.Zero:deviceRef.NativePointer), effectHandle_, vectorRef_, count,((void**)(*(void**)_nativePointer))[20]);		
             SharpDX.Direct3D9.EffectHandle.__MarshalFree(ref effectHandle, ref effectHandle_);
             __result__.CheckError();
         }
     }
Beispiel #8
0
     /// <summary>	
     /// <p>Gets an array of references to transposed matrices.</p>	
     /// </summary>	
     /// <param name="hParameter"><dd>  <p>Unique identifier. See Handles (Direct3D 9).</p> </dd></param>	
     /// <param name="matrixOut"><dd>  <p>Array of references to transposed matrices. See <strong><see cref="SharpDX.Mathematics.Interop.RawMatrix"/></strong>.</p> </dd></param>	
     /// <param name="count"><dd>  <p>Number of matrices in the array.</p> </dd></param>	
     /// <returns><p>If the method succeeds, the return value is <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. If the method fails, the return value can be <see cref="SharpDX.Direct3D9.ResultCode.InvalidCall"/>.</p></returns>	
     /// <remarks>	
     /// <p>A transposed matrix contains column-major data; that is, each vector is contained in a column.</p><p>If the destination matrices are larger than the source matrices, only the upper-left components of each destination matrix will be filled, and the remaining destination matrix components will be set to zero.</p>	
     /// </remarks>	
     /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3DXBaseEffect::GetMatrixTransposePointerArray']/*"/>	
     /// <msdn-id>bb205694</msdn-id>	
     /// <unmanaged>HRESULT ID3DXBaseEffect::GetMatrixTransposePointerArray([In] D3DXHANDLE hParameter,[Out] D3DXMATRIX** ppMatrix,[In] unsigned int Count)</unmanaged>	
     /// <unmanaged-short>ID3DXBaseEffect::GetMatrixTransposePointerArray</unmanaged-short>	
     public void GetMatrixTransposePointerArray(SharpDX.Direct3D9.EffectHandle hParameter, out SharpDX.Mathematics.Interop.RawMatrix matrixOut, int count) {
         unsafe {
             var hParameter_ = new SharpDX.Direct3D9.EffectHandle.__Native();
             SharpDX.Direct3D9.EffectHandle.__MarshalTo(ref hParameter, ref hParameter_);
             matrixOut = new SharpDX.Mathematics.Interop.RawMatrix();
             SharpDX.Result __result__;
             fixed (void* matrixOut_ = &matrixOut)
                 __result__= 
 				SharpDX.Direct3D9.LocalInterop.Calliint(_nativePointer, hParameter_, matrixOut_, count,((void**)(*(void**)_nativePointer))[49]);		
             SharpDX.Direct3D9.EffectHandle.__MarshalFree(ref hParameter, ref hParameter_);
             __result__.CheckError();
         }
     }
Beispiel #9
0
        /// <summary>	
        /// <p>Sets a string.</p>	
        /// </summary>	
        /// <param name="hParameter"><dd>  <p>Unique identifier. See Handles (Direct3D 9).</p> </dd></param>	
        /// <param name="stringRef"><dd>  <p>String to set.</p> </dd></param>	
        /// <returns><p>If the method succeeds, the return value is <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. If the method fails, the return value can be <see cref="SharpDX.Direct3D9.ResultCode.InvalidCall"/>.</p></returns>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3DXBaseEffect::SetString']/*"/>	
        /// <msdn-id>bb205726</msdn-id>	
        /// <unmanaged>HRESULT ID3DXBaseEffect::SetString([In] D3DXHANDLE hParameter,[In] const char* pString)</unmanaged>	
        /// <unmanaged-short>ID3DXBaseEffect::SetString</unmanaged-short>	
        public void SetString(SharpDX.Direct3D9.EffectHandle hParameter, string stringRef) {
            unsafe {
                var hParameter_ = new SharpDX.Direct3D9.EffectHandle.__Native();
                SharpDX.Direct3D9.EffectHandle.__MarshalTo(ref hParameter, ref hParameter_);
                IntPtr stringRef_ = Utilities.StringToHGlobalAnsi(stringRef);
                SharpDX.Result __result__;
                __result__= 
				SharpDX.Direct3D9.LocalInterop.Calliint(_nativePointer, hParameter_, (void*)stringRef_,((void**)(*(void**)_nativePointer))[50]);		
                SharpDX.Direct3D9.EffectHandle.__MarshalFree(ref hParameter, ref hParameter_);
                Marshal.FreeHGlobal(stringRef_ );
                __result__.CheckError();
            }
        }
Beispiel #10
0
     /// <summary>	
     /// <p>Gets a nontransposed matrix.</p>	
     /// </summary>	
     /// <param name="hParameter"><dd>  <p>Unique identifier. See Handles (Direct3D 9).</p> </dd></param>	
     /// <param name="matrixRef"><dd>  <p>Returns a nontransposed matrix. See <strong><see cref="SharpDX.Mathematics.Interop.RawMatrix"/></strong>.</p> </dd></param>	
     /// <returns><p>If the method succeeds, the return value is <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. If the method fails, the return value can be <see cref="SharpDX.Direct3D9.ResultCode.InvalidCall"/>.</p></returns>	
     /// <remarks>	
     /// <p>A nontransposed matrix contains row-major data; that is, each vector is contained in a row.</p><p>If the destination matrix is larger than the source matrix, only the upper-left components of the destination matrix will be filled, and the remaining components will be set to zero.</p>	
     /// </remarks>	
     /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3DXBaseEffect::GetMatrix']/*"/>	
     /// <msdn-id>bb205689</msdn-id>	
     /// <unmanaged>HRESULT ID3DXBaseEffect::GetMatrix([In] D3DXHANDLE hParameter,[Out] D3DXMATRIX* pMatrix)</unmanaged>	
     /// <unmanaged-short>ID3DXBaseEffect::GetMatrix</unmanaged-short>	
     internal void GetMatrix(SharpDX.Direct3D9.EffectHandle hParameter, out SharpDX.Mathematics.Interop.RawMatrix matrixRef) {
         unsafe {
             var hParameter_ = new SharpDX.Direct3D9.EffectHandle.__Native();
             SharpDX.Direct3D9.EffectHandle.__MarshalTo(ref hParameter, ref hParameter_);
             matrixRef = new SharpDX.Mathematics.Interop.RawMatrix();
             SharpDX.Result __result__;
             fixed (void* matrixRef_ = &matrixRef)
                 __result__= 
 				SharpDX.Direct3D9.LocalInterop.Calliint(_nativePointer, hParameter_, matrixRef_,((void**)(*(void**)_nativePointer))[39]);		
             SharpDX.Direct3D9.EffectHandle.__MarshalFree(ref hParameter, ref hParameter_);
             __result__.CheckError();
         }
     }
Beispiel #11
0
     /// <summary>	
     /// <p>Gets an array of transposed matrices.</p>	
     /// </summary>	
     /// <param name="hParameter"><dd>  <p>Unique identifier. See Handles (Direct3D 9).</p> </dd></param>	
     /// <param name="matrixRef"><dd>  <p>Returns an array of transposed matrices. See <strong><see cref="SharpDX.Mathematics.Interop.RawMatrix"/></strong>.</p> </dd></param>	
     /// <param name="count"><dd>  <p>Number of matrices in the array.</p> </dd></param>	
     /// <returns><p>If the method succeeds, the return value is <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. If the method fails, the return value can be <see cref="SharpDX.Direct3D9.ResultCode.InvalidCall"/>.</p></returns>	
     /// <remarks>	
     /// <p>A transposed matrix contains column-major data; that is, each vector is contained in a column.</p><p>If the destination matrices are larger than the source matrices, only the upper-left components of each destination matrix will be filled, and the remaining destination matrix components will be set to zero.</p>	
     /// </remarks>	
     /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3DXBaseEffect::GetMatrixTransposeArray']/*"/>	
     /// <msdn-id>bb205693</msdn-id>	
     /// <unmanaged>HRESULT ID3DXBaseEffect::GetMatrixTransposeArray([In] D3DXHANDLE hParameter,[Out, Buffer] D3DXMATRIX* pMatrix,[In] unsigned int Count)</unmanaged>	
     /// <unmanaged-short>ID3DXBaseEffect::GetMatrixTransposeArray</unmanaged-short>	
     internal void GetMatrixTransposeArray(SharpDX.Direct3D9.EffectHandle hParameter, SharpDX.Mathematics.Interop.RawMatrix[] matrixRef, int count) {
         unsafe {
             var hParameter_ = new SharpDX.Direct3D9.EffectHandle.__Native();
             SharpDX.Direct3D9.EffectHandle.__MarshalTo(ref hParameter, ref hParameter_);
             SharpDX.Result __result__;
             fixed (void* matrixRef_ = matrixRef)
                 __result__= 
 				SharpDX.Direct3D9.LocalInterop.Calliint(_nativePointer, hParameter_, matrixRef_, count,((void**)(*(void**)_nativePointer))[47]);		
             SharpDX.Direct3D9.EffectHandle.__MarshalFree(ref hParameter, ref hParameter_);
             __result__.CheckError();
         }
     }
Beispiel #12
0
     /// <summary>	
     /// <p>Sets an array of vectors.</p>	
     /// </summary>	
     /// <param name="hParameter"><dd>  <p>Unique identifier. See Handles (Direct3D 9).</p> </dd></param>	
     /// <param name="vectorRef"><dd>  <p>Array of 4D floating point vectors.</p> </dd></param>	
     /// <param name="count"><dd>  <p>Number of vectors in the array.</p> </dd></param>	
     /// <returns><p>If the method succeeds, the return value is <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. If the method fails, the return value can be <see cref="SharpDX.Direct3D9.ResultCode.InvalidCall"/>.</p></returns>	
     /// <remarks>	
     /// <p>If the destination vectors are smaller than the source vectors, the additional components of the source vectors will be ignored.</p>	
     /// </remarks>	
     /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3DXBaseEffect::SetVectorArray']/*"/>	
     /// <msdn-id>bb205730</msdn-id>	
     /// <unmanaged>HRESULT ID3DXBaseEffect::SetVectorArray([In] D3DXHANDLE hParameter,[In, Buffer] const D3DXVECTOR4* pVector,[In] unsigned int Count)</unmanaged>	
     /// <unmanaged-short>ID3DXBaseEffect::SetVectorArray</unmanaged-short>	
     internal void SetVectorArray(SharpDX.Direct3D9.EffectHandle hParameter, SharpDX.Mathematics.Interop.RawVector4[] vectorRef, int count) {
         unsafe {
             var hParameter_ = new SharpDX.Direct3D9.EffectHandle.__Native();
             SharpDX.Direct3D9.EffectHandle.__MarshalTo(ref hParameter, ref hParameter_);
             SharpDX.Result __result__;
             fixed (void* vectorRef_ = vectorRef)
                 __result__= 
 				SharpDX.Direct3D9.LocalInterop.Calliint(_nativePointer, hParameter_, vectorRef_, count,((void**)(*(void**)_nativePointer))[36]);		
             SharpDX.Direct3D9.EffectHandle.__MarshalFree(ref hParameter, ref hParameter_);
             __result__.CheckError();
         }
     }
Beispiel #13
0
        /// <summary>	
        /// <p>Sets a vector.</p>	
        /// </summary>	
        /// <param name="hParameter"><dd>  <p>Unique identifier. See Handles (Direct3D 9).</p> </dd></param>	
        /// <param name="vectorRef"><dd>  <p>Pointer to a 4D vector.</p> </dd></param>	
        /// <returns><p>If the method succeeds, the return value is <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. If the method fails, the return value can be <see cref="SharpDX.Direct3D9.ResultCode.InvalidCall"/>.</p></returns>	
        /// <remarks>	
        /// <p>If the destination vector is smaller than the source vector, the additional components of the source vector will be ignored.</p>	
        /// </remarks>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3DXBaseEffect::SetVector']/*"/>	
        /// <msdn-id>bb205729</msdn-id>	
        /// <unmanaged>HRESULT ID3DXBaseEffect::SetVector([In] D3DXHANDLE hParameter,[In] const D3DXVECTOR4* pVector)</unmanaged>	
        /// <unmanaged-short>ID3DXBaseEffect::SetVector</unmanaged-short>	
        internal void SetVector(SharpDX.Direct3D9.EffectHandle hParameter, SharpDX.Mathematics.Interop.RawVector4 vectorRef) {
            unsafe {
                var hParameter_ = new SharpDX.Direct3D9.EffectHandle.__Native();
                SharpDX.Direct3D9.EffectHandle.__MarshalTo(ref hParameter, ref hParameter_);
                SharpDX.Result __result__;
                __result__= 
				SharpDX.Direct3D9.LocalInterop.Calliint(_nativePointer, hParameter_, &vectorRef,((void**)(*(void**)_nativePointer))[34]);		
                SharpDX.Direct3D9.EffectHandle.__MarshalFree(ref hParameter, ref hParameter_);
                __result__.CheckError();
            }
        }
Beispiel #14
0
     /// <summary>	
     /// <p>Gets an array of floating point values.</p>	
     /// </summary>	
     /// <param name="hParameter"><dd>  <p>Unique identifier. See Handles (Direct3D 9).</p> </dd></param>	
     /// <param name="fRef"><dd>  <p>Returns an array of floating point values.</p> </dd></param>	
     /// <param name="count"><dd>  <p>Number of floating point values in the array.</p> </dd></param>	
     /// <returns><p>If the method succeeds, the return value is <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. If the method fails, the return value can be <see cref="SharpDX.Direct3D9.ResultCode.InvalidCall"/>.</p></returns>	
     /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3DXBaseEffect::GetFloatArray']/*"/>	
     /// <msdn-id>bb205683</msdn-id>	
     /// <unmanaged>HRESULT ID3DXBaseEffect::GetFloatArray([In] D3DXHANDLE hParameter,[Out, Buffer] float* pf,[In] unsigned int Count)</unmanaged>	
     /// <unmanaged-short>ID3DXBaseEffect::GetFloatArray</unmanaged-short>	
     internal void GetFloatArray(SharpDX.Direct3D9.EffectHandle hParameter, float[] fRef, int count) {
         unsafe {
             var hParameter_ = new SharpDX.Direct3D9.EffectHandle.__Native();
             SharpDX.Direct3D9.EffectHandle.__MarshalTo(ref hParameter, ref hParameter_);
             SharpDX.Result __result__;
             fixed (void* fRef_ = fRef)
                 __result__= 
 				SharpDX.Direct3D9.LocalInterop.Calliint(_nativePointer, hParameter_, fRef_, count,((void**)(*(void**)_nativePointer))[33]);		
             SharpDX.Direct3D9.EffectHandle.__MarshalFree(ref hParameter, ref hParameter_);
             __result__.CheckError();
         }
     }
Beispiel #15
0
        /// <summary>	
        /// <p>Gets a constant by looking up its name.</p>	
        /// </summary>	
        /// <param name="effectHandle"><dd>  <p>Unique identifier to the parent data structure. If the constant is a top-level parameter (there is no parent data structure), use <strong><c>null</c></strong>.</p> </dd></param>	
        /// <param name="nameRef"><dd>  <p>Name of the constant.</p> </dd></param>	
        /// <returns><p>Returns a unique identifier to the constant.</p></returns>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3DXConstantTable::GetConstantByName']/*"/>	
        /// <msdn-id>bb205766</msdn-id>	
        /// <unmanaged>D3DXHANDLE ID3DXConstantTable::GetConstantByName([In] D3DXHANDLE hConstant,[In] const char* pName)</unmanaged>	
        /// <unmanaged-short>ID3DXConstantTable::GetConstantByName</unmanaged-short>	
        public SharpDX.Direct3D9.EffectHandle GetConstantByName(SharpDX.Direct3D9.EffectHandle effectHandle, string nameRef) {
            unsafe {
                var effectHandle_ = new SharpDX.Direct3D9.EffectHandle.__Native();
                SharpDX.Direct3D9.EffectHandle.__MarshalTo(ref effectHandle, ref effectHandle_);
                IntPtr nameRef_ = Utilities.StringToHGlobalAnsi(nameRef);
                SharpDX.Direct3D9.EffectHandle __result__;
                __result__= 
				SharpDX.Direct3D9.LocalInterop.CallivoidPtr(_nativePointer, effectHandle_, (void*)nameRef_,((void**)(*(void**)_nativePointer))[9]);		
                SharpDX.Direct3D9.EffectHandle.__MarshalFree(ref effectHandle, ref effectHandle_);
                Marshal.FreeHGlobal(nameRef_ );
                return __result__;
            }
        }
Beispiel #16
0
        /// <summary>	
        /// <p>Gets a string.</p>	
        /// </summary>	
        /// <param name="hParameter"><dd>  <p>Unique identifier. See Handles (Direct3D 9).</p> </dd></param>	
        /// <returns><dd>  <p>Returns a string identified by hParameter.</p> </dd></returns>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3DXBaseEffect::GetString']/*"/>	
        /// <msdn-id>bb205704</msdn-id>	
        /// <unmanaged>HRESULT ID3DXBaseEffect::GetString([In] D3DXHANDLE hParameter,[Out] const void** ppString)</unmanaged>	
        /// <unmanaged-short>ID3DXBaseEffect::GetString</unmanaged-short>	
        internal System.IntPtr GetString_(SharpDX.Direct3D9.EffectHandle hParameter) {
            unsafe {
                var hParameter_ = new SharpDX.Direct3D9.EffectHandle.__Native();
                SharpDX.Direct3D9.EffectHandle.__MarshalTo(ref hParameter, ref hParameter_);
                System.IntPtr stringOut;
                SharpDX.Result __result__;
                __result__= 
				SharpDX.Direct3D9.LocalInterop.Calliint(_nativePointer, hParameter_, &stringOut,((void**)(*(void**)_nativePointer))[51]);		
                SharpDX.Direct3D9.EffectHandle.__MarshalFree(ref hParameter, ref hParameter_);
                __result__.CheckError();
                return stringOut;
            }
        }
Beispiel #17
0
        /// <summary>	
        /// <p>Gets a constant from an array of constants. An array is made up of elements.</p>	
        /// </summary>	
        /// <param name="effectHandle"><dd>  <p>Unique identifier to the array of constants.  This value may not be <strong><c>null</c></strong>.</p> </dd></param>	
        /// <param name="index"><dd>  <p>Zero-based index of the element in the array.</p> </dd></param>	
        /// <returns><p>Returns a unique identifier to the element constant.</p></returns>	
        /// <remarks>	
        /// <p>To get a constant that is not part of an array, use <strong><see cref="SharpDX.Direct3D9.ConstantTable.GetConstant"/></strong> or <strong><see cref="SharpDX.Direct3D9.ConstantTable.GetConstantByName"/></strong>.</p>	
        /// </remarks>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3DXConstantTable::GetConstantElement']/*"/>	
        /// <msdn-id>bb205768</msdn-id>	
        /// <unmanaged>D3DXHANDLE ID3DXConstantTable::GetConstantElement([In] D3DXHANDLE hConstant,[In] unsigned int Index)</unmanaged>	
        /// <unmanaged-short>ID3DXConstantTable::GetConstantElement</unmanaged-short>	
        public SharpDX.Direct3D9.EffectHandle GetConstantElement(SharpDX.Direct3D9.EffectHandle effectHandle, int index) {
            unsafe {
                var effectHandle_ = new SharpDX.Direct3D9.EffectHandle.__Native();
                SharpDX.Direct3D9.EffectHandle.__MarshalTo(ref effectHandle, ref effectHandle_);
                SharpDX.Direct3D9.EffectHandle __result__;
                __result__= 
				SharpDX.Direct3D9.LocalInterop.CallivoidPtr(_nativePointer, effectHandle_, index,((void**)(*(void**)_nativePointer))[10]);		
                SharpDX.Direct3D9.EffectHandle.__MarshalFree(ref effectHandle, ref effectHandle_);
                return __result__;
            }
        }
Beispiel #18
0
        /// <summary>	
        /// <p>Sets a texture.</p>	
        /// </summary>	
        /// <param name="hParameter"><dd>  <p>Unique identifier. See Handles (Direct3D 9).</p> </dd></param>	
        /// <param name="textureRef"><dd>  <p>Texture object. See <strong><see cref="SharpDX.Direct3D9.BaseTexture"/></strong>.</p> </dd></param>	
        /// <returns><p>If the method succeeds, the return value is <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. If the method fails, the return value can be <see cref="SharpDX.Direct3D9.ResultCode.InvalidCall"/>.</p></returns>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3DXBaseEffect::SetTexture']/*"/>	
        /// <msdn-id>bb205727</msdn-id>	
        /// <unmanaged>HRESULT ID3DXBaseEffect::SetTexture([In] D3DXHANDLE hParameter,[In] IDirect3DBaseTexture9* pTexture)</unmanaged>	
        /// <unmanaged-short>ID3DXBaseEffect::SetTexture</unmanaged-short>	
        public void SetTexture(SharpDX.Direct3D9.EffectHandle hParameter, SharpDX.Direct3D9.BaseTexture textureRef) {
            unsafe {
                var hParameter_ = new SharpDX.Direct3D9.EffectHandle.__Native();
                SharpDX.Direct3D9.EffectHandle.__MarshalTo(ref hParameter, ref hParameter_);
                SharpDX.Result __result__;
                __result__= 
				SharpDX.Direct3D9.LocalInterop.Calliint(_nativePointer, hParameter_, (void*)((textureRef == null)?IntPtr.Zero:textureRef.NativePointer),((void**)(*(void**)_nativePointer))[52]);		
                SharpDX.Direct3D9.EffectHandle.__MarshalFree(ref hParameter, ref hParameter_);
                __result__.CheckError();
            }
        }
Beispiel #19
0
     /// <summary>	
     /// <p>Sets an array of floating-point numbers.</p>	
     /// </summary>	
     /// <param name="deviceRef"><dd>  <p>Pointer to an <strong><see cref="SharpDX.Direct3D9.Device"/></strong> interface, representing the device associated with the constant table.</p> </dd></param>	
     /// <param name="effectHandle"><dd>  <p>Unique identifier to the array of constants. See <see cref="SharpDX.Direct3D9.EffectHandle"/>.</p> </dd></param>	
     /// <param name="fRef"><dd>  <p>Array of floating-point numbers.</p> </dd></param>	
     /// <param name="count"><dd>  <p>Number of floating-point values in the array.</p> </dd></param>	
     /// <returns><p>If the method succeeds, the return value is <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. If the method fails, the return value can be <see cref="SharpDX.Direct3D9.ResultCode.InvalidCall"/>.</p></returns>	
     /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3DXConstantTable::SetFloatArray']/*"/>	
     /// <msdn-id>bb205775</msdn-id>	
     /// <unmanaged>HRESULT ID3DXConstantTable::SetFloatArray([In] IDirect3DDevice9* pDevice,[In] D3DXHANDLE hConstant,[In, Buffer] const float* pf,[In] unsigned int Count)</unmanaged>	
     /// <unmanaged-short>ID3DXConstantTable::SetFloatArray</unmanaged-short>	
     internal void SetFloatArray(SharpDX.Direct3D9.Device deviceRef, SharpDX.Direct3D9.EffectHandle effectHandle, float[] fRef, int count) {
         unsafe {
             var effectHandle_ = new SharpDX.Direct3D9.EffectHandle.__Native();
             SharpDX.Direct3D9.EffectHandle.__MarshalTo(ref effectHandle, ref effectHandle_);
             SharpDX.Result __result__;
             fixed (void* fRef_ = fRef)
                 __result__= 
 				SharpDX.Direct3D9.LocalInterop.Calliint(_nativePointer, (void*)((deviceRef == null)?IntPtr.Zero:deviceRef.NativePointer), effectHandle_, fRef_, count,((void**)(*(void**)_nativePointer))[18]);		
             SharpDX.Direct3D9.EffectHandle.__MarshalFree(ref effectHandle, ref effectHandle_);
             __result__.CheckError();
         }
     }
Beispiel #20
0
        /// <summary>	
        /// <p>Gets a texture.</p>	
        /// </summary>	
        /// <param name="hParameter"><dd>  <p>Unique identifier. See Handles (Direct3D 9).</p> </dd></param>	
        /// <returns><dd>  <p>Returns a texture object. See <strong><see cref="SharpDX.Direct3D9.BaseTexture"/></strong>.</p> </dd></returns>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3DXBaseEffect::GetTexture']/*"/>	
        /// <msdn-id>bb205708</msdn-id>	
        /// <unmanaged>HRESULT ID3DXBaseEffect::GetTexture([In] D3DXHANDLE hParameter,[Out] IDirect3DBaseTexture9** ppTexture)</unmanaged>	
        /// <unmanaged-short>ID3DXBaseEffect::GetTexture</unmanaged-short>	
        public SharpDX.Direct3D9.BaseTexture GetTexture(SharpDX.Direct3D9.EffectHandle hParameter) {
            unsafe {
                var hParameter_ = new SharpDX.Direct3D9.EffectHandle.__Native();
                SharpDX.Direct3D9.EffectHandle.__MarshalTo(ref hParameter, ref hParameter_);
                SharpDX.Direct3D9.BaseTexture textureOut;
                IntPtr textureOut_ = IntPtr.Zero;
                SharpDX.Result __result__;
                __result__= 
				SharpDX.Direct3D9.LocalInterop.Calliint(_nativePointer, hParameter_, &textureOut_,((void**)(*(void**)_nativePointer))[53]);		
                SharpDX.Direct3D9.EffectHandle.__MarshalFree(ref hParameter, ref hParameter_);
                textureOut= (textureOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D9.BaseTexture(textureOut_);	
                __result__.CheckError();
                return textureOut;
            }
        }
Beispiel #21
0
     /// <summary>	
     /// <p>Sets an array of references to transposed matrices.</p>	
     /// </summary>	
     /// <param name="deviceRef"><dd>  <p>Pointer to an <strong><see cref="SharpDX.Direct3D9.Device"/></strong> interface, representing the device associated with the constant table.</p> </dd></param>	
     /// <param name="effectHandle"><dd>  <p>Unique identifier to the array of matrix constants. See <see cref="SharpDX.Direct3D9.EffectHandle"/>.</p> </dd></param>	
     /// <param name="matrixOut"><dd>  <p>Array of references to transposed matrices. See <strong><see cref="SharpDX.Mathematics.Interop.RawMatrix"/></strong>.</p> </dd></param>	
     /// <param name="count"><dd>  <p>Number of matrices in the array.</p> </dd></param>	
     /// <returns><p>If the method succeeds, the return value is <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. If the method fails, the return value can be <see cref="SharpDX.Direct3D9.ResultCode.InvalidCall"/>.</p></returns>	
     /// <remarks>	
     /// <p>A transposed matrix contains column-major data; that is, each vector is contained in a column.</p>	
     /// </remarks>	
     /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3DXConstantTable::SetMatrixTransposePointerArray']/*"/>	
     /// <msdn-id>bb205784</msdn-id>	
     /// <unmanaged>HRESULT ID3DXConstantTable::SetMatrixTransposePointerArray([In] IDirect3DDevice9* pDevice,[In] D3DXHANDLE hConstant,[In] const D3DXMATRIX** ppMatrix,[In] unsigned int Count)</unmanaged>	
     /// <unmanaged-short>ID3DXConstantTable::SetMatrixTransposePointerArray</unmanaged-short>	
     internal void SetMatrixTransposePointerArray(SharpDX.Direct3D9.Device deviceRef, SharpDX.Direct3D9.EffectHandle effectHandle, ref SharpDX.Mathematics.Interop.RawMatrix matrixOut, int count) {
         unsafe {
             var effectHandle_ = new SharpDX.Direct3D9.EffectHandle.__Native();
             SharpDX.Direct3D9.EffectHandle.__MarshalTo(ref effectHandle, ref effectHandle_);
             SharpDX.Result __result__;
             fixed (void* matrixOut_ = &matrixOut)
                 __result__= 
 				SharpDX.Direct3D9.LocalInterop.Calliint(_nativePointer, (void*)((deviceRef == null)?IntPtr.Zero:deviceRef.NativePointer), effectHandle_, matrixOut_, count,((void**)(*(void**)_nativePointer))[26]);		
             SharpDX.Direct3D9.EffectHandle.__MarshalFree(ref effectHandle, ref effectHandle_);
             __result__.CheckError();
         }
     }
Beispiel #22
0
        /// <summary>	
        /// <p>Gets a vertex shader.</p>	
        /// </summary>	
        /// <param name="hParameter"><dd>  <p>Unique identifier. See Handles (Direct3D 9).</p> </dd></param>	
        /// <returns><dd>  <p>Returns a vertex shader object. See <strong><see cref="SharpDX.Direct3D9.VertexShader"/></strong>.</p> </dd></returns>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3DXBaseEffect::GetVertexShader']/*"/>	
        /// <msdn-id>bb205712</msdn-id>	
        /// <unmanaged>HRESULT ID3DXBaseEffect::GetVertexShader([In] D3DXHANDLE hParameter,[Out] IDirect3DVertexShader9** ppVShader)</unmanaged>	
        /// <unmanaged-short>ID3DXBaseEffect::GetVertexShader</unmanaged-short>	
        public SharpDX.Direct3D9.VertexShader GetVertexShader(SharpDX.Direct3D9.EffectHandle hParameter) {
            unsafe {
                var hParameter_ = new SharpDX.Direct3D9.EffectHandle.__Native();
                SharpDX.Direct3D9.EffectHandle.__MarshalTo(ref hParameter, ref hParameter_);
                SharpDX.Direct3D9.VertexShader vShaderOut;
                IntPtr vShaderOut_ = IntPtr.Zero;
                SharpDX.Result __result__;
                __result__= 
				SharpDX.Direct3D9.LocalInterop.Calliint(_nativePointer, hParameter_, &vShaderOut_,((void**)(*(void**)_nativePointer))[55]);		
                SharpDX.Direct3D9.EffectHandle.__MarshalFree(ref hParameter, ref hParameter_);
                vShaderOut= (vShaderOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D9.VertexShader(vShaderOut_);	
                __result__.CheckError();
                return vShaderOut;
            }
        }
Beispiel #23
0
        /// <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;
            }
        }
Beispiel #24
0
        /// <summary>	
        /// <p>Set the range of an array to pass to the device.</p>	
        /// </summary>	
        /// <param name="hParameter"><dd>  <p>Unique identifier. See Handles (Direct3D 9).</p> </dd></param>	
        /// <param name="uStart"><dd>  <p>Start index.</p> </dd></param>	
        /// <param name="uEnd"><dd>  <p>Stop index.</p> </dd></param>	
        /// <returns><p>If the method succeeds, the return value is <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. If the method fails, the return value can be <see cref="SharpDX.Direct3D9.ResultCode.InvalidCall"/>.</p></returns>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3DXBaseEffect::SetArrayRange']/*"/>	
        /// <msdn-id>bb205713</msdn-id>	
        /// <unmanaged>HRESULT ID3DXBaseEffect::SetArrayRange([In] D3DXHANDLE hParameter,[In] unsigned int uStart,[In] unsigned int uEnd)</unmanaged>	
        /// <unmanaged-short>ID3DXBaseEffect::SetArrayRange</unmanaged-short>	
        internal void SetArrayRange(SharpDX.Direct3D9.EffectHandle hParameter, int uStart, int uEnd) {
            unsafe {
                var hParameter_ = new SharpDX.Direct3D9.EffectHandle.__Native();
                SharpDX.Direct3D9.EffectHandle.__MarshalTo(ref hParameter, ref hParameter_);
                SharpDX.Result __result__;
                __result__= 
				SharpDX.Direct3D9.LocalInterop.Calliint(_nativePointer, hParameter_, uStart, uEnd,((void**)(*(void**)_nativePointer))[56]);		
                SharpDX.Direct3D9.EffectHandle.__MarshalFree(ref hParameter, ref hParameter_);
                __result__.CheckError();
            }
        }
Beispiel #25
0
        /// <summary>	
        /// <p>Delete a parameter block.</p>	
        /// </summary>	
        /// <param name="hParameterBlock"><dd>  <p>A handle to the parameter block. This is the handle returned by <strong><see cref="SharpDX.Direct3D9.Effect.EndParameterBlock"/></strong>.</p> </dd></param>	
        /// <returns><p>If the method succeeds, the return value is <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. If the method fails, the return value can be one of the following: <see cref="SharpDX.Direct3D9.ResultCode.InvalidCall"/>, D3DXERR_INVALIDDATA.</p></returns>	
        /// <remarks>	
        /// <p>Parameter blocks are blocks of effect states. Use a parameter block to record state changes so that they can be applied later on with a single API call. When no longer needed, delete the parameter block to reduce memory usage.</p>	
        /// </remarks>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3DXEffect::DeleteParameterBlock']/*"/>	
        /// <msdn-id>bb205820</msdn-id>	
        /// <unmanaged>HRESULT ID3DXEffect::DeleteParameterBlock([In] D3DXHANDLE hParameterBlock)</unmanaged>	
        /// <unmanaged-short>ID3DXEffect::DeleteParameterBlock</unmanaged-short>	
        public void DeleteParameterBlock(SharpDX.Direct3D9.EffectHandle hParameterBlock) {
            unsafe {
                var hParameterBlock_ = new SharpDX.Direct3D9.EffectHandle.__Native();
                SharpDX.Direct3D9.EffectHandle.__MarshalTo(ref hParameterBlock, ref hParameterBlock_);
                SharpDX.Result __result__;
                __result__= 
				SharpDX.Direct3D9.LocalInterop.Calliint(_nativePointer, hParameterBlock_,((void**)(*(void**)_nativePointer))[76]);		
                SharpDX.Direct3D9.EffectHandle.__MarshalFree(ref hParameterBlock, ref hParameterBlock_);
                __result__.CheckError();
            }
        }
Beispiel #26
0
 /// <summary>	
 /// <p>Gets a reference to an array of constant descriptions in the constant table.</p>	
 /// </summary>	
 /// <param name="effectHandle"><dd>  <p>Unique identifier to a constant. See <see cref="SharpDX.Direct3D9.EffectHandle"/>.</p> </dd></param>	
 /// <param name="constantDescRef"><dd>  <p>Returns a reference to an array of descriptions. See <strong><see cref="SharpDX.Direct3D9.ConstantDescription"/></strong>.</p> </dd></param>	
 /// <param name="countRef"><dd>  <p>The input supplied must be the maximum size of the array. The output is the number of elements that are filled in the array when the function returns.</p> </dd></param>	
 /// <returns><p>If the method succeeds, the return value is <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. If the method fails, the return value can be one of the following: <see cref="SharpDX.Direct3D9.ResultCode.InvalidCall"/>, D3DXERR_INVALIDDATA.</p></returns>	
 /// <remarks>	
 /// <p><strong><see cref="SharpDX.Direct3D9.ConstantTable.GetConstantDescription"/></strong> will sometimes return a <strong><see cref="SharpDX.Direct3D9.ConstantDescription"/></strong> with a Register_Count of 0.  This will happen with a constant appears in more than one Register_Set but does not have space in that register set allocated.</p><p>Because a sampler can appear more than once in a constant table, this method can return an array of descriptions, each one with a different register index.</p>	
 /// </remarks>	
 /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3DXConstantTable::GetConstantDesc']/*"/>	
 /// <msdn-id>bb205767</msdn-id>	
 /// <unmanaged>HRESULT ID3DXConstantTable::GetConstantDesc([In] D3DXHANDLE hConstant,[Out, Buffer] D3DXCONSTANT_DESC* pConstantDesc,[InOut] unsigned int* pCount)</unmanaged>	
 /// <unmanaged-short>ID3DXConstantTable::GetConstantDesc</unmanaged-short>	
 internal void GetConstantDescription(SharpDX.Direct3D9.EffectHandle effectHandle, SharpDX.Direct3D9.ConstantDescription[] constantDescRef, ref int countRef) {
     unsafe {
         var effectHandle_ = new SharpDX.Direct3D9.EffectHandle.__Native();
         SharpDX.Direct3D9.EffectHandle.__MarshalTo(ref effectHandle, ref effectHandle_);
         SharpDX.Direct3D9.ConstantDescription.__Native[] constantDescRef__ = new SharpDX.Direct3D9.ConstantDescription.__Native[constantDescRef.Length];
         SharpDX.Result __result__;
         fixed (void* constantDescRef_ = constantDescRef__)
             fixed (void* countRef_ = &countRef)
                 __result__= 
 				SharpDX.Direct3D9.LocalInterop.Calliint(_nativePointer, effectHandle_, constantDescRef_, countRef_,((void**)(*(void**)_nativePointer))[6]);		
         SharpDX.Direct3D9.EffectHandle.__MarshalFree(ref effectHandle, ref effectHandle_);
         for (int i = 0; i < constantDescRef.Length; i++)
             constantDescRef[i].__MarshalFrom(ref constantDescRef__[i]);				
         __result__.CheckError();
     }
 }
Beispiel #27
0
        /// <summary>	
        /// <p>Toggles the literal status of a parameter. A literal parameter has a value that doesn't change during the lifetime of an effect.</p>	
        /// </summary>	
        /// <param name="hParameter"><dd>  <p>Unique identifier to a parameter. See Handles (Direct3D 9).</p> </dd></param>	
        /// <param name="literal"><dd>  <p>Set to <strong>TRUE</strong> to make the parameter a literal, and <strong><see cref="SharpDX.Result.False"/></strong> if the parameter can change value during the shader lifetime.</p> </dd></param>	
        /// <returns><p>If the method succeeds, the return value is <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. If the method fails, the return value can be <see cref="SharpDX.Direct3D9.ResultCode.InvalidCall"/>.</p></returns>	
        /// <remarks>	
        /// <p>This methods only changes whether the parameter is a literal or not. To change the value of a parameter, use a method like <strong><see cref="SharpDX.Direct3D9.BaseEffect.SetBool"/></strong> or <strong><see cref="SharpDX.Direct3D9.BaseEffect.SetValue"/></strong>.</p><p>This function must be called before the effect is compiled.  Here is an example of how one might use this function:</p><pre> LPD3DXEFFECTCOMPILER pEffectCompiler; char errors[1000]; <see cref="SharpDX.Result"/> hr; hr = <see cref="SharpDX.Direct3D9.D3DX9.CreateEffectCompilerFromFileW"/>("shader.fx", <c>null</c>, <c>null</c>, 0, &amp;pEffectCompiler,  &amp;errors); //In the fx file, literalInt is declared as an int. //By calling this function, the compiler will treat //it as a literal (i.e. #define) hr = pEffectCompiler-&gt;SetLiteral("literalInt", TRUE); //create ten different variations of the same effect LPD3DXBUFFER pEffects[10]; LPD3DXBUFFER pErrors; for(int i = 0; i &lt; 10; ++i) { hr = pEffectCompiler-&gt;SetInt("literalInt", i); hr = pEffectCompiler-&gt;CompileEffect(0, &amp;pEffects[i], &amp;pErrors); }	
        /// </pre>	
        /// </remarks>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3DXEffectCompiler::SetLiteral']/*"/>	
        /// <msdn-id>bb205793</msdn-id>	
        /// <unmanaged>HRESULT ID3DXEffectCompiler::SetLiteral([In] D3DXHANDLE hParameter,[In] BOOL Literal)</unmanaged>	
        /// <unmanaged-short>ID3DXEffectCompiler::SetLiteral</unmanaged-short>	
        public void SetLiteral(SharpDX.Direct3D9.EffectHandle hParameter, SharpDX.Mathematics.Interop.RawBool literal) {
            unsafe {
                var hParameter_ = new SharpDX.Direct3D9.EffectHandle.__Native();
                SharpDX.Direct3D9.EffectHandle.__MarshalTo(ref hParameter, ref hParameter_);
                SharpDX.Result __result__;
                __result__= 
				SharpDX.Direct3D9.LocalInterop.Calliint85(_nativePointer, hParameter_, literal,((void**)(*(void**)_nativePointer))[57]);		
                SharpDX.Direct3D9.EffectHandle.__MarshalFree(ref hParameter, ref hParameter_);
                __result__.CheckError();
            }
        }
Beispiel #28
0
        /// <summary>	
        /// <p>Returns the sampler index.</p>	
        /// </summary>	
        /// <param name="effectHandle"><dd>  <p>The sampler handle.</p> </dd></param>	
        /// <returns><p>Returns the sampler index number from the constant table.</p></returns>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3DXConstantTable::GetSamplerIndex']/*"/>	
        /// <msdn-id>bb205770</msdn-id>	
        /// <unmanaged>unsigned int ID3DXConstantTable::GetSamplerIndex([In] D3DXHANDLE hConstant)</unmanaged>	
        /// <unmanaged-short>ID3DXConstantTable::GetSamplerIndex</unmanaged-short>	
        public int GetSamplerIndex(SharpDX.Direct3D9.EffectHandle effectHandle) {
            unsafe {
                var effectHandle_ = new SharpDX.Direct3D9.EffectHandle.__Native();
                SharpDX.Direct3D9.EffectHandle.__MarshalTo(ref effectHandle, ref effectHandle_);
                int __result__;
                __result__= 
				SharpDX.Direct3D9.LocalInterop.Calliint(_nativePointer, effectHandle_,((void**)(*(void**)_nativePointer))[7]);		
                SharpDX.Direct3D9.EffectHandle.__MarshalFree(ref effectHandle, ref effectHandle_);
                return __result__;
            }
        }
Beispiel #29
0
        /// <summary>	
        /// <p>Compiles a shader from an effect that contains one or more functions.</p>	
        /// </summary>	
        /// <param name="hFunction"><dd>  <p>Unique identifier to the function to be compiled. This value must not be <strong><c>null</c></strong>. See Handles (Direct3D 9).</p> </dd></param>	
        /// <param name="targetRef"><dd>  <p>Pointer to a shader profile which determines the shader instruction set. See <strong><see cref="SharpDX.Direct3D9.D3DX9.GetVertexShaderProfile"/></strong> or <strong><see cref="SharpDX.Direct3D9.D3DX9.GetPixelShaderProfile"/></strong> for a list of the profiles available.</p> </dd></param>	
        /// <param name="flags"><dd>  <p>Compile options identified by various flags. The Direct3D 10 HLSL compiler is now the default. See <see cref="SharpDX.Direct3D9.ShaderFlags"/> Flags for details.</p> </dd></param>	
        /// <param name="shaderOut"><dd>  <p>Buffer containing the compiled shader. The compiler shader is an array of DWORDs. For more information about accessing the buffer, see <strong><see cref="SharpDX.Direct3D.Blob"/></strong>.</p> </dd></param>	
        /// <param name="errorMsgsOut"><dd>  <p>Buffer containing at least the first compile error message that occurred. This includes effect compiler errors and high-level language compile errors. For more information about accessing the buffer, see <strong><see cref="SharpDX.Direct3D.Blob"/></strong>.</p> </dd></param>	
        /// <param name="constantTableOut"><dd>  <p>Returns an <strong><see cref="SharpDX.Direct3D9.ConstantTable"/></strong> interface, which can be used to access shader constants. This value can be <strong><c>null</c></strong>. If you compile your application as large address aware (that is, you use the /LARGEADDRESSAWARE linker option to handle addresses larger than 2 GB), you cannot use this parameter and must set it to <strong><c>null</c></strong>. Instead, you must use the <strong><see cref="SharpDX.Direct3D9.D3DX9.GetShaderConstantTableEx"/></strong> function to retrieve the shader-constant table that is embedded inside the shader. In this <strong><see cref="SharpDX.Direct3D9.D3DX9.GetShaderConstantTableEx"/></strong> call, you must pass the <strong>D3DXCONSTTABLE_LARGEADDRESSAWARE</strong> flag to the <em>Flags</em> parameter to specify to access up to 4 GB of virtual address space.</p> </dd></param>	
        /// <returns><p>If the method succeeds, the return value is <see cref="SharpDX.Result.Ok"/>.</p><p>If the arguments are invalid, the method will return <see cref="SharpDX.Direct3D9.ResultCode.InvalidCall"/>.</p><p>If the method fails, the return value will be E_FAIL.</p></returns>	
        /// <remarks>	
        /// <p>Targets can be specified for vertex shaders, pixel shaders, and texture fill functions.</p><table> <tr><td>Vertex shader targets</td><td>vs_1_1, vs_2_0, vs_2_sw, vs_3_0</td></tr> <tr><td>Pixel shader targets</td><td>ps_1_1, ps_1_2, ps_1_3, ps_1_4, ps_2_0, ps_2_sw, ps_3_0</td></tr> <tr><td>Texture fill targets</td><td>tx_0, tx_1</td></tr> </table><p>?</p><p>This method compiles a shader from a function that is written in a C-like language. For more information, see HLSL.</p>	
        /// </remarks>	
        /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3DXEffectCompiler::CompileShader']/*"/>	
        /// <msdn-id>bb205791</msdn-id>	
        /// <unmanaged>HRESULT ID3DXEffectCompiler::CompileShader([In] D3DXHANDLE hFunction,[In] const char* pTarget,[In] unsigned int Flags,[In] ID3DXBuffer** ppShader,[In] ID3DXBuffer** ppErrorMsgs,[In] ID3DXConstantTable** ppConstantTable)</unmanaged>	
        /// <unmanaged-short>ID3DXEffectCompiler::CompileShader</unmanaged-short>	
        internal void CompileShader(SharpDX.Direct3D9.EffectHandle hFunction, string targetRef, int flags, out SharpDX.Direct3D.Blob shaderOut, out SharpDX.Direct3D.Blob errorMsgsOut, out SharpDX.Direct3D9.ConstantTable constantTableOut) {
            unsafe {
                var hFunction_ = new SharpDX.Direct3D9.EffectHandle.__Native();
                SharpDX.Direct3D9.EffectHandle.__MarshalTo(ref hFunction, ref hFunction_);
                IntPtr targetRef_ = Utilities.StringToHGlobalAnsi(targetRef);
                IntPtr shaderOut_ = IntPtr.Zero;
                IntPtr errorMsgsOut_ = IntPtr.Zero;
                IntPtr constantTableOut_ = IntPtr.Zero;
                SharpDX.Result __result__;
                __result__= 
				SharpDX.Direct3D9.LocalInterop.Calliint(_nativePointer, hFunction_, (void*)targetRef_, flags, &shaderOut_, &errorMsgsOut_, &constantTableOut_,((void**)(*(void**)_nativePointer))[60]);		
                SharpDX.Direct3D9.EffectHandle.__MarshalFree(ref hFunction, ref hFunction_);
                Marshal.FreeHGlobal(targetRef_ );
                shaderOut= (shaderOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D.Blob(shaderOut_);	
                errorMsgsOut= (errorMsgsOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D.Blob(errorMsgsOut_);	
                constantTableOut= (constantTableOut_ == IntPtr.Zero)?null:new SharpDX.Direct3D9.ConstantTable(constantTableOut_);	
                __result__.CheckError();
            }
        }
Beispiel #30
0
     /// <summary>	
     /// <p>Gets an integer.</p>	
     /// </summary>	
     /// <param name="hParameter"><dd>  <p>Unique identifier. See Handles (Direct3D 9).</p> </dd></param>	
     /// <param name="nRef"><dd>  <p>Returns an integer.</p> </dd></param>	
     /// <returns><p>If the method succeeds, the return value is <see cref="SharpDX.Direct3D9.ResultCode.Success"/>. If the method fails, the return value can be <see cref="SharpDX.Direct3D9.ResultCode.InvalidCall"/>.</p></returns>	
     /// <include file='.\..\Documentation\CodeComments.xml' path="/comments/comment[@id='ID3DXBaseEffect::GetInt']/*"/>	
     /// <msdn-id>bb205687</msdn-id>	
     /// <unmanaged>HRESULT ID3DXBaseEffect::GetInt([In] D3DXHANDLE hParameter,[Out] int* pn)</unmanaged>	
     /// <unmanaged-short>ID3DXBaseEffect::GetInt</unmanaged-short>	
     internal void GetInt(SharpDX.Direct3D9.EffectHandle hParameter, out int nRef) {
         unsafe {
             var hParameter_ = new SharpDX.Direct3D9.EffectHandle.__Native();
             SharpDX.Direct3D9.EffectHandle.__MarshalTo(ref hParameter, ref hParameter_);
             SharpDX.Result __result__;
             fixed (void* nRef_ = &nRef)
                 __result__= 
 				SharpDX.Direct3D9.LocalInterop.Calliint(_nativePointer, hParameter_, nRef_,((void**)(*(void**)_nativePointer))[27]);		
             SharpDX.Direct3D9.EffectHandle.__MarshalFree(ref hParameter, ref hParameter_);
             __result__.CheckError();
         }
     }