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

Author Topic: Window in tutorial code doesn't close (+ openGL error)  (Read 1871 times)

0 Members and 1 Guest are viewing this topic.

fatess

  • Newbie
  • *
  • Posts: 2
    • View Profile
Window in tutorial code doesn't close (+ openGL error)
« on: April 24, 2021, 02:20:51 pm »
Hi, I'm using ubuntu 20.04 on windows, and I was following the linux tutorial at this link:
https://www.sfml-dev.org/tutorials/2.5/start-linux.php
The problem is: when I try to run the code in that tutorial the window doesn't close if I try to close it unless I remove the "window.display();" function from the code. If I do so, the window is black and I can close it.
Plus, the following text appear as standard output:

Quote
Failed to enable udev monitor, joystick connections and disconnections won't be notified: -22
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 ; sRGB = false
Created: version = 0.0 ; depth bits = 0 ; stencil bits = 0 ; AA level = 0 ; core = false ; debug = false ; sRGB = false
Setting vertical sync failed
sfml-graphics requires support for OpenGL 1.1 or greater
Ensure that hardware acceleration is enabled if available

How can I solve this?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10801
    • View Profile
    • development blog
    • Email
Re: Window in tutorial code doesn't close (+ openGL error)
« Reply #1 on: April 26, 2021, 08:26:43 am »
By "Ubuntu on Windows" do you mean a VM or WSL2?

Your setup isn't configured to use your GPU. Maybe no driver installed. Maybe GPU pass-through not activated.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/