my vertex position depends on user dimension input. suppose to draw a rect, user specify 200 by 100. i tried:
float a= m_dialog.m_length;
float b= m_dialog.m_breath;
glBegin(GL_POLYGON);
glColor3ub(0,40,230);
glVertex2f(0.0f, 0.0f);
glColor3ub(0,40,230);
glVertex2f(0.0f, b);
glColor3ub(0,40,230);
glVertex2f(a, 0.0f);
glColor3ub(0,40,230);
glVertex2f(a, b);
glEnd();
but it din work, is there a way to get around this?



