Código Gato Diana Vargas

#include <windows.h>
#include <math.h>
#ifdef _APPLE_
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endif


float r,g,b;

void display(void) //esta func contiene todo lo que voy a dibujar
{
    glClear(GL_COLOR_BUFFER_BIT);

    glColor3f(0,0,0);

    glBegin(GL_LINE_STRIP);
    glVertex2f(3,15);
    glVertex2f(0,12);
    glVertex2f(0,8);
    glVertex2f(1,2);
    glVertex2f(5,2);
    glVertex2f(5,4);
    glVertex2f(3,4);
    glVertex2f(3,5);
    glVertex2f(4,6);
    glVertex2f(6,6);
    glVertex2f(6,2);
    glVertex2f(9,2);
    glVertex2f(9,4);
    glVertex2f(8,4);
    glVertex2f(8,7);
    glVertex2f(9,6);
    glVertex2f(11,5);
    glVertex2f(13,5);
    glVertex2f(15,6);
    glVertex2f(16,7);
    glVertex2f(16,13);
    glVertex2f(14,11);
    glVertex2f(10,11);
    glVertex2f(8,13);
    glVertex2f(8,9);
    glVertex2f(6,11);
    glVertex2f(4,11);
    glVertex2f(2,9);
    glVertex2f(2,12);
    glVertex2f(3,12);
    glVertex2f(5,14);
    glVertex2f(5,15);
    glEnd();

    glBegin(GL_LINES);
    glVertex2f(5,15);
    glVertex2f(3,15);
    glEnd();

    glBegin(GL_LINE_LOOP);
    glVertex2f(13,10);
    glVertex2f(15,10);
    glVertex2f(15,8);
    glVertex2f(13,8);
    glEnd();

    glBegin(GL_LINE_LOOP);
    glVertex2f(9,10);
    glVertex2f(11,10);
    glVertex2f(11,8);
    glVertex2f(9,8);
    glEnd();

    glBegin(GL_LINE_LOOP);
    glVertex2f(12,8);
    glVertex2f(13,7);
    glVertex2f(11,7);
    glEnd();

    glFlush();
}
int main(int argc, char **argv)
{
    glutInit(&argc, argv);
    glutInitDisplayMode(GLUT_SINGLE|GLUT_RGB);
    glutInitWindowPosition(200,100);
    glutInitWindowSize(480, 480);
    glutCreateWindow("Gatito DV");

    gluOrtho2D(0, 16, 0, 16);
    glLineWidth(10);
    //glPointSize(5);
    glClearColor(1.0,1.0,1.0,0);

    glutDisplayFunc(display);
    glutMainLoop();
    return 0;
}


Comentarios

Entradas populares de este blog

Código Capitán América Diana Vargas

Reflejo | Diana Vargas

Cámara | Israel González de la Peña