Skip to content

Instantly share code, notes, and snippets.

@RSchneyer
Last active February 10, 2021 19:40
Show Gist options
  • Save RSchneyer/8ae559751f10e92e16399f679acb1097 to your computer and use it in GitHub Desktop.
Save RSchneyer/8ae559751f10e92e16399f679acb1097 to your computer and use it in GitHub Desktop.
Get CPRE 480 OpenGL stuff on WSL

Will update if/when people find more issues and solutions. I take no responsiblity for screwing up your PC.

Getting CPRE 480 OpenGL stuff on WSL (no promises it'll work lol)

Assuming you've got WSL installed and all that, I started here, instal VcXsrc, ubuntu-desktop, and mesa-utils. Follow "therealknec"'s instructions and make sure that glxgears is working.

I did most of this yesterday, so I don't remember the exact steps I did next, but I think I tried to run one of the MP-1 samples (Fractals, Fern, etc), which didn't work. Based off the StackOverflow/AskUbuntu pages I have bookmarked and in my history, I probably installed the following packages:

  • mesa-common-dev
  • libglew-dev and libglew
  • libglfw3 and libglfw3-dev
  • libglm-dev
  • gcc-multilib
  • g++

There might be packages I'm not listing, if you get "can't find header" issue makeing one of the 480 samples, just google it and find the corresponding package. Also, make sure you do source setup.sh and all the stuff in MP-1 2b, and that you set sgpNONE.

Other issues I ran into, and how I (think) I fixed them:

Failed to compile xyzshader
0:1(10): error: GLSL 3.x is not supported. Supported versions are: (supported versions here)

solution: export MESA_GL_VERSION_OVERRIDE=3.0 ES (3.3 had vertex shader issue, 3.0 ES apparently does not. thanks again to Raffael)


/usr/bin/ld: cannot find -lsimpleGLU

solution: cd into SGP/sw, run make


WSL 2 OpenGL fix: https://superuser.com/questions/1476086/error-cant-open-display-0/1476160#1476160

"And I had to put -ac as addtional parameter in xlaunch for vcxsrv" -Raffael


https://askubuntu.com/questions/583171/bin-bash-g-command-not-found-error-127

https://askubuntu.com/questions/91909/trouble-compiling-a-32-bit-binary-on-a-64-bit-machine

https://stackoverflow.com/questions/15852417/compiling-opengl-program-gl-glew-h-missing

https://stackoverflow.com/questions/49693785/fatal-error-glfw3-h-no-such-file-or-directory/51512260

https://askubuntu.com/questions/306703/compile-opengl-program-missing-gl-gl-h

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment