For programming C++ in Linux...well...
Most of the programming I know comes from googling for HOWTOs or from reading man pages. For X11 programming, I'd advise you to learn to program for a widget set--learn to code for Motif, gtk, qt, or the like. Motif is old and clunky, but ubiquitous; gtk is newer and nicer looking (especially with non-default themes) but not quite as ubiquitous; and qt is rather elegant and feature rich (but designed primarily for C++, not C).
As for OpenGL programming...how different it is between Windows and Linux depends on how low-level you get with it. If you are in the habit of using GLU and the glut for handling things like window initialization and management, your code should be fairly portable. If you're in the habit of going behind OpenGL and using O/S-specific means to initialize windows and handle input devices...expect to do a lot of code re-working.
As for Mesa, Mesa is really the definitive OpenGL library for Linux (and several other *NIX variants). It's not 100% OpenGL-compatible and doesn't claim to be, but it is so close that you can generally compile and run OpenGL code under Mesa with little or no reworking.
As XFree86 has been developed with more acceleration capabilities, Mesa has become integrated with XFree86 (except for the GLUT). This enables efficient hardware acceleration of OpenGL on certain supported hardware (such as ATI Rage128/Radeon, MGA, and nVidia accelerators).
Kelledin
"/join #hackerz. See the Web. DoS interesting people."