OpenGL and D3D wrapper


probably this has been asked before, just want to know if anybody have experience with both OpenGL and D3D, how easy/difficult would be to make a wrapper for both ?, I know OpenGL but nothing about D3D, I would appreciate if someone can point out some tutorials/docs on learning D3D, and tips on how to do it.
Basically I want to render primitives and sprites (2D only) with a few blendings (nothing fancy I guess).

Many Thanks.

Wrapper for the basic functionality you mentioned could be written in 2-3 days assuming one knows both DirectX and OpenGL enough and has an idea of how to write such wrapper and what the wrapper’s API would look like.

Main difference is that D3D doesn’t have immediate mode - everything is done using vertex arrays.
Emulating immediate mode in D3D would require a simple functionality - put all data passed in immediate mode into array and call glDrawArray when there’s enough elements (array full) or glEnd is called.

Other differences are mostly related to more advanced functionality.

If you want to learn D3D then simply download DirectX SDK.