static void viewNeedsDisplay(NIXView webView, WKRect, const void*) { glClearColor(0.5f, 0.5f, 0.5f, 1.0f); glClear(GL_COLOR_BUFFER_BIT); NIXViewPaintToCurrentGLContext(webView); eglSwapBuffers(g_state.display, g_state.surface); }
static PyObject* NIXView_paintToCurrentGLContext(PyObject* self) { NIXViewObject* cppSelf = reinterpret_cast<NIXViewObject*>(self); NIXViewPaintToCurrentGLContext(cppSelf->cptr); Py_RETURN_NONE; }
void MiniBrowser::updateDisplay() { if (!m_view || !m_window) return; m_window->makeCurrent(); WKSize size = m_window->size(); glViewport(0, 0, size.width, size.height); glClearColor(0.4, 0.4, 0.4, 1.0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); NIXViewPaintToCurrentGLContext(m_view); if (m_touchMocker) m_touchMocker->paintTouchPoints(size); m_window->swapBuffers(); }