raytracer/Main.cpp
void display()
{  // Display function will draw the image.
    glClearColor( 0, 0, 0, 1 );  // (In fact, this is the default.)
    glClear( GL_COLOR_BUFFER_BIT );
    
    glBegin(GL_TRIANGLES);
    glColor3f( 1, 0, 0 ); // red
    glVertex2f( -0.8, -0.8 );
    glColor3f( 0, 1, 0 ); // green
    glVertex2f( 0.8, -0.8 );
    glColor3f( 0, 0, 1 ); // blue
    glVertex2f( 0, 0.9 );
    glEnd(); 
    
    glutSwapBuffers(); // Required to copy color buffer onto the screen.
}
// Fullscreen Flag Set To Fullscreen Mode By Default
Fullscreen Flag Set To Fullscreen Mode By Default
Fullscreen Flag Set To Fullscreen Mode By Default
void display()
{  
    glClearColor( 0, 0, 0, 1 );  
    glClear( GL_COLOR_BUFFER_BIT );
    glBegin(GL_TRIANGLES);
    glColor3f( 1, 0, 0 ); 
    glVertex2f( -0.8, -0.8 );
    glColor3f( 0, 1, 0 ); 
    glVertex2f( 0.8, -0.8 );
    glColor3f( 0, 0, 1 ); 
    glVertex2f( 0, 0.9 );
    glEnd(); 
    glutSwapBuffers(); 
}
void display ( ) { glClearColor ( 0 , 0 , 0 , 1 ) ; glClear ( GL_COLOR_BUFFER_BIT ) ; glBegin ( GL_TRIANGLES ) ; glColor3f ( 1 , 0 , 0 ) ; glVertex2f ( -0.8 , -0.8 ) ; glColor3f ( 0 , 1 , 0 ) ; glVertex2f ( 0.8 , -0.8 ) ; glColor3f ( 0 , 0 , 1 ) ; glVertex2f ( 0 , 0.9 ) ; glEnd ( ) ; glutSwapBuffers ( ) ; }
Fullscreen Flag Set To Fullscreen Mode By Default
Fullscreen Flag Set To Fullscreen Mode By Default
// Display function will draw the image. // (In fact, this is the default.) // red // green // blue // Required to copy color buffer onto the screen.