The main problem is that OpenCV doesn't support transparency in images, which is what you need to accomplish that task in an easy way.
So, one way to do it is to write a custom function/method to iterate over the rotated (source) image copying the pixels to the destination image, while ignoring the background pixels (a specific shade of gray, for instance). This approach is very limited, though.
EDIT:
OpenGL can certainly do the job, but it brings a complexity that you probably don't want on your hands right know. Fortunately there are other alternatives like ImakeMagick, which provides a C++ API through ImageMagick++ and it can certainly handle transparent images. Take a look at A Gentle Introduction to Magick++.