Closed Nahel9 closed 1 year ago
// // main.cpp // hello OpenGL // // Created by Naah on 14/06/1444 AH. //
void display(){
glClearColor(1, 1, 1, 1); glClear(GL_COLOR_BUFFER_BIT); glColor3f(0, 0, 1); glLineWidth(5);
glBegin(GL_LINE_LOOP); glVertex2f(50, 50); glVertex2f(140, 50); glVertex2f(140, 140); glVertex2f(50, 140);
glEnd(); glFlush(); } int main(int argc, char** argv){
glutInit(&argc, argv); glutInitWindowPosition(100, 100); glutInitWindowSize(600, 600); glutCreateWindow("SQUARE"); gluOrtho2D(0, 200, 0, 200); glutDisplayFunc(display); glutMainLoop(); return 0; }
Please help meeeeeeee
Please stop spamming. Github is not made for this.
// // main.cpp // hello OpenGL // // Created by Naah on 14/06/1444 AH. //
include<GL/glut.h>
void display(){
glClearColor(1, 1, 1, 1); glClear(GL_COLOR_BUFFER_BIT); glColor3f(0, 0, 1); glLineWidth(5);
glBegin(GL_LINE_LOOP); glVertex2f(50, 50); glVertex2f(140, 50); glVertex2f(140, 140); glVertex2f(50, 140);
glEnd(); glFlush(); } int main(int argc, char** argv){
glutInit(&argc, argv); glutInitWindowPosition(100, 100); glutInitWindowSize(600, 600); glutCreateWindow("SQUARE"); gluOrtho2D(0, 200, 0, 200); glutDisplayFunc(display); glutMainLoop(); return 0; }