[vlc-commits] doc: libvlc: get the OpenGL functions properly
Steve Lhomme
git at videolan.org
Wed Feb 12 16:49:37 CET 2020
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Feb 11 15:21:08 2020 +0100| [6f381abda935468bc660d7c8fa16a1a87873f73e] | committer: Steve Lhomme
doc: libvlc: get the OpenGL functions properly
The context has its own functions we already access.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6f381abda935468bc660d7c8fa16a1a87873f73e
---
doc/libvlc/QtGL/qtvlcwidget.cpp | 5 ++---
doc/libvlc/QtGL/qtvlcwidget.h | 3 +--
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/doc/libvlc/QtGL/qtvlcwidget.cpp b/doc/libvlc/QtGL/qtvlcwidget.cpp
index 46b9034f78..ef712390cc 100644
--- a/doc/libvlc/QtGL/qtvlcwidget.cpp
+++ b/doc/libvlc/QtGL/qtvlcwidget.cpp
@@ -3,6 +3,7 @@
#include <QOpenGLShaderProgram>
#include <QCoreApplication>
#include <QOpenGLFramebufferObject>
+#include <QOpenGLFunctions>
#include <QThread>
#include <cmath>
@@ -41,7 +42,7 @@ public:
static bool resizeRenderTextures(void* data, const libvlc_video_render_cfg_t *cfg,
libvlc_video_output_cfg_t *render_cfg)
{
- VLCVideo* that = static_cast<VLCVideo*>(data);
+ VLCVideo* that = static_cast<VLCVideo*>(data);
if (cfg->width != that->m_width || cfg->height != that->m_height)
cleanup(data);
@@ -264,8 +265,6 @@ void QtVLCWidget::initializeGL()
// can recreate all resources.
connect(context(), &QOpenGLContext::aboutToBeDestroyed, this, &QtVLCWidget::cleanup);
- initializeOpenGLFunctions();
-
vertexBuffer.create();
vertexBuffer.bind();
vertexBuffer.allocate(g_vertex_buffer_data, sizeof(g_vertex_buffer_data));
diff --git a/doc/libvlc/QtGL/qtvlcwidget.h b/doc/libvlc/QtGL/qtvlcwidget.h
index 01cc9868a8..a52026c003 100644
--- a/doc/libvlc/QtGL/qtvlcwidget.h
+++ b/doc/libvlc/QtGL/qtvlcwidget.h
@@ -2,13 +2,12 @@
#define GLWIDGET_H
#include <QOpenGLWidget>
-#include <QOpenGLFunctions>
#include <QOpenGLVertexArrayObject>
#include <QOpenGLBuffer>
QT_FORWARD_DECLARE_CLASS(QOpenGLShaderProgram)
-class QtVLCWidget : public QOpenGLWidget, protected QOpenGLFunctions
+class QtVLCWidget : public QOpenGLWidget
{
Q_OBJECT
More information about the vlc-commits
mailing list