Skip to content

Tag: opengl-es-2.0

OpenGL ES rotating shape around its center

I tried to rotate rectangle using rotateMatrix, following tutorial on, but when I runned it, the rectangle is rotating around (I think) point 0,0. What do I need to change to make it rotate around it’s center? Answer If you want to rotate around a pivot you have to: Translate the object so that the pivot point is moved