SFML community forums

Help => Graphics => Topic started by: aggsol on July 16, 2016, 01:11:34 pm

Title: OpenGL is not properly detected on Ubuntu 16.04 VM
Post by: aggsol on July 16, 2016, 01:11:34 pm
When I start my SFML application the following message and a white window appear:

Warning: The created OpenGL context does not fully meet the settings that were requested
Requested: version = 1.1 ; depth bits = 0 ; stencil bits = 0 ; AA level = 0 ; core = false ; debug = false
Created: version = 0.0 ; depth bits = 24 ; stencil bits = 8 ; AA level = 0 ; core = false ; debug = false
Setting vertical sync not supported
sfml-graphics requires support for OpenGL 1.1 or greater
Ensure that hardware acceleration is enabled if available
 

but I have following GLX infos:
$ glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
OpenGL vendor string: Humper
OpenGL renderer string: Chromium
OpenGL version string: 2.1 Chromium 1.9
OpenGL shading language version string: 4.50

Even the unity test provides positive info regarding the OpenGL features:

$ /usr/lib/nux/unity_support_test -p
OpenGL vendor string:   Humper
OpenGL renderer string: Chromium
OpenGL version string:  2.1 Chromium 1.9

Not software rendered:    yes
Not blacklisted:          yes
GLX fbconfig:             yes
GLX texture from pixmap:  yes
GL npot or rect textures: yes
GL vertex program:        yes
GL fragment program:      yes
GL vertex buffer object:  yes
GL framebuffer object:    yes
GL version is 1.4+:       yes

Unity 3D supported:       yes
 

Is this a problem in SFML or is my system not configured properly? glxgears is rendering fine though.
Title: Re: OpenGL is not properly detected on Ubuntu 16.04 VM
Post by: eXpl0it3r on July 16, 2016, 01:46:25 pm
Virtual machines are always a bit tricky. Did you enable GPU acceleration in the VM host? Did you install the guest additions? What's GPU driver did you install?
Title: Re: OpenGL is not properly detected on Ubuntu 16.04 VM
Post by: fallahn on July 16, 2016, 03:09:20 pm
This has been a long running problem for me with various linux distros using Virtualbox (ie several years). I've read many other people also have this problem on the Virtualbox forums, so I switched to VMWare player. So far this works for OpenGL upto 2.1 (so SFML works) but fails with any newer versions of OpenGL - for instance when mixing your own code with SFML which requires a version 3+ context.
Title: Re: OpenGL is not properly detected on Ubuntu 16.04 VM
Post by: aggsol on July 18, 2016, 01:19:04 pm
Virtual machines are always a bit tricky. Did you enable GPU acceleration in the VM host? Did you install the guest additions? What's GPU driver did you install?

I am using Virtualboc on a Windows Host, GPU acceleration is enabled, gues additions are installed and I am using the Virtual Box driver that comes with the guest additions.
This has been a long running problem for me with various linux distros using Virtualbox (ie several years). I've read many other people also have this problem on the Virtualbox forums, so I switched to VMWare player. So far this works for OpenGL upto 2.1 (so SFML works) but fails with any newer versions of OpenGL - for instance when mixing your own code with SFML which requires a version 3+ context.

I find that weird while other OpenGL applications detect everything ok and run accelerated exspecially the Unity dektops ind 3D screensaver. On the other hand Unity3D is also not runnable. This is a real bummer.  Maybe I give VMWare player a go then...
Title: Re: OpenGL is not properly detected on Ubuntu 16.04 VM
Post by: binary1248 on July 18, 2016, 05:56:51 pm
"Proper" OpenGL not only has to be available, some software (including SFML) enforce that it is truly hardware accelerated in all the required aspects as well. I always had problems enabling GPU hardware acceleration in VirtualBox, which is why I just leave it disabled. This means that the guest's rendering is done on the CPU, but for whatever reason, this allows the VM to "pretend it has OpenGL" better. SFML and all the other applications end up complaining less if I leave hardware acceleration off in the guest settings. The only downside is that performance isn't that nice, but that is something you should disregard when doing VM testing anyway.
Title: Re: OpenGL is not properly detected on Ubuntu 16.04 VM
Post by: aggsol on July 19, 2016, 10:23:07 am
Okay, I will keep that in mind. I just wanted to test how the app behaves on different desktop resolutions. That is very easily done on a VM.
Title: Re: OpenGL is not properly detected on Ubuntu 16.04 VM
Post by: aggsol on July 20, 2016, 12:55:22 pm
"Proper" OpenGL not only has to be available, some software (including SFML) enforce that it is truly hardware accelerated in all the required aspects as well. I always had problems enabling GPU hardware acceleration in VirtualBox, which is why I just leave it disabled. This means that the guest's rendering is done on the CPU, but for whatever reason, this allows the VM to "pretend it has OpenGL" better. SFML and all the other applications end up complaining less if I leave hardware acceleration off in the guest settings. The only downside is that performance isn't that nice, but that is something you should disregard when doing VM testing anyway.

I can confirm, that disabling 3d acceleration "fixes" the problem