|
|
@ -121,9 +121,11 @@ namespace Avalonia.OpenGL |
|
|
_contextAttributes = cfg.Attributes; |
|
|
_contextAttributes = cfg.Attributes; |
|
|
_surfaceType = surfaceType; |
|
|
_surfaceType = surfaceType; |
|
|
Type = cfg.Type; |
|
|
Type = cfg.Type; |
|
|
|
|
|
goto Found; |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
Found: |
|
|
if (_contextAttributes == null) |
|
|
if (_contextAttributes == null) |
|
|
throw new OpenGlException("No suitable EGL config was found"); |
|
|
throw new OpenGlException("No suitable EGL config was found"); |
|
|
|
|
|
|
|
|
@ -155,7 +157,6 @@ namespace Avalonia.OpenGL |
|
|
if (surf == IntPtr.Zero) |
|
|
if (surf == IntPtr.Zero) |
|
|
throw OpenGlException.GetFormattedException("eglCreatePBufferSurface", _egl); |
|
|
throw OpenGlException.GetFormattedException("eglCreatePBufferSurface", _egl); |
|
|
var rv = new EglContext(this, _egl, ctx, new EglSurface(this, _egl, surf)); |
|
|
var rv = new EglContext(this, _egl, ctx, new EglSurface(this, _egl, surf)); |
|
|
rv.MakeCurrent(null); |
|
|
|
|
|
return rv; |
|
|
return rv; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|