Exemplo n.º 1
0
        /// <summary>
        /// Uses a user-provided function to fill each texel of each mip level of a given texture.
        /// </summary>
        /// <param name="callback">A function that is used to fill the texture.</param>
        /// <returns>A <see cref="SharpDX.Result" /> object describing the result of the operation.</returns>
        /// <unmanaged>HRESULT D3DXFillTexture([In] IDirect3DTexture9* pTexture,[In] __function__stdcall* pFunction,[In] void* pData)</unmanaged>
        public void Fill(Fill2DCallback callback)
        {
            var handle = GCHandle.Alloc(callback);

            try
            {
                D3DX9.FillTexture(this, FillCallbackHelper.Native2DCallbackPtr, GCHandle.ToIntPtr(handle));
            }
            finally
            {
                handle.Free();
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Uses a user-provided function to fill each texel of each mip level of a given texture.
 /// </summary>
 /// <param name="callback">A function that is used to fill the texture.</param>
 /// <returns>A <see cref="SharpDX.Result" /> object describing the result of the operation.</returns>
 /// <unmanaged>HRESULT D3DXFillTexture([In] IDirect3DTexture9* pTexture,[In] __function__stdcall* pFunction,[In] void* pData)</unmanaged>
 public void Fill(Fill2DCallback callback)
 {
     var handle = GCHandle.Alloc(callback);
     try
     {
         D3DX9.FillTexture(this, FillCallbackHelper.Native2DCallbackPtr, GCHandle.ToIntPtr(handle));
     }
     finally
     {
         handle.Free();
     }
 }
Exemplo n.º 3
0
 public Result Fill(Fill2DCallback callback)
 {
     return _texture.Fill(callback);
 }
Exemplo n.º 4
0
 public Result Fill(Fill2DCallback callback)
 {
     return(_texture.Fill(callback));
 }