2D Paint program

Hello,

I am very new to opengl and I am supposed to develop a 2D paint program. Is there a way to draw a shape, rectangle for example, and have it not filled, just the outline?

Thanks

Use GL_LINE_STRIP, GL_LINE_LOOP or GL_LINES as the mode parameter to glBegin, glDrawElements, etc to draw lines rather than filled polygons.