public IGlContext CreateContext(IGlContext share) { var shareCtx = (EglContext)share; var ctx = _egl.CreateContext(_display, _config, shareCtx?.Context ?? IntPtr.Zero, _contextAttributes); if (ctx == IntPtr.Zero) { throw OpenGlException.GetFormattedException("eglCreateContext", _egl); } var surf = _egl.CreatePBufferSurface(_display, _config, new[] { EGL_WIDTH, 1, EGL_HEIGHT, 1, EGL_NONE }); if (surf == IntPtr.Zero) { throw OpenGlException.GetFormattedException("eglCreatePBufferSurface", _egl); } var rv = new EglContext(this, _egl, ctx, surf); rv.MakeCurrent(null); return(rv); }
public EglContext CreateContext(IGlContext share) { if ((_surfaceType | EGL_PBUFFER_BIT) == 0) { throw new InvalidOperationException("Platform doesn't support PBUFFER surfaces"); } var shareCtx = (EglContext)share; var ctx = _egl.CreateContext(_display, _config, shareCtx?.Context ?? IntPtr.Zero, _contextAttributes); if (ctx == IntPtr.Zero) { throw OpenGlException.GetFormattedException("eglCreateContext", _egl); } var surf = _egl.CreatePBufferSurface(_display, _config, new[] { EGL_WIDTH, 1, EGL_HEIGHT, 1, EGL_NONE }); if (surf == IntPtr.Zero) { throw OpenGlException.GetFormattedException("eglCreatePBufferSurface", _egl); } var rv = new EglContext(this, _egl, ctx, new EglSurface(this, _egl, surf)); rv.MakeCurrent(null); return(rv); }
public RenderTarget(EglDisplay display, EglContext context, EglSurface glSurface, IEglWindowGlPlatformSurfaceInfo info) { _display = display; _context = context; _glSurface = glSurface; _info = info; _initialSize = info.Size; }
public Session(EglDisplay display, EglContext context, EglSurface glSurface, IEglWindowGlPlatformSurfaceInfo info, IDisposable @lock) { _context = context; _display = display; _glSurface = glSurface; _info = info; _lock = @lock; }
public EglContext CreateContext(EglContext share, EglSurface offscreenSurface) { var ctx = _egl.CreateContext(_display, _config, share?.Context ?? IntPtr.Zero, _contextAttributes); if (ctx == IntPtr.Zero) { throw OpenGlException.GetFormattedException("eglCreateContext", _egl); } var rv = new EglContext(this, _egl, ctx, offscreenSurface); rv.MakeCurrent(null); return(rv); }
public Session(EglDisplay display, EglContext context, EglSurface glSurface, EglGlPlatformSurfaceBase.IEglWindowGlPlatformSurfaceInfo info, IDisposable @lock, IDisposable restoreContext, Action onFinish, bool isYFlipped) { IsYFlipped = isYFlipped; _context = context; _display = display; _glSurface = glSurface; _info = info; _lock = @lock; _restoreContext = restoreContext; _onFinish = onFinish; }
public RenderTarget(EglContext context, EglSurface glSurface, IEglWindowGlPlatformSurfaceInfo info) { _context = context; _glSurface = glSurface; _info = info; }
public EglGlPlatformSurface(EglDisplay display, EglContext context, IEglWindowGlPlatformSurfaceInfo info) { _display = display; _context = context; _info = info; }
public EglGlPlatformSurface(EglContext context, IEglWindowGlPlatformSurfaceInfo info) : base() { _display = context.Display; _context = context; _info = info; }
protected EglPlatformSurfaceRenderTargetBase(EglDisplay display, EglContext context) { _display = display; _context = context; }