Is it possible to use the 2D and 3D API in the same window?

I am planning to develop a game with some weird features on the graphics side. Basically, I need to be able to render the shadows (just the shadows) of a set of 3d objects on top of a 2d canvas. I haven’t found any way to do this in any game engine. The only thing that comes to my mind is to use raw OpenGL. The problem with that is that the process of developing a game, even if it is really simple, with raw OpenGL can be a bit too slow and tiring.
I have seen that heaps has a 2d and a 3d API. My question is: Do you know if it is possible to draw a 3d scene on top of a 2d scene with I guess that by using shaders I should be able to make all the 3d blocks transparent so it would look like the shadows have been cast by the 2d drawing.
Thank you. Any help is appreciated.