Forum Discussion
dmarcos
7 years agoHonored Guest
Looking for GLFW sample code using latest SDK (1.35)
All samples I found online are old.
I'm getting an `ovrError_MismatchedAdapters` error when calling `ovr_CreateTextureSwapChainGL`
I'm missing something. ovr_Create returns an adapter id but not sure how to pass it to gltfw or check if it's the one currently selected.
Thanks everybody,
Diego.
2 Replies
- volgaksoyExpert ProtegeOpenGL has an inherent limitation where you cannot explicitly specify in the API which GPU to use. Instead, the GPU used will happen to default to display the desktop window is being created on. The ovr_Create API will return a LUID that you can use to figure out which GPU to use and then generate the desktop window on that GPU making sure they're the same. This of course assumes you have a display attached to that GPU which isn't always the case with a dual GPU setup. See the following suggestion to work around that.
If you are using a laptop which uses NVidia's Optimus where the main laptop display is hooked up to the Intel GPU while HDMI port the HMD is connected on uses the discrete NVidia GPU, then you will have to override the default GPU using the NVidia control panel's "Manage 3D settings". This can be tweaked under the "OpenGL rendering GPU" field. This will force your application to use the NVidia GPU even though you have created the window on the Intel-GPU-connected display. In the NVidia control panel you can also create an app profile to make sure only your app is using this override scheme. - dmarcosHonored GuestThanks for the answer. In addition to manual configuration on the NVidia control panel one can also define a symbol that forces the driver to use the discrete GPU in a computer with NVidia optimus.
extern "C" {
}_declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
For future learners I wrote some glfw / Oculus SDK (1.35) sample code: https://github.com/dmarcos/oculusglfw
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 3 months ago
- 3 years ago