Texturemapping problem is in x/y rotation.  I have disabled x/y rotation for the sample code to watch the texturemapped triangle rotate around the +z axis.