qmlfrontend/engine_instance.cpp
changeset 14315 21be7838a127
parent 14311 92e5682810d4
child 14319 00b56ec8b7df
--- a/qmlfrontend/engine_instance.cpp	Sun Nov 25 05:52:06 2018 +0300
+++ b/qmlfrontend/engine_instance.cpp	Sun Nov 25 22:32:49 2018 +0100
@@ -1,5 +1,7 @@
 #include "engine_instance.h"
 
+extern "C" void (*getProcAddress())(const char* fn) { return nullptr; }
+
 EngineInstance::EngineInstance(QObject* parent)
     : QObject(parent), m_instance(Engine::start_engine()) {}
 
@@ -16,7 +18,9 @@
 
 void EngineInstance::renderFrame() {}
 
-void EngineInstance::setOpenGLContext(QOpenGLContext* context) {}
+void EngineInstance::setOpenGLContext(QOpenGLContext* context) {
+  Engine::setup_current_gl_context(m_instance, 0, 0, &getProcAddress);
+}
 
 Engine::PreviewInfo EngineInstance::generatePreview() {
   Engine::PreviewInfo pinfo;