Rotate an image and get back to its original position - opengles glkit
- by Manoj
I need to rotate an image in opengles GLkit and get it back to its original position in GLkit.
rotation += 5;
_modelViewMatrix = GLKMatrix4Rotate( _modelViewMatrix, GLKMathDegreesToRadians(5), 1, 0, 0);
_modelViewMatrix = GLKMatrix4Rotate( _modelViewMatrix, GLKMathDegreesToRadians(rotation), 1,0,0);
I need to move it in x axis for certain amount and getting back to its original position from where it started. How should i do it?