DirectX. But it's a matter of preference.
Rotating the rectangles is easy in Direct3D.
1. Simply create your 2 tris to form the quad or rectangle.
2. Call D3DXMatrixTranslation() with the appropriate translation factors.
3. Call D3DXMatrixRotationYawPitchRoll() with the appropriate angles.
4. Concatenate rotation matrix and translation matrix (rotate first or your rotation will be relative to your translation - like a plane orbiting the sun).
5. Set transform to world transform.
6. Set the texture for the object.
7. Setup and needed render states.
8. Draw the primtive.
Here is a sample without the class definition and without the actual vertex setups. This code shows how to load the texture and render the object based on its position and rotation angles.
I leave the rest as an exercise for you. This is an example in 3D. But you can use it for 2D as well. Just assign a constant z value greater than 1.0f (prob greater than 10.0f to make sure they are not z clipped) to all your vertexes. You can also look into using the ID3DXSprite interface.
void Object::SetTexture(std::string File)
::MessageBox(0,"Failed to load object texture",0,0);
void Object::Render(D3DXVECTOR3 CameraPos)
//Setup translation matrix
//Setup rotation matrix
//World matrix is concatenation of rotation and translation matrix
//Set Direct3D to use world as transformation matrix for this object
//Set texture for this object
//Draw the textured quad.