Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not set GLX_SAMPLES when asking for framebuffer options #81

Closed
wants to merge 1 commit into from

Conversation

paulinus
Copy link

@paulinus paulinus commented Feb 5, 2016

Using on virtual machines people are getting the following error:

terminate called after throwing an instance of 'std::runtime_error'
what(): Pangolin X11: Unable to retrieve framebuffer options

see (#74, #80, raulmur/ORB_SLAM2#4 and raulmur/ORB_SLAM2#15)

This PR solves the problem by not setting the GLX_SAMPLES option when asking for framebuffer options as done in this tutorial as it is done in this tutorial. As far as i understand, the GLX_SAMPLE_BUFFERS and GLX_SAMPLES are set later on the same function anyway

@mp3guy
Copy link
Contributor

mp3guy commented Feb 5, 2016

Does using it like this not have the same effect?

https://github.com/mp3guy/ElasticFusion/blob/master/GUI/src/Tools/GUI.h#L44

@stevenlovegrove
Copy link
Owner

The issue with commenting those lines is that they specify the minimum requirements for enumeration. This means that you will end up with the worst framebuffer available. We could instead return the best, but this results in performance issues. You're running into this problem because your display does not support the minimum framebuffer requirements specified by the application (as per Tom's comment). I've been thinking about a fix, and the best option is probably for Pangolin to enumerate all options (as per your PR), but then to select the best option less than or equal to the requested samples. This will then be more forgiving for software renderers etc.

@stevenlovegrove
Copy link
Owner

I've just pushed 45b38c1 which will hopefully address this issue whilst keeping the current behaviour on systems with decent graphics support. Please comment further if that still does not work for anyone.

@paulinus
Copy link
Author

That works great. Thanks @stevenlovegrove and sorry for the dirty PR ;-)

One detail is that i needed to add librt to the link libraries to build the devel branch (https://github.com/stevenlovegrove/Pangolin/compare/devel...paulinus:add-librt?expand=1)

@stevenlovegrove
Copy link
Owner

Thanks for the heads up. I've applied your patch in the conditional that uses librt: e4a79aa. Hope that solves it.

@paulinus
Copy link
Author

perfect, thanks!

@sakurazhu
Copy link

sakurazhu commented May 27, 2016

i met the same problem as above .i have use the method you suggested as "e4a79aa" but it did not work on my computer .
i use ubuntu 14.04 on VMware® Workstation10.0.4 . i do not know how to fix it . Could you give me any help ? @stevenlovegrove
PS : i want to know if there is any relationship with opennni . because when i make Pangolin , there is something wrong with /Pangolin/src/Cmakelist / SO as tipped i delect all the code with openni in Cmakelist , and make Pangolin successfully .

@stevenlovegrove
Copy link
Owner

@sakurazhu To clarify, you see this behaviour in the devel branch? I don't have any concrete suggestions, but you should try playing with the visual_attribs variable here https://github.com/stevenlovegrove/Pangolin/blob/devel/src/display/device/display_x11.cpp#L97 to see if you can find a mode supported by your renderer. I'm not overly familiar with X11, so you may have to do some googling. You could also see if VMware has any options for enabling OpenGL acceleration or something.

@sakurazhu
Copy link

Tthank you for your suggestion. I have solved the problem by changing my dataset's path and the path of asssociation.

2016-05-28

myworldpig

发件人:Steven Lovegrove notifications@github.com
发送时间:2016-05-28 00:22
主题:Re: [stevenlovegrove/Pangolin] Do not set GLX_SAMPLES when asking for framebuffer options (#81)
收件人:"stevenlovegrove/Pangolin"Pangolin@noreply.github.com
抄送:"zhuying"myworldpig@163.com,"Mention"mention@noreply.github.com

@sakurazhu To clarify, you see this behaviour in the devel branch? I don't have any concrete suggestions, but you should try playing with the visual_attribs variable here https://github.com/stevenlovegrove/Pangolin/blob/devel/src/display/device/display_x11.cpp#L97 to see if you can find a mode supported by your renderer. I'm not overly familiar with X11, so you may have to do some googling. You could also see if VMware has any options for enabling OpenGL acceleration or something.

You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@AlexandrGraschenkov
Copy link

I use Parallels Desktop on Mac with installed Ubuntu 14.04. Problem solved after disable 3d acceleration on virtual machine settings. After this works laggy but works.

@Kaju-Bubanja
Copy link

Can you describe how to turn off 3d acceleration? And is this only relevant when running in a virtual machine or could I try to turn of hardware acceleration like here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants