Tuesday, November 20, 2007

Q&A from Practical 3 & 4

Practical 3
Qn: Define a callback function.

Ans:The RenderScene() callback function is where all instructions on how to
render (or draw) our scene are placed. When programming in GLUT and in many commercial game engines, remember that callback functions are an essential part of the programming style. It is a good way to hide the complicated inner workings of lower level subsystems and frees us to focus on the game logic at hand.

Qn: What color format are we using here (example 8bit, 16bits, 24bits,32bits)?

Ans: 24 Bits

Qn: How much memory have we allocated?

Ans: 800x600x3bytes

Practical 4
1) OpenGL stores drawing information in the form of matrices. on the. Can you briefly describe what does MODEL VIEW matrix and the PROJECTION matrix does?

Ans: selecting the global matrix to be modified

2)We can reset the matrix by loading an identity matrix on the top of the stack. What command is used to reset a matrix?

Ans: glLoadIdentity();

3) Some parameters have to be set so that our eye can see in the 3D world. The human eye has a field of view approximately 100°. It also has an effectively infinite viewing distance. Which command is used to setup such parameters for the virtual eye?

Ans: void gluLookAt( GLdouble eyex, GLdouble eyey, GLdouble eyez,
GLdouble centerx, GLdouble centery, GLdouble centerz,
GLdouble upx, GLdouble upy, GLdouble upz )

Computer Grapchis(CG_Camera)

Here I learn to look at an object in different view

Photo Sharing and Video Hosting at Photobucket


Photo Sharing and Video Hosting at Photobucket


Then learn to create a WireSphere
Photo Sharing and Video Hosting at Photobucket