void GSWndWGL::DetachContext() { if (IsContextAttached()) { wglMakeCurrent(NULL, NULL); m_ctx_attached = false; } }
void GSWndWGL::AttachContext() { if (!IsContextAttached()) { wglMakeCurrent(m_NativeDisplay, m_context); m_ctx_attached = true; } }
void GSWndOGL::DetachContext() { if (IsContextAttached()) { //fprintf(stderr, "Detach the context\n"); glXMakeCurrent(m_NativeDisplay, None, NULL); m_ctx_attached = false; } }
void GSWndOGL::AttachContext() { if (!IsContextAttached()) { //fprintf(stderr, "Attach the context\n"); glXMakeCurrent(m_NativeDisplay, m_NativeWindow, m_context); m_ctx_attached = true; } }
void GSWndEGL::DetachContext() { if (IsContextAttached()) { //fprintf(stderr, "Detach the context\n"); eglMakeCurrent(m_eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); m_ctx_attached = false; } }
void GSWndEGL::AttachContext() { if (!IsContextAttached()) { // The setting of the API is local to a thread. This function // can be called from 2 threads. eglBindAPI(EGL_OPENGL_API); //fprintf(stderr, "Attach the context\n"); eglMakeCurrent(m_eglDisplay, m_eglSurface, m_eglSurface, m_eglContext); m_ctx_attached = true; } }