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

Author Topic: WSL 2 OpenGL context error causing visual tearing  (Read 3271 times)

0 Members and 1 Guest are viewing this topic.

physicskush

  • Newbie
  • *
  • Posts: 6
    • View Profile
WSL 2 OpenGL context error causing visual tearing
« on: January 08, 2022, 03:52:24 am »
When running my executable I get the following Warning :

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
OpenGL extension SGIS_texture_edge_clamp unavailable
Artifacts may occur along texture edges
Ensure that hardware acceleration is enabled if available
 

  • I am running WSL 2 Ubuntu subsystem in VsCode
  • My SFML version is 2.5.1+dfsg-1build1.
  • I am running an integrated GPU Intel UHD 620.
  • My OpenGL version is 4.6.0

This effectively creates unbearable visual lag in my application. The application works correctly and is fluid on my friend's machine (mac), where he does not get the aforementioned warning.

I have tried to enable hardware acceleration, but that option is not available for my machine, it seems. I looked at posts on this forum with similar issue but they weren't of help.

What options do I have?  Can anyone help ?
« Last Edit: January 08, 2022, 06:34:30 am by physicskush »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: WSL 2 OpenGL context error causing visual tearing
« Reply #1 on: January 08, 2022, 11:44:46 am »
The most obvious option would be to build natively on Windows ;)

For Windows 11, there seems to be some better GUI support for WSL2, not sure if the linked drivers can be also used on Windows 10 already: https://docs.microsoft.com/en-us/windows/wsl/tutorials/gui-apps

WSLg should already work with Windows 10 and might give you some GPU acceleration as well: https://devblogs.microsoft.com/commandline/the-initial-preview-of-gui-app-support-is-now-available-for-the-windows-subsystem-for-linux-2/

In the end WSL2 isn't really ready for GUI stuff, so anything you do with it in that regards, will require you spending some time figuring things out with other tutorials.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/