SFML community forums

Help => General => Topic started by: physicskush on January 08, 2022, 03:52:24 am

Title: WSL 2 OpenGL context error causing visual tearing
Post by: physicskush 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
 


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 ?
Title: Re: WSL 2 OpenGL context error causing visual tearing
Post by: eXpl0it3r 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.