vlc | branch: master | Alexandre Janniaux <[email protected]> | Mon Nov 9 18:01:56 2020 +0100| [2fee55a31903d401b1d96acaf39113a358ad1566] | committer: Alexandre Janniaux
doc: QtGl: add details on GetProcAddress impl > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2fee55a31903d401b1d96acaf39113a358ad1566 --- doc/libvlc/QtGL/qtvlcwidget.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/libvlc/QtGL/qtvlcwidget.cpp b/doc/libvlc/QtGL/qtvlcwidget.cpp index e33f6a6c08..134ad06601 100644 --- a/doc/libvlc/QtGL/qtvlcwidget.cpp +++ b/doc/libvlc/QtGL/qtvlcwidget.cpp @@ -153,6 +153,14 @@ public: static void* get_proc_address(void* data, const char* current) { VLCVideo* that = static_cast<VLCVideo*>(data); + /* Qt usual expects core symbols to be queryable, even though it's not + * mentioned in the API. Cf QPlatformOpenGLContext::getProcAddress. + * Thus, we don't need to wrap the function symbols here, but it might + * fail to work (not crash though) on exotic platforms since Qt doesn't + * commit to this behaviour. A way to handle this in a more stable way + * would be to store the mContext->functions() table in a thread local + * variable, and wrap every call to OpenGL in a function using this + * thread local state to call the correct variant. */ return reinterpret_cast<void*>(that->mContext->getProcAddress(current)); } _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
