add d3d and opengl macros