summaryrefslogtreecommitdiffstats
path: root/DOCS
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-04-09 19:31:01 +0200
committerwm4 <wm4@nowhere>2015-04-09 19:31:01 +0200
commite76f6929e52ff3a9d2159ad15876d9343ad88788 (patch)
treee2b9767492006aeedf40f66255a40c444241b98b /DOCS
parent8dc7156bc0271965ea1e6768cfc7bbe67cef1876 (diff)
downloadmpv-e76f6929e52ff3a9d2159ad15876d9343ad88788.tar.bz2
mpv-e76f6929e52ff3a9d2159ad15876d9343ad88788.tar.xz
vo_opengl_cb: deprecate mpv_opengl_cb_render()
Its vp parameter made no sense anymore. Introduce a new one.
Diffstat (limited to 'DOCS')
-rw-r--r--DOCS/client-api-changes.rst1
-rw-r--r--DOCS/client_api_examples/qml/main.cpp3
-rw-r--r--DOCS/client_api_examples/qml_direct/main.cpp6
3 files changed, 4 insertions, 6 deletions
diff --git a/DOCS/client-api-changes.rst b/DOCS/client-api-changes.rst
index 594cd42968..62640889b6 100644
--- a/DOCS/client-api-changes.rst
+++ b/DOCS/client-api-changes.rst
@@ -27,6 +27,7 @@ API changes
--- mpv 0.9.0 will be released ---
1.16 - add mpv_opengl_cb_report_flip()
+ - introduce mpv_opengl_cb_draw() and deprecate mpv_opengl_cb_render()
1.15 - mpv_initialize() will now load config files. This requires setting
the "config" and "config-dir" options. In particular, it will load
mpv.conf.
diff --git a/DOCS/client_api_examples/qml/main.cpp b/DOCS/client_api_examples/qml/main.cpp
index 69552e982c..2122cd8c5c 100644
--- a/DOCS/client_api_examples/qml/main.cpp
+++ b/DOCS/client_api_examples/qml/main.cpp
@@ -46,9 +46,8 @@ public:
void render()
{
QOpenGLFramebufferObject *fbo = framebufferObject();
- int vp[4] = {0, 0, fbo->width(), fbo->height()};
window->resetOpenGLState();
- mpv_opengl_cb_render(mpv_gl, fbo->handle(), vp);
+ mpv_opengl_cb_draw(mpv_gl, fbo->handle(), fbo->width(), fbo->height());
window->resetOpenGLState();
}
};
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();
}