Ejemplo n.º 1
0
 /// <summary>
 /// Uses a user-provided function to fill each texel of each mip level of a given cube 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>
 public void Fill(Fill3DCallback callback)
 {
     var handle = GCHandle.Alloc(callback);
     try
     {
         D3DX9.FillCubeTexture(this, FillCallbackHelper.Native3DCallbackPtr, GCHandle.ToIntPtr(handle));
     } 
     finally
     {
         handle.Free();
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Uses a user-provided function to fill each texel of each mip level of a given cube 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>
        public void Fill(Fill3DCallback callback)
        {
            var handle = GCHandle.Alloc(callback);

            try
            {
                D3DX9.FillCubeTexture(this, FillCallbackHelper.Native3DCallbackPtr, GCHandle.ToIntPtr(handle));
            }
            finally
            {
                handle.Free();
            }
        }