43 lines
1.1 KiB
C#
43 lines
1.1 KiB
C#
using System.Drawing;
|
|
|
|
namespace Dashboard.Drawing.OpenGL
|
|
{
|
|
/// <summary>
|
|
/// Interface for GL context operations
|
|
/// </summary>
|
|
public interface IGLContext
|
|
{
|
|
/// <summary>
|
|
/// The associated group for context sharing.
|
|
/// </summary>
|
|
/// <remarks>-1 assigns no group.</remarks>
|
|
public int ContextGroup { get; }
|
|
|
|
/// <summary>
|
|
/// The size of the framebuffer in pixels.
|
|
/// </summary>
|
|
public Size FramebufferSize { get; }
|
|
|
|
/// <summary>
|
|
/// Called when the context is disposed.
|
|
/// </summary>
|
|
event Action Disposed;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Extension interface for GL contexts in a DPI-aware environment.
|
|
/// </summary>
|
|
public interface IDpiAwareGLContext : IGLContext
|
|
{
|
|
/// <summary>
|
|
/// Dpi for current context.
|
|
/// </summary>
|
|
public float Dpi { get; }
|
|
|
|
/// <summary>
|
|
/// Scale for the current context. This will be used to scale drawn geometry.
|
|
/// </summary>
|
|
public float Scale { get; }
|
|
}
|
|
}
|