are you mixing OpenGL with d3d? O_O that's not valid unless you have different windows. 1 window with GL and 1 window with DX.
OpenGL call fails because there is no valid active GL context (because you have d3d context).
In your case having DX / GL calls wrapped by some other library does not magically remove that low-level issue such as the one of active graphics context. You can't forget about everything about hardware and other APIs.