I could be wrong, since I'm not that much into 3D programming and all I did was OpenGL, but don't you rotate the world and then draw the scene with the new viewpoint so the triangle appears to be rotating...

So if this is true then you would do something like this (pseudo):
1. RotateWorld X
2. DrawTriangle 1
3. RotateWorld Y
4. DrawTriangle 2

Hope this helps a bit...