Created
June 28, 2025 08:04
-
-
Save giraphics/9cf889f71cfc795a295966cf0cb0843d to your computer and use it in GitHub Desktop.
OpenGL WSL Setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "π Checking Wayland Display:" | |
echo "$WAYLAND_DISPLAY" | |
echo "π§ Checking NVIDIA GPU status (optional):" | |
nvidia-smi || echo "NVIDIA not detected or not available in WSL" | |
echo "π Updating APT packages..." | |
sudo apt update | |
echo "π¦ Installing OpenGL test utilities..." | |
sudo apt install -y mesa-utils | |
echo "βΆοΈ Testing OpenGL with glxgears (this will open a test window)..." | |
glxgears & sleep 5 && kill $! | |
echo "π§° Installing Homebrew..." | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> ~/.bashrc | |
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" | |
echo "πΊ Verifying brew installation:" | |
brew --version | |
echo "π¦ Installing CMake via brew..." | |
brew install cmake | |
echo "π§ Installing build tools..." | |
sudo apt install -y build-essential pkg-config | |
echo "π¦ Installing OpenGL-related dev libraries..." | |
sudo apt install -y libgl1-mesa-dev libglx-dev libx11-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment