How do you install OpenGL/X11/GLX development environment on Ubuntu 18.04.2 LTS?

I had a working development environment for OpenGL, X11 and GLX on my Ubuntu 16.04 machine. I decided to set up a new machine with Ubuntu 18.04.2 LTS. After installing the OS, I installed the nvidia-390 proprietary drivers (using sudo ubuntu-drivers autoinstall). NVIDIA X Server Settings dialog shows driver version 390.116. X Server Information shows version 1.20.1 (NV_CONTROL Version 1.29). Trying to compile my code, I get errors that GLX/glx.h is not found. Sorry if this is a newbie question: How do you install the NVIDIA OpenGL/X11/GLX development environment on Ubuntu 18.04? Thanks for any help.

Just install the -dev packages

sudo apt-get install mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev

and maybe more, depending on what you link to.

I thought that mesa is a software implementation of OpenGL. On my Ubuntu 16.04 machine with NVIDIA driver and OpenGL/GLX development environment, glxinfo shows that points to /usr/lib/nvidia-384/ and points to /usr/lib/nvidia-384/ (and other related libraries). I would expect that installing the development environment from NVIDIA would cause these links to be created, replacing any that point to the mesa libraries.

Well, I tried what you said and I get the hardware acceleration. My misconception has been that any MESA stuff installed changes you back to software rendering. Thank you!