h
This commit is contained in:
parent
eca87bfcfd
commit
b794a741aa
|
@ -36,12 +36,6 @@ on_mpv_redraw(void* ctx)
|
|||
reinterpret_cast<MPVBackend*>(ctx), "update", Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
class MpvRenderer : public QQuickFramebufferObject::Renderer
|
||||
{
|
||||
MPVBackend* obj;
|
||||
|
||||
static void*
|
||||
get_proc_address_mpv(void* ctx, const char* name)
|
||||
{
|
||||
|
@ -51,11 +45,15 @@ get_proc_address_mpv(void* ctx, const char* name)
|
|||
std::cerr << "No GLCTX :(" << std::endl;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
return reinterpret_cast<void*>(glctx->getProcAddress(QByteArray(name)));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
class MpvRenderer : public QQuickFramebufferObject::Renderer
|
||||
{
|
||||
MPVBackend* obj;
|
||||
|
||||
public:
|
||||
MpvRenderer(MPVBackend* new_obj)
|
||||
: obj{ new_obj }
|
||||
|
@ -70,7 +68,6 @@ public:
|
|||
{
|
||||
// init mpv_gl:
|
||||
if (!obj->mpv_gl) {
|
||||
QOpenGLContext* glctx = QOpenGLContext::currentContext();
|
||||
mpv_opengl_init_params gl_init_params{ get_proc_address_mpv,
|
||||
nullptr,
|
||||
nullptr };
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
#include "src/enums.hpp"
|
||||
#include "src/utils.hpp"
|
||||
|
||||
class MpvRenderer;
|
||||
|
||||
class MPVBackend
|
||||
: public QQuickFramebufferObject
|
||||
, public BackendInterface
|
||||
|
|
Loading…
Reference in a new issue