potter Admin
Cantidad de envíos : 149 Fecha de inscripción : 11/03/2007
| Tema: Cubo españó Sáb Mayo 19, 2007 2:08 am | |
| Esete es un pokillo cutre pero weno ahi va xDDD - Código:
-
#include <GL/glut.h> #include <GL/gl.h>
void reshape(int width, int height){ glViewport(0,0,width,height); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(-1, 1, -1, 1, -1, 1); glMatrixMode(GL_MODELVIEW); }
void display(){ glClear(GL_COLOR_BUFFER_BIT); glColor3f(1.0f, 0.0f, 0.0f); glLoadIdentity(); glBegin(GL_QUADS); glVertex3f(-0.5f,0.5f,0.0f); glVertex3f(0.5f,0.5f,0.0f); glVertex3f(0.5f,-0.5f,0.0f); glVertex3f(-0.5f,-0.5f,0.0f);
glVertex3f(-1.0f,1.0f,0.0f); glVertex3f(0.0f,1.0f,0.0f); glVertex3f(0.0f,0.0f,0.0f); glVertex3f(-1.0f,0.0f,0.0f);
glColor3f(1.0f,1.0f,0.0f);
glVertex3f(-1.0f,1.0f,0.0f); glVertex3f(-0.5f,0.5f,0.0f); glVertex3f(-0.5f,-0.5f,0.0f); glVertex3f(-1.0f,0.0f,0.0f);
glVertex3f(0.0f,1.0f,0.0f); glVertex3f(0.5f,0.5f,0.0f); glVertex3f(0.5f,-0.5f,0.0f); glVertex3f(0.0f,0.0f,0.0f);
glColor3f(1.0f,0.0f,0.0f);
glVertex3f(-0.5f,0.5f,0.0f); glVertex3f(0.5f,0.5f,0.0f); glVertex3f(0.5f,-0.5f,0.0f); glVertex3f(-0.5f,-0.5f,0.0f); glEnd(); glFlush(); }
void init(){ glClearColor(0,0,0,0); }
int main(int argc, char **argv){ glutInit(&argc, argv); glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); glutInitWindowPosition(50,50); glutInitWindowSize(500,500); glutCreateWindow("CUBO"); init(); glutDisplayFunc(display); glutReshapeFunc(reshape); glutMainLoop(); return 0; }
| |
|
Dark_Link Admin
Cantidad de envíos : 212 Edad : 34 Fecha de inscripción : 14/03/2007
| Tema: Re: Cubo españó Sáb Mayo 19, 2007 6:09 pm | |
| Pro x lo - es UBUNTU ¡¡¡¡¡¡¡¡ jajajajajjajaja
Arriva UBUNTU ¡¡¡ | |
|
Trigus Admin
Cantidad de envíos : 118 Fecha de inscripción : 08/04/2007
| Tema: Re: Cubo españó Dom Mayo 20, 2007 2:37 am | |
| meeeeeeeeeeeeee q wena estan las tia paero el cubo mola massssssssss | |
|