Does Quake 1 use the opengl api? If it does, ogl would take care of everything.... But i guess being the first 3d game it didn't...
But at any rate you can use opengl for your game and it will take care of all of your problems... If there is a dos api... sorry ive only used it with win, never looked into a dos version. Maybe there is a port (from win to dos for opengl) on sourceforge....