instancedTeapot rotations matrix


I’m trying to add rotations to the instancedTeapot example… following the earthquake example, I switched the teapot’s instanced vec3 with a mat4. So for the mapReplace I use glm::…

        mat4 newMat;
        newMat *= glm::rotate(  rot ,vec3(0,1,0) );
        newMat *= glm::translate( newPos );
        *positions++ = newMat;

And then in the vertex shader…

gl_Position	= ciProjectionMatrix * ciViewMatrix * vInstanceMatrix * ciPosition;

It’s coming out all funky. Not sure what I could be doing wrong. I’m practically copying code.
forgot to update sizeof( mat4 ) in the geom::BufferLayout