Forum Discussion
nuclear
11 years agoExplorer
SDK 0.4.3 linux bugs and issues
First of all, please oculus, set up a bug tracker or a mailing list, or something that will facilitate a direct path of communicated bugs and isuses without going through this forum. I'll post a co...
gaugeboson
11 years agoHonored Guest
Issues I've run into:
1) LibOVR causes a segfault in fglrx/Catalyst (AMD's proprietary driver) by incorrectly passing a GLX_FBCONFIG_ID as a GLXFBConfig to glXGetVisualFromFBConfig. I'm guessing that in nVidia's proprietary driver, GLXFBConfigs happen to just be the ID, but the GLX spec makes it fairly clear that you shouldn't assume that. It seems that in AMD's driver a GLXFBConfig is actually a pointer to a struct so you'll get a segfault when glXGetVisualFromFBConfig tries to dereference it. I don't really have any experience working directly with Xlib/GLX, but I've hacked together a modified implementation of SDKWindow::getVisualFromDrawable that seems to work.
2) With the above change, the OculusWorld demo doesn't crash, but it seems to a crapshoot as to whether the window ends up on the correct display. Even when it's on the correct display it's not rotated to account for the portrait orientation of the Rift's display. I haven't attempted to work around it by rotating the display using xrandr since I fixed the segfault, but oculusd seemed pretty unhappy when I had tried that before and the README suggests it's a bad idea.
My initial attempts at setting up a separate X11 screen for the Rift have failed so I don't know if that would fix the rotation issue.
1) LibOVR causes a segfault in fglrx/Catalyst (AMD's proprietary driver) by incorrectly passing a GLX_FBCONFIG_ID as a GLXFBConfig to glXGetVisualFromFBConfig. I'm guessing that in nVidia's proprietary driver, GLXFBConfigs happen to just be the ID, but the GLX spec makes it fairly clear that you shouldn't assume that. It seems that in AMD's driver a GLXFBConfig is actually a pointer to a struct so you'll get a segfault when glXGetVisualFromFBConfig tries to dereference it. I don't really have any experience working directly with Xlib/GLX, but I've hacked together a modified implementation of SDKWindow::getVisualFromDrawable that seems to work.
bool SDKWindow::getVisualFromDrawable(GLXDrawable drawable, XVisualInfo* vinfoOut)
{
_XDisplay* display = glXGetCurrentDisplay();
unsigned int value;
glXQueryDrawable(display, drawable, GLX_FBCONFIG_ID, &value);
const int attribs[] = {GLX_FBCONFIG_ID, (int)value, None};
int screen;
glXQueryContext(display, glXGetCurrentContext(), GLX_SCREEN, &screen);
int numEls;
GLXFBConfig * config = glXChooseFBConfig(display, screen, attribs, &numEls);
if (numEls)
{
XVisualInfo* chosen = glXGetVisualFromFBConfig(display, *config);
*vinfoOut = *chosen;
XFree(config);
return true;
}
return false;
}
2) With the above change, the OculusWorld demo doesn't crash, but it seems to a crapshoot as to whether the window ends up on the correct display. Even when it's on the correct display it's not rotated to account for the portrait orientation of the Rift's display. I haven't attempted to work around it by rotating the display using xrandr since I fixed the segfault, but oculusd seemed pretty unhappy when I had tried that before and the README suggests it's a bad idea.
My initial attempts at setting up a separate X11 screen for the Rift have failed so I don't know if that would fix the rotation issue.
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
- 1 year ago
- 1 year ago
- 1 month ago
- 2 months ago