Quick OpenGL - Build a House and an eye
I have very limited coding knowledge of OpenGL/Glut. I'm supposed to build house and a blinking eye. Now I have googled and tried the "quick solution" but I cannot find. I want a fast paced tutorial to get me i开发者_开发知识库nto advanced concepts. Please help me to get that kind of tutorial. little introduction and explanation and much in advanced concept. Also if there is code I can learn from I will appreciate.
I'm comfortable with C/C++ and little OpenGL
The quick solution is: Model the house and the eye in a 3D modeller, like Blender. Export the meshes and index arrays into C arrays. Write the code to load the meshed into a Vertex Array / Vertex Buffer Object and a draw-event handler function that binds the vertex array and calls glDrawElements on the index array.
Implement the blinking by building the eyelid from two meshes that can rotate around some axis that makes it look like blinking.
OpenGL is just a drawing API. It has no modelling functions. It just pushes triangles to the screen. Any homework assignment to "code a modell" is misguided and the person who handed out the assignment has no clue about it.
For some OpenGL tutorials that are not hopelessly out of date, try:
- http://www.arcsynthesis.org/gltut/
- http://www.opengl-tutorial.org/
This question here on SO may also be helpful.
If you want a great crash course in OpenGL programming, work through the tutorials on http://nehe.gamedev.net/.
精彩评论