Exemple #1
0
 /// <summary>
 /// Handles the Ultraviolet context's <see cref="UltravioletContext.WindowDrawn"/> event.
 /// </summary>
 private void uv_WindowDrawn(UltravioletContext uv, UltravioletTime time, IUltravioletWindow window)
 {
     OnWindowDrawn(time, window);
 }
Exemple #2
0
        /// <inheritdoc/>
        public void Update(UltravioletTime time)
        {
            Contract.EnsureNotDisposed(this, Disposed);

            Updating?.Invoke(this, time);
        }
Exemple #3
0
 /// <summary>
 /// Handles the Ultraviolet window's Drawing event.
 /// </summary>
 /// <param name="window">The window being drawn.</param>
 /// <param name="time">Time elapsed since the last call to <see cref="UltravioletContext.Draw(UltravioletTime)"/>.</param>
 private void uv_Drawing(IUltravioletWindow window, UltravioletTime time)
 {
     OnDrawing(time);
 }
Exemple #4
0
 /// <summary>
 /// Handles the Ultraviolet context's Updating event.
 /// </summary>
 /// <param name="uv">The Ultraviolet context.</param>
 /// <param name="time">Time elapsed since the last call to <see cref="UltravioletContext.Update(UltravioletTime)"/>.</param>
 private void uv_Updating(UltravioletContext uv, UltravioletTime time)
 {
     OnUpdating(time);
 }
Exemple #5
0
 /// <summary>
 /// Called when the scene is being drawn.
 /// </summary>
 /// <param name="time">Time elapsed since the last call to <see cref="UltravioletContext.Draw(UltravioletTime)"/>.</param>
 protected virtual void OnDrawing(UltravioletTime time)
 {
 }
Exemple #6
0
 /// <summary>
 /// Called after one of the application's windows has been drawn.
 /// </summary>
 /// <param name="time">Time elapsed since the last call to <see cref="UltravioletContext.Draw(UltravioletTime)"/>.</param>
 /// <param name="window">The window that was just drawn.</param>
 protected virtual void OnWindowDrawn(UltravioletTime time, IUltravioletWindow window)
 {
 }
 /// <summary>
 /// Raises the <see cref="Updating"/> event.
 /// </summary>
 /// <param name="time">Time elapsed since the last call to <see cref="Update(UltravioletTime)"/>.</param>
 protected virtual void OnUpdating(UltravioletTime time) =>
 Updating?.Invoke(this, time);
Exemple #8
0
 /// <summary>
 /// Called when the application state is being updated.
 /// </summary>
 /// <param name="time">Time elapsed since the last call to <see cref="UltravioletContext.Update(UltravioletTime)"/>.</param>
 protected virtual void OnUpdating(UltravioletTime time)
 {
 }
 /// <summary>
 /// Raises the <see cref="WindowDrawn"/> event.
 /// </summary>
 /// <param name="time">Time elapsed since the last call to <see cref="UltravioletContext.Draw(UltravioletTime)"/>.</param>
 /// <param name="window">The window that was just drawn.</param>
 protected virtual void OnWindowDrawn(UltravioletTime time, IUltravioletWindow window) =>
 WindowDrawn?.Invoke(this, time, window);
 /// <summary>
 /// Raises the <see cref="UpdatingSubsystems"/> event.
 /// </summary>
 /// <param name="time">Time elapsed since the last call to <see cref="Update(UltravioletTime)"/>.</param>
 protected virtual void OnUpdatingSubsystems(UltravioletTime time) =>
 UpdatingSubsystems?.Invoke(this, time);
 /// <summary>
 /// Raises the <see cref="Drawing"/> event.
 /// </summary>
 /// <param name="time">Time elapsed since the last call to <see cref="UltravioletContext.Draw(UltravioletTime)"/>.</param>
 protected virtual void OnDrawing(UltravioletTime time) =>
 Drawing?.Invoke(this, time);
 /// <summary>
 /// Updates the context's state.
 /// </summary>
 /// <param name="time">Time elapsed since the last call to <see cref="UltravioletContext.Update(UltravioletTime)"/>.</param>
 protected void UpdateContext(UltravioletTime time)
 {
     ProcessWorkItems();
     UpdateTasks();
 }
 /// <summary>
 /// Draws the scene.
 /// </summary>
 /// <param name="time">Time elapsed since the last call to <see cref="UltravioletContext.Draw(UltravioletTime)"/>.</param>
 public virtual void Draw(UltravioletTime time)
 {
 }
 /// <summary>
 /// Updates the game state.
 /// </summary>
 /// <param name="time">Time elapsed since the last call to <see cref="UltravioletContext.Update(UltravioletTime)"/>.</param>
 public virtual void Update(UltravioletTime time)
 {
 }
Exemple #15
0
 /// <summary>
 /// Renders the current frame and swaps the framebuffers.
 /// </summary>
 /// <param name="time">Time elapsed since the last time the framebuffers were drawn and swapped.</param>
 /// <param name="onWindowDrawing">An action to perform when a window is being drawn.</param>
 /// <param name="onWindowDrawn">An action to perform when a window has finished drawing.</param>
 public abstract void DrawAndSwap(UltravioletTime time,
                                  Action <UltravioletContext, UltravioletTime, IUltravioletWindow> onWindowDrawing,
                                  Action <UltravioletContext, UltravioletTime, IUltravioletWindow> onWindowDrawn);