summaryrefslogtreecommitdiffstats
path: root/DOCS/client_api_examples/qt_opengl/mpvwidget.cpp
Commit message (Collapse)AuthorAgeFilesLines
* examples/qt_opengl: Use fbo of the widget and not the thread contextcommander kotori2015-12-031-1/+1
| | | | | | | Sometimes QOpenGLWidget may be redirecting it's output to a framebuffer object rather than the frontbuffer, in which case the current thread's context render fbo is different from the widget's. Use the widget's desired fbo instead.
* DOCS/client_api_examples/qt_opengl: fix uninitwm42015-10-111-0/+1
| | | | | | | | | | | | | | | | | 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.
* DOCS/client_api_examples: add qt widget + opengl-cb examplewang-bin2015-10-111-0/+128