问题
Oculus PC SDK Version: 0.6.0.1
Windows Visual Studios 2010
I'm trying to adapt an existing OpenGL application for the Oculus DK2. What I have currently working and tested:
- Oculus SDK Sample: OculusRoomTiny(GL)
- OpenGL application composed of Rendering Library that depends on GLEW and simple front-end to handle context, inputs, and window that relies on GLUT.
I'm currently trying to build a new project that replaces the OculusRoomTiny rendering code with my Rendering Library. There is now a conflict between the glew header(glew.h) and a header within the Oculus SDK(CAPI_GLE_GL.h). Whichever header I include first, I'll get an error from the other when it gets included later on:
- LONG_PATH_TO\glew.h(84): fatal error C1189: #error : gl.h included before glew.h
- LONG_PATH_TO\ovr_sdk_win_0.6.0.1\oculussdk\libovrkernel\src\gl\CAPI_GLE_GL.h(55): fatal error C1189: #error : gl.h should be included after this, not before.
Also, in the comments of "CAPI_GLE.h", that includes "CAPI_GLE_GL.h"
// This file provides functionality similar to a reduced version of GLEW, plus some
// additional functionality that's useful to us, such as function hooking.
This leads me to believe that the Oculus SDK libraries and GLEW are incompatible, but I have found no source to confirm it. I have found code samples that use GLEW and the Oculus SDK that seem to counter this reasoning, but they only use previous version of the SDK(0.3/0.4) before the Direct HMD Access display mode was added.
- Are GLEW and the Oculus SDK 0.6.0.1 incompatible?
- Why are they incompatible / Why does the Oculus SDK supply their own "version" of GLEW?
来源:https://stackoverflow.com/questions/31686884/oculus-libovr-and-glew-header-conflicts