Question: in need an explanation for the function in computer graphic from 133 to 146 133 134 135 136 137 138 139 140 141 142 143
133 134 135 136 137 138 139 140 141 142 143 144 145 146 vol void reshape(GLsizei width, GLsizei height) \{ f rlcitei for non-neaative in If Compute aspect ratio of the new window if (height =m ) height =1; GLfloat aspect =(GLf loat)width / (GLfloat)height; I/ Set the viewport to cover the new window glviewport (6,6, width, height ); II Set the aspect ratio of the clipping volume to match the viewport glMatrixMode(GL_PROJECTION); // To operate on the Projection matrix glLoadidentity ()j _// Reset II Enable perspective projection with fovy, aspect, zNear and zFar gluPerspective(45. ef, aspect, 0.1f,100.f ) 3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
