Computer Graphics MCQs with Answers
Practice important Computer Graphics MCQs with answers and explanations.
Multiple Choice Questions
Q1141: Window display state is acted upon only after entering _______.
- A: glutDisplayFunc
- B: glutMainLoop
- C: glutReshapeFunc
- D: glutIdleFunc
View Answer
B
Q1142: Which header file is included for OpenGL functions?
- A: stdio.h
- B: GL/glut.h
- C: GL/glew.h
- D: windows.h
View Answer
B
Q1143: What is the purpose of glViewport in OpenGL?
- A: Sets color
- B: Defines viewing area
- C: Sets buffer
- D: Sets matrix mode
View Answer
B
Q1144: In the given code, pressing which key will exit the program?
- A: Enter
- B: Escape
- C: Spacebar
- D: Tab
View Answer
B
Q1145: Which function is called when no window events are pending?
- A: display()
- B: idle()
- C: reshape()
- D: keyboard()
View Answer
B
Q1146: What is the purpose of glBegin(GL_TRIANGLES)?
- A: Begin drawing points
- B: Begin drawing triangle
- C: Begin drawing lines
- D: End drawing
View Answer
B
Q1147: Which function swaps the buffers in OpenGL?
- A: glBegin
- B: glEnd
- C: glutSwapBuffers
- D: glutMainLoop
View Answer
C
Q1148: What function is used to set the perspective projection in OpenGL?
- A: gluPerspective
- B: glPerspective
- C: glViewport
- D: glRotatef
View Answer
A
Q1149: What matrix mode should be set to modify the projection matrix?
- A: GL_MODELVIEW
- B: GL_PROJECTION
- C: GL_TEXTURE
- D: GL_VIEWPORT
View Answer
B
Q1150: Which OpenGL function is used to reset the current matrix to the identity matrix?
- A: glMatrixMode
- B: glLoadIdentity
- C: glClear
- D: glViewport
View Answer
B