Skip to content

Commit

Permalink
MOD Plogons
Browse files Browse the repository at this point in the history
ADD info on how to make polygons easily
  • Loading branch information
enygmator committed Nov 8, 2021
1 parent 63dc5df commit 7be6b10
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions Sep1_1_Polygons/Sep1_1_Polygons.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,23 +46,27 @@ void display_hexagon_triangle()
glVertex2d(320, 10);
glVertex2i(10, 206);
glVertex2d(620, 206);
glEnd();
//glEnd();

glBegin(GL_TRIANGLES);
/*
* You don't need to specify glBegin multiple times. Just make sure that the number of vertices are a multiple of 3
*/

//glBegin(GL_TRIANGLES);
glColor3f(0.0, 0.0, 255.0);
glVertex2d(620, 206);
glVertex2i(10, 206);
glVertex2d(10, 412);
glEnd();
//glEnd();

glBegin(GL_TRIANGLES);
//glBegin(GL_TRIANGLES);
glColor3f(255.0, 0.0, 0.0);
glVertex2d(620, 412);
glVertex2i(620, 206);
glVertex2d(10, 412);
glEnd();
//glEnd();

glBegin(GL_TRIANGLES);
//glBegin(GL_TRIANGLES);
glColor3f(0.0, 150.0, 150.0);
glVertex2d(320, 630);
glVertex2i(620, 412);
Expand Down

0 comments on commit 7be6b10

Please sign in to comment.