Porting Code between Direct3D9 and OpenGL 2.0