Computer Graphics MCQs with Answers
Practice important Computer Graphics MCQs with answers and explanations.
Chapter: 33
Q1141:
Window display state is acted upon only after entering _______.
A. glutDisplayFunc
B. glutMainLoop
C. glutReshapeFunc
D. glutIdleFunc
Correct Answer:
B
Chapter: 34
Q1142:
Which header file is included for OpenGL functions?
A. stdio.h
B. GL/glut.h
C. GL/glew.h
D. windows.h
Correct Answer:
B
Chapter: 34
Q1143:
What is the purpose of glViewport in OpenGL?
A. Sets color
B. Defines viewing area
C. Sets buffer
D. Sets matrix mode
Correct Answer:
B
Chapter: 34
Q1144:
In the given code, pressing which key will exit the program?
A. Enter
B. Escape
C. Spacebar
D. Tab
Correct Answer:
B
Chapter: 34
Q1145:
Which function is called when no window events are pending?
A. display()
B. idle()
C. reshape()
D. keyboard()
Correct Answer:
B
Chapter: 34
Q1146:
What is the purpose of glBegin(GL_TRIANGLES)?
A. Begin drawing points
B. Begin drawing triangle
C. Begin drawing lines
D. End drawing
Correct Answer:
B
Chapter: 34
Q1147:
Which function swaps the buffers in OpenGL?
A. glBegin
B. glEnd
C. glutSwapBuffers
D. glutMainLoop
Correct Answer:
C
Chapter: 34
Q1148:
What function is used to set the perspective projection in OpenGL?
A. gluPerspective
B. glPerspective
C. glViewport
D. glRotatef
Correct Answer:
A
Chapter: 34
Q1149:
What matrix mode should be set to modify the projection matrix?
A. GL_MODELVIEW
B. GL_PROJECTION
C. GL_TEXTURE
D. GL_VIEWPORT
Correct Answer:
B
Chapter: 34
Q1150:
Which OpenGL function is used to reset the current matrix to the identity matrix?
A. glMatrixMode
B. glLoadIdentity
C. glClear
D. glViewport
Correct Answer:
B
Chapter: 34
Q1151:
What does glTranslated function do?
A. Rotates objects
B. Scales objects
C. Translates objects
D. Clears buffers
Correct Answer:
C
Chapter: 34
Q1152:
In gluPerspective, which parameter defines the near clipping plane?
A. fovy
B. aspect
C. zNear
D. zFar
Correct Answer:
C
Chapter: 34
Q1153:
glRotatef rotates objects about which point?
A. Origin
B. Center
C. Texture
D. Viewport
Correct Answer:
A
Chapter: 34
Q1154:
In OpenGL, the glClearColor function sets values for which buffer?
A. Depth buffer
B. Color buffer
C. Stencil buffer
D. Frame buffer
Correct Answer:
B
Chapter: 34
Q1155:
Which function initializes the OpenGL projection matrix to identity?
A. glViewport
B. glLoadIdentity
C. glClear
D. glRotatef
Correct Answer:
B
Chapter: 34
Q1156:
OpenGL uses ________ to store different transformations like translation, rotation, and scaling.
A. Color buffers
B. Matrix stacks
C. Viewports
D. Depth buffers
Correct Answer:
B
Chapter: 34
Q1157:
The field of view angle in gluPerspective is given in _________.
A. Radians
B. Degrees
C. Pixels
D. Bits
Correct Answer:
B
Chapter: 34
Q1158:
Calling glTranslatef(1.0, 0.0, 0.0) will move the object in which direction?
A. Up
B. Right
C. Down
D. Left
Correct Answer:
B
Chapter: 34
Q1159:
Which of the following is NOT a correct matrix mode for glMatrixMode?
A. GL_MODELVIEW
B. GL_TEXTURE
C. GL_SHADING
D. GL_PROJECTION
Correct Answer:
C
Chapter: 34
Q1160:
In glTranslated(2.0, 0.0, 0.0), which axis is affected?
A. Y-axis
B. X-axis
C. Z-axis
D. No axis
Correct Answer:
B