/** * @eglsymbols * @eglfunref{SwapInterval} */ bool SwapInterval(EGLint interval) { EGLBoolean result = EGLPLUS_EGLFUNC(SwapInterval)( _handle, interval ); EGLPLUS_CHECK(EGLPLUS_ERROR_INFO(SwapInterval)); return result == EGL_TRUE; }
/** * @eglsymbols * @eglfunref{BindAPI} */ inline Boolean BindAPI(RenderingAPI api) { Boolean result( EGLPLUS_EGLFUNC(BindAPI)(EGLenum(api)), std::nothrow ); EGLPLUS_VERIFY_SIMPLE(BindAPI); return result; }
/** * @eglsymbols * @eglfunref{QueryContext} */ bool Query(ContextAttrib attrib, EGLint& value) const { EGLBoolean result = EGLPLUS_EGLFUNC(QueryContext)( GetEGLHandle(_display), _handle, EGLint(EGLenum(attrib)), &value ); EGLPLUS_CHECK_SIMPLE(QueryContext); return result == EGL_TRUE; }
/** * @eglsymbols * @eglfunref{MakeCurrent} */ bool Release(void) { EGLBoolean result = EGLPLUS_EGLFUNC(MakeCurrent)( GetEGLHandle(_display), EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT ); EGLPLUS_CHECK_SIMPLE(MakeCurrent); return result == EGL_TRUE; }
/** * @eglsymbols * @eglfunref{DestroyContext} */ ~Context(void) { if(_handle != EGL_NO_CONTEXT) { EGLPLUS_EGLFUNC(DestroyContext)( GetEGLHandle(_display), _handle ); EGLPLUS_VERIFY_SIMPLE(DestroyContext); } }
/** * @eglsymbols * @eglfunref{MakeCurrent} */ bool MakeCurrent(const Surface& surface) { EGLBoolean result = EGLPLUS_EGLFUNC(MakeCurrent)( GetEGLHandle(_display), GetEGLHandle(surface), GetEGLHandle(surface), _handle ); EGLPLUS_CHECK_SIMPLE(MakeCurrent); return result == EGL_TRUE; }
/** * @eglsymbols * @eglfunref{MakeCurrent} */ bool ReleaseContext(void) { EGLBoolean result = EGLPLUS_EGLFUNC(MakeCurrent)( _handle, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT ); EGLPLUS_CHECK(EGLPLUS_ERROR_INFO(MakeCurrent)); return result == EGL_TRUE; }
/** * @eglsymbols * @eglfunref{GetConfigAttrib} */ EGLint GetAttrib(ConfigAttrib attrib) const { EGLint result = 0; EGLPLUS_EGLFUNC(GetConfigAttrib)( FriendOf<Display>::GetHandle(_display), this->_handle, EGLint(EGLenum(attrib)), &result ); EGLPLUS_VERIFY(EGLPLUS_ERROR_INFO(GetConfigAttrib)); return result; }
/** * @eglsymbols * @eglfunref{QueryContext} */ EGLint ConfigId(void) const { EGLint result = 0; EGLPLUS_EGLFUNC(QueryContext)( GetEGLHandle(_display), _handle, EGLint(EGL_CONFIG_ID), &result ); EGLPLUS_CHECK_SIMPLE(QueryContext); return result; }
void _get_all(void) { EGLint num = 0; EGLPLUS_EGLFUNC(GetConfigs)( FriendOf<Display>::GetHandle(_display), nullptr, 0, &num ); EGLPLUS_VERIFY(EGLPLUS_ERROR_INFO(GetConfigs)); if(num) { _configs.resize(num); EGLPLUS_EGLFUNC(GetConfigs)( FriendOf<Display>::GetHandle(_display), _configs.data(), num, &num ); EGLPLUS_VERIFY(EGLPLUS_ERROR_INFO(GetConfigs)); } }
void _choose(const FinishedConfigAttribs& attribs) { EGLint num = 0; EGLPLUS_EGLFUNC(ChooseConfig)( FriendOf<Display>::GetHandle(_display), attribs.Get(), nullptr, 0, &num ); EGLPLUS_VERIFY(EGLPLUS_ERROR_INFO(ChooseConfig)); if(num) { _configs.resize(num); EGLPLUS_EGLFUNC(ChooseConfig)( FriendOf<Display>::GetHandle(_display), attribs.Get(), _configs.data(), num, &num ); EGLPLUS_VERIFY(EGLPLUS_ERROR_INFO(ChooseConfig)); } }
static ::EGLContext _init( const Display& display, const Config& config, ::EGLContext share_context, const EGLint* attribs ) { ::EGLContext result = EGLPLUS_EGLFUNC(CreateContext)( GetEGLHandle(display), GetEGLHandle(config), share_context, attribs ); EGLPLUS_VERIFY_SIMPLE(CreateContext); return result; }
/** * @eglsymbols * @eglfunref{GetDisplay} */ Display(::EGLNativeDisplayType display_id) : _handle(EGLPLUS_EGLFUNC(GetDisplay)(display_id)) { EGLPLUS_CHECK(EGLPLUS_ERROR_INFO(GetDisplay)); }
/** * @eglsymbols * @eglfunref{GetDisplay} * @egldefref{DEFAULT_DISPLAY} */ Display(void) : _handle(EGLPLUS_EGLFUNC(GetDisplay)(EGL_DEFAULT_DISPLAY)) { EGLPLUS_CHECK(EGLPLUS_ERROR_INFO(GetDisplay)); }
/** * @eglsymbols * @eglfunref{QueryAPI} */ inline RenderingAPI QueryAPI(void) { EGLenum result = EGLPLUS_EGLFUNC(QueryAPI)(); EGLPLUS_VERIFY_SIMPLE(QueryAPI); return RenderingAPI(result); }
/** * @eglsymbols * @eglfunref{WaitNative} */ bool WaitNative(EGLint engine) const { EGLBoolean result = EGLPLUS_EGLFUNC(WaitNative)(engine); EGLPLUS_VERIFY_SIMPLE(WaitNative); return result == EGL_TRUE; }
/** * @eglsymbols * @eglfunref{WaitGL} */ bool WaitGL(void) const { EGLBoolean result = EGLPLUS_EGLFUNC(WaitGL)(); EGLPLUS_VERIFY_SIMPLE(WaitGL); return result == EGL_TRUE; }