This commit is contained in:
lipe89 2026-03-12 09:39:09 +00:00
commit e4c8917154
16 changed files with 319 additions and 0 deletions

38
AULA3/main2.cpp Normal file
View file

@ -0,0 +1,38 @@
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glut.h>
void display() {
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(1, 0, 0);
glBegin(GL_QUADS);
glVertex2f(150,150);
glVertex2f(250, 150);
glVertex2f(50, 50);
glVertex2f(,);
glEnd();
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(400,400);
// Cria a janela com o prefixo obrigatorio
glutCreateWindow("GLUT: Ex2");
gluOrtho2D(0, 400, 400, 0);
glutDisplayFunc(display);
glutMainLoop();
return 0;
}