1
0
mirror of https://github.com/mpv-player/mpv synced 2025-04-01 14:50:07 +00:00
Commit Graph

2 Commits

Author SHA1 Message Date
wm4
b7ba2e2c57 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.
2015-10-11 14:11:12 +02:00
wang-bin
52de5ea6ad DOCS/client_api_examples: add qt widget + opengl-cb example 2015-10-11 13:58:09 +02:00