ini
This commit is contained in:
commit
e4c8917154
16 changed files with 319 additions and 0 deletions
28
AULA2/main2.cpp
Normal file
28
AULA2/main2.cpp
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue