Browse Source

Block context creation for non-supporting displays

pull/9639/head
Nikita Tsukanov 4 years ago
parent
commit
58ee997bb7
  1. 3
      src/Avalonia.OpenGL/Egl/EglDisplay.cs

3
src/Avalonia.OpenGL/Egl/EglDisplay.cs

@ -51,6 +51,9 @@ namespace Avalonia.OpenGL.Egl
public EglInterface EglInterface => _egl;
public EglContext CreateContext(EglContextOptions options)
{
if (SingleContext && _contexts.Any())
throw new OpenGlException("This EGLDisplay can only have one active context");
options ??= new EglContextOptions();
lock (_lock)
{

Loading…
Cancel
Save