Cinder with WSL2 on Windows 11 - wow

Wow, I’m pretty impressed… I upgraded a machine to Windows 11 this week. One thing I was keen to try was the new Windows Subsystem for Linux support for GUI programs. And of course I wanted to try it with Cinder…

I upgraded to the latest WSL (wsl --upgrade and then wsl --shutdown in an administrator PowerShell, once running Windows 11) and tested with an Ubuntu 20.04 distribution. I was able to build Cinder and various apps in the sample directory using the usual instructions here.

(One minor change from those instructions, in my CMake build line for Cinder I also added the OpenGL preference, so I actually used this: cmake .. -DOpenGL_GL_PREFERENCE=GLVND -DCMAKE_BUILD_TYPE=Release)

The whole thing was a fast and painless experience, and I was pleasantly surprised that the apps (e.g. opengl-SuperformulaGPU) ran quickly. I haven’t done any benchmarking compared to the native Windows versions yet, but they definitely seem to be using graphical acceleration on my machine.

Just wanted to share my appreciation with this! :+1: For someone who mostly works in Windows, this makes cross-platform development really easy, and I can easily build and test with GCC or Clang compilers.

(I’m sure there are plenty of limitations (e.g. I didn’t manage to get an audio sample playing so far), but it’s impressive that at least some graphical apps seem to work!)

1 Like

One limitation I’ve found with WSL is that the OpenGL version supported currently seems to max out at 3.3, so you can’t run things using more advanced features or shaders (not that I’ve found, though I’ve not tried any advanced workarounds).

Another really nice thing is that you can install VS Code (on Windows), then install the “Remote - WSL” extension and then edit, build, run and debug your Cinder projects inside Linux. Once you’ve set up the remote VS extension, you can just cd to whatever directory has your CMakeLists.txt file in a WSL Linux shell, then run code . from there, and it will open VS Code (as a Windows app talking to Linux) and build/run/debug Cinder or your project. It’s pretty slick.