In terms of API level I'd recommend you abstract high rather than for low level functions. In terms of 3D API's it's really only DirectX + OpenGL to choose from right now but you can't garuntee that all future versions of those API's will match previous versions on a fundamental basic level of operation. The changes we see between OpenGL1/2 and 3+, droppping of immediate mode etc are evidence that if you're abstracting an API to be future proof, you want to go as high as possible.

Also ask yourself if you really want to support DirectX at all with Freepascal/Delphi. We're unlikely to see Xbox support any time soon and OpenGL exists on the windows platform too, so you get a fully capable 3D API on all operating systems you can potentially target with your language.

Designing a structure/Abstracting between different versions of OpenGL is far simpler than between DirectX/OpenGL as there's enough stuff that's pretty much the same across all of GL/GLES to make it so.

if you want to target android/ios and desktops then you'll need some form of abstraction between GL/GLES differences.


--

If you are going DirectX + OpenGL then the question of shaders, either an XML file or just a file naming convention to store both HLSL and GLSL shaders is the best approach. The abstracted shader language of the ogre engine is a really nice thing but it took a long time to create, it's very complex and very hard to produce optimal shaders generically.

Best keep things simple. So your users will have to write a GLSL and a HLSL shader, no big deal. Other than a few keywords/functions and the general structure, you can reuse pretty much all of your shader code. They'd have to learn a meta-language if you created one anyway, save yourself tons of work and let them spend another 30 minutes writing shaders.