diff options
author | wm4 <wm4@nowhere> | 2015-10-11 14:11:12 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-10-11 14:11:12 +0200 |
commit | b7ba2e2c578f9b7085adfc50d8db4b84183e8f2b (patch) | |
tree | 6a1278195723faf6c69061a21adac8e37d9f7fbc /sub/sd_srt.c | |
parent | 52de5ea6addb62a89a79689397b055ba8fab1795 (diff) | |
download | mpv-b7ba2e2c578f9b7085adfc50d8db4b84183e8f2b.tar.bz2 mpv-b7ba2e2c578f9b7085adfc50d8db4b84183e8f2b.tar.xz |
DOCS/client_api_examples/qt_opengl: fix uninit
mpv_opengl_cb_uninit_gl() still needs the OpenGL context. It makes calls
to free OpenGL objects. Strictly speaking, this is probably unnecessary,
because the OpenGL context is destroyed afterwards (implicitly freeing
all related objects). But mpv_opengl_cb_uninit_gl() does not require the
destruction of the OpenGL context, and thus has to free resources
manually.
It's also true that OpenGL normally simply ignores API calls (or returns
errors) if no context is set, but doing it properly is cleaner.
That makeCurrent() can be called in the destructor is explicitly allowed
and recommended for freeing GL resources in the Qt docs.
This fixes a mpv error message on exit.
Diffstat (limited to 'sub/sd_srt.c')
0 files changed, 0 insertions, 0 deletions