Tag: Triangle

shape
shape
shape
shape
shape
shape
shape
shape
Standard

OpenGL Base Function (Triangle)

Below is an example of a base program in OpenGL, resulting in a window with a red triangle in the center. [c] #include <stdlib.h> #include <GL/glut.h> //Call Back Function void draw (void) { //Set the background color of the Window glClear Color(1,1,1,0); //Clear Screen glClear (GL_COLOR_BUFFER_BIT); //Define the color of the drawing glColor3i(1,0,0); glBegin(GL_TRIANGLES); //Defines

Latest news

Latest news directly from our blog.