Drawing unfilled rectangle shape in c++ openGL

Posted by Bahaa on Stack Overflow See other posts from Stack Overflow or by Bahaa
Published on 2014-06-13T09:17:24Z Indexed on 2014/06/13 9:25 UTC
Read the original article Hit count: 174

Filed under:
|

I want to draw unfilled rectangle shape in openGL using c++ programming language but when I used the glBegin(GL_QUADS) or glBegin(GL_POLYGON), the resulted shape is filled but I want to be unfilled. How I can draw unfilled rectangle.

  void draweRect(void)
{
  glClear(GL_COLOR_BUFFER_BIT);
glColor3f(0.0,0.0,1.0);
glLineWidth(30);
    glBegin(GL_POLYGON);
   glVertex2i(50,90);
   glVertex2i(100,90);
   glVertex2i(100,150);
   glVertex2i(50,150);
glEnd();
 glFlush();   

}

© Stack Overflow or respective owner

Related posts about opengl

Related posts about visual-c++