示例#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);
 }
示例#2
0
        /// <inheritdoc/>
        public void Update(UltravioletTime time)
        {
            Contract.EnsureNotDisposed(this, Disposed);

            Updating?.Invoke(this, time);
        }
示例#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);
 }
示例#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);
 }
示例#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)
 {
 }
示例#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)
 {
 }
示例#7
0
 /// <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);
示例#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)
 {
 }
示例#9
0
 /// <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);
示例#10
0
 /// <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);
示例#11
0
 /// <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);
示例#12
0
 /// <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();
 }
示例#13
0
 /// <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)
 {
 }
示例#14
0
 /// <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)
 {
 }
示例#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);