Hello, please tell me how you can extract the matrix with the coordinates of the vertices of the shape after the transformation with the commands glRotate, glTranslate, glScale.
I need to update the vertex matrix using the new coordinates after the transformation (the matrix itself is stored in the object variable).
Added from comment .
//Класс фигуры @interface Square:NSObject { CGFloat vertexData[8]; } @end //View for drawing @implementation OpenGLView -(void)draw{ glClearColor(0.78f, 0.78f, 0.78f, 1.0f); glClear(GL_COLOR_BUFFER_BIT); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glColor4f(1.0, 0.0, 0.0, 1.0); // SQUARE transformations glTranslatef(point.x, point.y, 0.0); glRotatef(squareFigure.rotationAngle, 0, 0, 1); glTranslatef(-point.x, -point.y, 0.0); glVertexPointer (2, GL_FLOAT , 0, [squareFigure getVertexData]); //glEnableClientState (GL_VERTEX_ARRAY); glDrawArrays (GL_TRIANGLE_FAN, 0, 4); glBindRenderbufferOES(GL_RENDERBUFFER_OES, viewRenderbuffer); [context presentRenderbuffer:GL_RENDERBUFFER_OES]; @end