glVertex3f doesn't work

Hello,
I need help. This is my function and it should draw lines. Unfortunately it does not work. Only a white window appears. Where could be the problem?

void draw(HDC hDC)
{
    glLoadIdentity();
    glRotatef(-KAT,0,1,0);
    glTranslatef(PX,PY,PZ);
    glClearColor(1,1,1,1);
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
    glPolygonMode(GL_FRONT_AND_BACK,GL_LINE);
    glColor3f(0,0,0);
    glBegin(GL_QUADS);

    for(int x=0; x<ROZ_X-1;x++)
        for(int y=0; y<ROZ_Y-1; y++)
    {
        glVertex3f(x, 0, y);
        glVertex3f(x, 0, y+1);
        glVertex3f(x+1, 0, y+1);
        glVertex3f(x+1,0, y);
    }
    glEnd();
    SwapBuffers(hDC);
}

what’s your matrixmode? modelview, projection? Are you using 2.1?