42 lines
1.0 KiB
C#
42 lines
1.0 KiB
C#
using Engine.Graphics.Texture;
|
|
using Engine.Scene;
|
|
using OpenTK.Windowing.Common;
|
|
|
|
namespace Engine.Graphics;
|
|
|
|
/// <summary>
|
|
/// Defines an interface for a presenter that handles updates, rendering, and presentation.
|
|
/// </summary>
|
|
public interface IPresenter : IUpdate, IRender
|
|
{
|
|
/// <summary>
|
|
/// Occurs when the presenter is resized.
|
|
/// </summary>
|
|
public event Action<ResizeEventArgs> OnResize;
|
|
|
|
/// <summary>
|
|
/// Gets the current width of the presenter.
|
|
/// </summary>
|
|
public int Width { get; }
|
|
|
|
/// <summary>
|
|
/// Gets the current height of the presenter.
|
|
/// </summary>
|
|
public int Height { get; }
|
|
|
|
/// <summary>
|
|
/// Gets a value indicating whether the presenter is exiting.
|
|
/// </summary>
|
|
public bool IsExiting { get; }
|
|
|
|
/// <summary>
|
|
/// Presents a texture to the rendering surface.
|
|
/// </summary>
|
|
/// <param name="parTexture">The texture to present.</param>
|
|
public void Present(IConstTexture parTexture);
|
|
|
|
/// <summary>
|
|
/// Signals the presenter to exit.
|
|
/// </summary>
|
|
public void Exit();
|
|
} |