/// <summary>
        /// Creates the IndirectLight object.
        /// </summary>
        /// <param name="engine">Reference to the <<see cref="Engine"/> to associate this IndirectLight with.</param>
        /// <returns>The newly created object or nullptr if exceptions are disabled and an error occurred.</returns>
        public IndirectLight Build(Engine engine)
        {
            ThrowExceptionIfDisposed();

            return(IndirectLight.GetOrCreateCache(
                       Native.IndirectLightBuilder.Build(NativePtr, engine.NativePtr)
                       ));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Destroys a IndirectLight.
        /// </summary>
        /// <param name="light">A IndirectLight.</param>
        public bool Destroy(IndirectLight light)
        {
            ThrowExceptionIfDisposed();

            light.Dispose();

            return(Native.Engine.DestroyIndirectLight(NativePtr, light.NativePtr));
        }