It wouldn't require a recode of the engine.

It would need a shell to wrap the game to act as a middle man between dX and opengl