Skip to content

Instantly share code, notes, and snippets.

View andu1989anand's full-sized avatar
🎯
Focusing

ananda kumar hn andu1989anand

🎯
Focusing
View GitHub Profile
@nowke
nowke / bresenham.cpp
Last active April 3, 2023 00:49
Bresenham Line Drawing - OpenGL
#include <gl/glut.h>
#include <stdio.h>
int x1, y1, x2, y2;
void myInit() {
glClear(GL_COLOR_BUFFER_BIT);
glClearColor(0.0, 0.0, 0.0, 1.0);
glMatrixMode(GL_PROJECTION);
gluOrtho2D(0, 500, 0, 500);