ini
This commit is contained in:
commit
e4c8917154
16 changed files with 319 additions and 0 deletions
30
AULA3/main3.cpp
Normal file
30
AULA3/main3.cpp
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
#include <GL/glut.h>
|
||||
|
||||
void display() {
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
// O teu desenho fica aqui
|
||||
glFlush();
|
||||
}
|
||||
|
||||
void init() {
|
||||
// Define a cor de fundo (R, G, B, Alpha) - Preto por omissao
|
||||
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
|
||||
}
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
glutInit(&argc, argv);
|
||||
|
||||
// Configuracoes basicas da janela
|
||||
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
|
||||
glutInitWindowSize(800, 600);
|
||||
glutInitWindowPosition(100, 100);
|
||||
|
||||
// Cria a janela com o prefixo obrigatorio
|
||||
glutCreateWindow("GLUT: Titulo da Janela");
|
||||
|
||||
init();
|
||||
glutDisplayFunc(display);
|
||||
glutMainLoop();
|
||||
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue