e_zoo_din
04-12-2006, 03:53 AM
Hey all,
I'm new to opengl, need ur guys help.. how to color object using flood fill algorithm.... for example.. I've draw a triangle using GL_LINE consist of 3 lines... but how to color it using the algorithm? :(
glColor3f (0.0,1.0,0.0);
glBegin (GL_LINES);
glVertex2i (70,150);
glVertex2i (105,215);
glEnd ();
glColor3f (0.0,1.0,0.0);
glBegin (GL_LINES);
glVertex2i (105,215);
glVertex2i (140,150);
glEnd ();
glColor3f (0.0,1.0,0.0);
glBegin (GL_LINES);
glVertex2i (70,150);
glVertex2i (140,150);
glEnd ();
I'm new to opengl, need ur guys help.. how to color object using flood fill algorithm.... for example.. I've draw a triangle using GL_LINE consist of 3 lines... but how to color it using the algorithm? :(
glColor3f (0.0,1.0,0.0);
glBegin (GL_LINES);
glVertex2i (70,150);
glVertex2i (105,215);
glEnd ();
glColor3f (0.0,1.0,0.0);
glBegin (GL_LINES);
glVertex2i (105,215);
glVertex2i (140,150);
glEnd ();
glColor3f (0.0,1.0,0.0);
glBegin (GL_LINES);
glVertex2i (70,150);
glVertex2i (140,150);
glEnd ();