It sounds like you're running from within a virtual machine. UWSim requires OpenGL and a fairly recent graphics card. You'll need to make sure your Virtual Machine is set up to provide hardware-accelerated access to the graphics card. Not all VM environments support this. See the discussion here for more details. If you're using VirtualBox, see these instructions for how to configure Hardware Accelerated Graphics.
Similar errors are often produced when trying to run rviz from a remote X-server or in a Virtual Machine, if the 3D graphics aren't set up correctly.
You can try using glxinfo
or glxgears
to test and see if your 3D environment is working correctly.