Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: OpenGL is not properly detected on Ubuntu 16.04 VM  (Read 8367 times)

0 Members and 1 Guest are viewing this topic.

aggsol

  • Newbie
  • *
  • Posts: 24
  • C++
    • View Profile
    • My Github Account
OpenGL is not properly detected on Ubuntu 16.04 VM
« 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.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: OpenGL is not properly detected on Ubuntu 16.04 VM
« Reply #1 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?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

fallahn

  • Hero Member
  • *****
  • Posts: 507
  • Buns.
    • View Profile
    • Trederia
Re: OpenGL is not properly detected on Ubuntu 16.04 VM
« Reply #2 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.

aggsol

  • Newbie
  • *
  • Posts: 24
  • C++
    • View Profile
    • My Github Account
Re: OpenGL is not properly detected on Ubuntu 16.04 VM
« Reply #3 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...

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: OpenGL is not properly detected on Ubuntu 16.04 VM
« Reply #4 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.
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

aggsol

  • Newbie
  • *
  • Posts: 24
  • C++
    • View Profile
    • My Github Account
Re: OpenGL is not properly detected on Ubuntu 16.04 VM
« Reply #5 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.

aggsol

  • Newbie
  • *
  • Posts: 24
  • C++
    • View Profile
    • My Github Account
Re: OpenGL is not properly detected on Ubuntu 16.04 VM
« Reply #6 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