Wednesday, July 1, 2009

Bringing Things Up to Speed 1

Day 1 wasn't much at all. I basically relearned GLUT: the GL Utility Toolset. Its awesome for most things. The first thing I wound up with was a rectangle with for colors. Its not very exciting.

Even less exciting is this rundown of glut functions I used:

glutInit(&argc, argv); was used to initiate glut. You can put in options, but I don't know what they'd be. Do you?

glutInitDisplayMode(GLUT_SINGLE GLUT_RGB); This was much cooler. It sets up the window to be single buffered and use Red Green and Blue Colors. The argument is actually a bitwise integer. So GLUT_SINGLE and GLUT_RGB are actually integer values with are subjected to a logical or. Cool stuff.

glutInitWindowPosition(100,100); sets the initial starting place
glutInitWindowSize(WIDTH, HEIGHT); sets its size

mainWindow = glutCreateWindow("main"); actually makes the window. It return an integer

glutDisplayFunc(display); sets the display callback

glutMainLoop(); starts the train wreck a rollin

You can see why most people don't make games. You have to start at the bottom before you can even think of where the top might be

No comments:

Post a Comment