Ejemplo n.º 1
0
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);
}
Ejemplo n.º 2
0
static PyObject* NIXView_paintToCurrentGLContext(PyObject* self)
{
    NIXViewObject* cppSelf = reinterpret_cast<NIXViewObject*>(self);

    NIXViewPaintToCurrentGLContext(cppSelf->cptr);

    Py_RETURN_NONE;
}
Ejemplo n.º 3
0
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();
}