Additional X/OpenGL implementation code.