Implementing Bresenham's algorithm

I m new to OpenGL. I’ve to write a program that draw polygons implementing Bresenham’s algorithm. Can anyone pls share some ideas on getting started? Thanks in advance.

This is not an OpenGL question.

OpenGL draws lines using it’s own internal algorithm.

Bresenham’s algorithm is a software line drawing algorithm that would be used by a program that does it’s own software rendering instead of OpenGL. In addition it would draw only the polygon edges at best.

To implement what you’re talking about using OpenGL you would do software line drawing and then a gldrawpixels to display the image, but OpenGL would be incidental to the task.

Please at least search online for information on this topic, it is probably one of the most common pieces of graphics code available and is in every basic text book on graphics.