10 changed files with 63 additions and 51 deletions
@ -0,0 +1,8 @@ |
|||
namespace Avalonia.OpenGL |
|||
{ |
|||
public enum GlDisplayType |
|||
{ |
|||
OpenGL2, |
|||
OpenGLES2 |
|||
} |
|||
} |
|||
@ -0,0 +1,8 @@ |
|||
namespace Avalonia.OpenGL |
|||
{ |
|||
public interface IGlContext |
|||
{ |
|||
IGlDisplay Display { get; } |
|||
void MakeCurrent(IGlSurface surface); |
|||
} |
|||
} |
|||
@ -1,22 +1,7 @@ |
|||
using System; |
|||
|
|||
namespace Avalonia.OpenGL |
|||
{ |
|||
public interface IGlPlatformSurface |
|||
{ |
|||
IGlPlatformSurfaceRenderTarget CreateGlRenderTarget(); |
|||
} |
|||
|
|||
public interface IGlPlatformSurfaceRenderTarget : IDisposable |
|||
{ |
|||
IGlPlatformSurfaceRenderingSession BeginDraw(); |
|||
} |
|||
|
|||
public interface IGlPlatformSurfaceRenderingSession : IDisposable |
|||
{ |
|||
IGlDisplay Display { get; } |
|||
// TODO: Change to PixelSize struct once https://github.com/AvaloniaUI/Avalonia/pull/1889 is merged
|
|||
System.Drawing.Size PixelSize { get; } |
|||
double Scaling { get; } |
|||
} |
|||
} |
|||
|
|||
@ -0,0 +1,9 @@ |
|||
using System; |
|||
|
|||
namespace Avalonia.OpenGL |
|||
{ |
|||
public interface IGlPlatformSurfaceRenderTarget : IDisposable |
|||
{ |
|||
IGlPlatformSurfaceRenderingSession BeginDraw(); |
|||
} |
|||
} |
|||
@ -0,0 +1,12 @@ |
|||
using System; |
|||
|
|||
namespace Avalonia.OpenGL |
|||
{ |
|||
public interface IGlPlatformSurfaceRenderingSession : IDisposable |
|||
{ |
|||
IGlDisplay Display { get; } |
|||
// TODO: Change to PixelSize struct once https://github.com/AvaloniaUI/Avalonia/pull/1889 is merged
|
|||
System.Drawing.Size PixelSize { get; } |
|||
double Scaling { get; } |
|||
} |
|||
} |
|||
@ -0,0 +1,10 @@ |
|||
using System; |
|||
|
|||
namespace Avalonia.OpenGL |
|||
{ |
|||
public interface IGlSurface : IDisposable |
|||
{ |
|||
IGlDisplay Display { get; } |
|||
void SwapBuffers(); |
|||
} |
|||
} |
|||
Loading…
Reference in new issue