@V!OLADOR Funcionou, depois só precisei aplicar o scaling para que o polígono vermelho ficasse do tamanho do polígono azul. Obrigada!
void display() {
glClear(GL_COLOR_BUFFER_BIT);
glLineWidth(2.0);
// Desenhar polígono vermelho
glPushMatrix(); // Salva a matriz atual na pilha
glTranslatef(4.0, 4.0, 0.0); // Translada para a posição final desejada
glRotatef(45.0, 0.0, 0.0, 1.0); // Rotaciona o sistema de coordenadas em 45 graus no eixo z
glScalef(1.4, 1.4, 1.4); // Escala para o mesmo tamanho do polígono azul;
glTranslatef(-4.0, -4.0, 0.0); // Translada para a origem (0, 0)
glBegin(GL_LINES);
glColor3f(1.0, 0.0, 0.0);
glVertex2f(3.0, 4.0);
glVertex2f(4.0, 5.0);
glVertex2f(4.0, 5.0);
glVertex2f(5.0, 4.0);
glVertex2f(5.0, 4.0);
glVertex2f(4.0, 3.0);
glVertex2f(4.0, 3.0);
glVertex2f(3.0, 4.0);
glEnd();
glPopMatrix(); // Restaura a matriz anterior da pilha
// Desenhar polígono azul
glBegin(GL_LINES);
glColor3f(0.0, 0.0, 1.0);
glVertex2f(3.0, 5.0);
glVertex2f(5.0, 5.0);
glVertex2f(5.0, 5.0);
glVertex2f(5.0, 3.0);
glVertex2f(5.0, 3.0);
glVertex2f(3.0, 3.0);
glVertex2f(3.0, 3.0);
glVertex2f(3.0, 5.0);
glEnd();
glFlush();
}