mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Fixing mac oculus crash
This commit is contained in:
parent
cfb2fd1523
commit
1e47a53603
2 changed files with 9 additions and 0 deletions
|
@ -190,6 +190,14 @@ void OculusLegacyDisplayPlugin::deactivate() {
|
|||
ovr_Shutdown();
|
||||
}
|
||||
|
||||
// DLL based display plugins MUST initialize GLEW inside the DLL code.
|
||||
void OculusLegacyDisplayPlugin::customizeContext() {
|
||||
glewExperimental = true;
|
||||
GLenum err = glewInit();
|
||||
glGetError();
|
||||
WindowOpenGLDisplayPlugin::customizeContext();
|
||||
}
|
||||
|
||||
void OculusLegacyDisplayPlugin::preDisplay() {
|
||||
_window->makeCurrent();
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ public:
|
|||
virtual glm::mat4 getHeadPose() const override;
|
||||
|
||||
protected:
|
||||
virtual void customizeContext() override;
|
||||
virtual void preRender() override;
|
||||
virtual void preDisplay() override;
|
||||
virtual void display(GLuint finalTexture, const glm::uvec2& sceneSize) override;
|
||||
|
|
Loading…
Reference in a new issue