28 lines
No EOL
479 B
C++
28 lines
No EOL
479 B
C++
#include <GL/glut.h>
|
|
|
|
void display(void) {
|
|
|
|
glClearColor(0, 1, 0, 0);
|
|
glClear(GL_COLOR_BUFFER_BIT);
|
|
|
|
glFlush();
|
|
}
|
|
|
|
// Setup the rendering state
|
|
void SetupRC(void) {
|
|
// Set clear color to blue
|
|
glClearColor(0.0f, 0.0f, 1.0f, 1.0f);
|
|
}
|
|
|
|
int main(int argc, char **argv) {
|
|
glutInit(&argc, argv);
|
|
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
|
|
glutInitWindowSize(500, 500);
|
|
glutCreateWindow("GLUT: Simple");
|
|
|
|
glutDisplayFunc(display);
|
|
|
|
glutMainLoop();
|
|
|
|
return 0;
|
|
} |