Someone guess what this code do…:) This is an OpenGL code in C++
#include <GL/glut.h>
void event_display (void)
{
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(1.0, 1.0, 0.0);
glRotatef(45.0, 0.0, 0.0, 1.0);
glRotatef(-45.0, 0.0, 1.0, 0.0);
glRotatef(90.0, 1.0, 0.0, 0.0);
glRotatef(45.0, 0.0, 1.0, 0.0);
glRotatef(-45.0, 0.0, 0.0, 1.0);
glutWireCube(.5);
glColor3f(1.0, 1.0, 1.0);
glBegin(GL_LINES);
glVertex3f(0.0, 0.0, 0.0);
glVertex3f(1.0, 1.0, 1.0);
glEnd();
glFlush();
}
void init (void)
{
glClearColor(0.0, 0.0, 0.0, 0.0);
}
void main(int argc, char** argv)
{
glutInit(&argc, argv);
glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB);
glutInitWindowSize(300, 300);
glutInitWindowPosition(0, 0);
glutCreateWindow(argv[0]);
init();
glutDisplayFunc(event_display);
glutMainLoop();
}
hehe…once lang gane yo yan OpenGL…:)
Posted by phengpheng at August 30, 2006, 8:59 pmpyOpengl for OPenGl programmers… hehe
http://pyopengl.sourceforge.net/documentation/opengl_diffs.html…
All comments are moderated. Your comments will not appear here unless approved by the blog owner. Thank you.
opengl girl ste di miyo!
Posted by niel at August 29, 2006, 8:38 pm