It runs on either D3D or OpenGL, but the Quake/Q2 engines are really optimized for OpenGL, and it runs much better in OpenGL. Any PC new and fast enough to run it in D3D will definitely have OpenGL-capable drivers, so there is very seldom any good reason to use D3D.