mirror of
https://github.com/overte-org/overte.git
synced 2025-04-14 07:27:04 +02:00
Fix OSX Oculus plugin
This commit is contained in:
parent
db30e9c45f
commit
cb3456195e
1 changed files with 4 additions and 7 deletions
|
@ -9,6 +9,8 @@
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
#include <gl/Config.h>
|
||||||
|
|
||||||
#include <QtCore/QThread.h>
|
#include <QtCore/QThread.h>
|
||||||
#include <QtWidgets/QMainWindow>
|
#include <QtWidgets/QMainWindow>
|
||||||
#include <QtOpenGL/QGLWidget>
|
#include <QtOpenGL/QGLWidget>
|
||||||
|
@ -192,14 +194,9 @@ void OculusLegacyDisplayPlugin::internalDeactivate() {
|
||||||
_container->makeRenderingContextCurrent();
|
_container->makeRenderingContextCurrent();
|
||||||
}
|
}
|
||||||
|
|
||||||
// DLL based display plugins MUST initialize GLEW inside the DLL code.
|
// DLL based display plugins MUST initialize GL inside the DLL code.
|
||||||
void OculusLegacyDisplayPlugin::customizeContext() {
|
void OculusLegacyDisplayPlugin::customizeContext() {
|
||||||
static std::once_flag once;
|
gl::initModuleGl();
|
||||||
std::call_once(once, []{
|
|
||||||
glewExperimental = true;
|
|
||||||
glewInit();
|
|
||||||
glGetError();
|
|
||||||
});
|
|
||||||
_hmdWindow->requestActivate();
|
_hmdWindow->requestActivate();
|
||||||
QThread::msleep(1000);
|
QThread::msleep(1000);
|
||||||
Parent::customizeContext();
|
Parent::customizeContext();
|
||||||
|
|
Loading…
Reference in a new issue