Yes, that is how it works. By abstracting the graphics API you use, you are removing it from what the programmer needs to worry about. This is similar to the way GDI abstracts the device being written to, such as that the programmer needn't worry about it.
In this sense, your library of functions similar to the one above would be like the HDC. It is the interface of this abstraction.
It would be more difficult then a simple check for API, then calling the appropriate function(s). The two API's (DirectX and OpenGL) are very different, and abstracting them both into a single interface would not be easy, especially if you want to cover most of the functionality.
You would need to more abstraction then simply making universal functions. You would need to create more complex structures.
Say hypothetically that OpenGL required you to call function A, then function B to make something happen, but DX required that you call func B, then func A. To accomodate this, you would need to do something similar to this:
void functionA(...) {
if (OpenGL) {
glFuncA();
} else {
//store parameters
}
}
void functionB(...) {
if (OpenGL) {
glFuncB();
} else {
dxFuncB();
dxFuncA( saved params );
}
}
It is not a very good example, but it demonstrates the principal. Creating an abstraction for to very big and different API's would require much thought, and far more effort then wrapping each function.