OpenGL Simple Line Drawing Algorithm Application

Hello everyone. This application shows a simple tree drawing using the Bresenham Line Drawing Algorithm. You can follow my Github account for the project's source codes:

Click for Details

Technologies Used
OpenGL

OpenGL is a free graphics application development interface used for drawing both two-dimensional and three-dimensional graphics on screen using advanced hardware support. It is widely supported on many operating systems such as Windows, Linux, MacOS and Solaris.

Bresenham Algorithm

It is a line drawing algorithm developed by American computer engineer Jack Bresenham in the 1960s for IBM for drawing lines on computer screens. It can be used in two or three-dimensional environments. According to this, the coordinates of the starting and ending points determine what path to follow to draw a specific line and is used in calculating the pixels through which this line passes.

Running the Project

To run the project, we need to acquire Visual Studio as the environment. Then there are GLU/GLUT libraries that we need to download and add externally. You can access them from this link. After downloading the file, first we need to copy and paste the .dll extension files in the file to the folder in the C:\Windows\System32 file path.

Then, after starting the project with Visual Studio, we right-click on the project in the section on the right side and enter the Properties section.


On the screen that appears here, we go to the Additional Include Directories option in the General section of the C/C++ option and add the include files separately from within the file directory we downloaded.


Secondly, we go to the Additional Library Directories option in the Linker section and add the lib files separately from within the file directory we downloaded.


After all the addition operations, we can run our project. After pressing the Run button, such an image will appear in the interface that appears.