Got a rotating cube on the screen now. I also now have an understanding about backface culling, windings, rotation and that it matters what order you put some of the OpenGL setup commands. It seems I have clockwise windings in this program, despite arranging them in an anti-clockwise order…
Yes, for a while I had a black screen. Then I had some obscure abomination of geometry that’d make Escher proud. After fixing that and working out how to rotate independantly on different axes, there’s now a spinny multicoloured cube to look at
Next stage – a display list. I want many cubes… If I can be bothered, I might break the cubes’ faces up into triangles for easier digestion by my graphics card. Then again, it might not make any difference and working out the co-ords for the cube was hard enough – my OpenGL book has uses other than the text inside it, it makes a good 3D object
When I get around to moving a “camera” (do you move a camera about, or do you move the whole world about? Does it matter which you do, and is there really any difference? It’s all a matter of relativity…) I forsee holding something in my hand and waving it around while thinking “X is across, Y is up, Z is over there… now I rotate like this and Z is now up there… *gibber*”.
Pingback: Time becomes a loop | The Diary