How can I use glTranslatef in openGL C++
<p>I tried to make a simple program that user can move the polygon by mouse drag. but it won't work at all at "translatef"..
How can fix this problem?
My source code is here.</p>

<pre><code>void dragMouse(GLint x, GLint y) {

    x = setX(x);
    y = setY(y);
    glMatrixMode(GL_PROJECTION);

    if (mouseMode == 2) {   
        printf("드래그로 도형을 옮깁니다.\n");
        glPushMatrix();
        glTranslatef((mouseX - x), (mouse - y), 0.0);
        glutPostRedisplay();
        glPopMatrix();
    }
    else if (mouseMode == 3) {
        angle += -(x - mouseX)*10.0 / 3.14;
        glRotatef(angle, 0.0, 0.0, 1.0);
    }
    else if (mouseMode == 4) {
        scale *= (1.0 + (y - mouseY) / 100.0);
        glScalef(scale, scale, 0.0);
    }
    glutPostRedisplay();
}
</code></pre>