From e76f6929e52ff3a9d2159ad15876d9343ad88788 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 9 Apr 2015 19:31:01 +0200 Subject: vo_opengl_cb: deprecate mpv_opengl_cb_render() Its vp parameter made no sense anymore. Introduce a new one. --- DOCS/client_api_examples/qml_direct/main.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'DOCS/client_api_examples/qml_direct/main.cpp') diff --git a/DOCS/client_api_examples/qml_direct/main.cpp b/DOCS/client_api_examples/qml_direct/main.cpp index 93a843dfd0..37c6119707 100644 --- a/DOCS/client_api_examples/qml_direct/main.cpp +++ b/DOCS/client_api_examples/qml_direct/main.cpp @@ -39,15 +39,13 @@ void MpvRenderer::paint() { window->resetOpenGLState(); - // Render to the whole window. - int vp[4] = {0, 0, size.width(), -size.height()}; - // This uses 0 as framebuffer, which indicates that mpv will render directly // to the frontbuffer. Note that mpv will always switch framebuffers // explicitly. Some QWindow setups (such as using QQuickWidget) actually // want you to render into a FBO in the beforeRendering() signal, and this // code won't work there. - mpv_opengl_cb_render(mpv_gl, 0, vp); + // The negation is used for rendering with OpenGL's flipped coordinates. + mpv_opengl_cb_draw(mpv_gl, 0, size.width(), -size.height()); window->resetOpenGLState(); } -- cgit v1.2.3