Skip to main content

Computer Graphics MCQs with Answers

Practice important Computer Graphics MCQs with answers and explanations.

Chapter: 43
Q1461:
The function glLightModelfv is used to specify the characteristics of which OpenGL feature?
A. Light sources
B. Material properties
C. The viewing matrix
D. The lighting model
Correct Answer: D
Chapter: 43
Q1462:
What is the default global ambient light intensity in OpenGL?
A. {0.5, 0.5, 0.5, 1.0}
B. {1.0, 1.0, 1.0, 1.0}
C. {0.2, 0.2, 0.2, 1.0}
D. {0.0, 0.0, 0.0, 0.0}
Correct Answer: C
Chapter: 43
Q1463:
In OpenGL, which matrix affects a light's position or direction?
A. Projection Matrix
B. Modelview Matrix
C. Perspective Matrix
D. Viewing Matrix
Correct Answer: B
Chapter: 43
Q1464:
What is the purpose of the glPushMatrix and glPopMatrix functions?
A. To manage the modelview stack
B. To enable lighting
C. To set light position
D. To perform geometric transformations
Correct Answer: A
Chapter: 43
Q1465:
To make a light move relative to a stationary object, where should the light position be set?
A. After the modelview transformation
B. Before the modelview transformation
C. After the projection transformation
D. In the display function only
Correct Answer: A
Chapter: 43
Q1466:
In OpenGL, which transformation allows a light to appear as if it’s moving around a stationary object?
A. glTranslatef
B. glRotated
C. glPushMatrix
D. glLightfv
Correct Answer: B
Chapter: 43
Q1467:
Which function is used to enable lighting in OpenGL?
A. glEnable(GL_LIGHT0)
B. glLightModelfv
C. glMaterialfv
D. glEnable(GL_LIGHTING)
Correct Answer: D
Chapter: 43
Q1468:
The function glLightfv(GL_LIGHT0, GL_POSITION, position) is used to specify what?
A. The color of the light
B. The intensity of the light
C. The position of the light
D. The material properties
Correct Answer: C
Chapter: 43
Q1469:
Which OpenGL function disables lighting?
A. glDisable(GL_LIGHTING)
B. glDisable(GL_LIGHT0)
C. glDisable(GL_DEPTH_TEST)
D. glMaterialfv
Correct Answer: A
Chapter: 43
Q1470:
A light's position in OpenGL is transformed by which matrix?
A. The modelview matrix
B. The projection matrix
C. The color matrix
D. The transformation matrix
Correct Answer: A
Chapter: 43
Q1471:
A light source in OpenGL can be transformed using the same transformations as a ________.
A. Geometric primitive
B. Texture
C. Material
D. Color
Correct Answer: A
Chapter: 43
Q1472:
In the example code, what effect does glPushMatrix and glPopMatrix have in moving the light?
A. They reset the modelview matrix to a previous state
B. They make the light stationary
C. They reset the light position
D. They apply the light's transformation
Correct Answer: A
Chapter: 43
Q1473:
When defining a light source, which OpenGL function is used to specify the position?
A. glLightfv
B. glMaterialfv
C. glEnable
D. glLightModelfv
Correct Answer: A
Chapter: 43
Q1474:
What transformation is used in the example to rotate the light around the object?
A. glRotated
B. glTranslatef
C. glPushMatrix
D. gluLookAt
Correct Answer: A
Chapter: 43
Q1475:
In the provided code, what does the function glutSolidTorus do?
A. It creates a wireframe torus
B. It creates a solid torus
C. It creates a light source
D. It draws a cube
Correct Answer: B
Chapter: 43
Q1476:
Which OpenGL function is used to clear the buffers before rendering the scene?
A. glClear
B. glEnable
C. glDisable
D. glLightfv
Correct Answer: A
Chapter: 43
Q1477:
To control how much light the scene receives, which OpenGL function is used?
A. glLightfv
B. glLightModelfv
C. glMaterialfv
D. glEnable
Correct Answer: B
Chapter: 43
Q1478:
What does glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient) set in OpenGL?
A. The color of the ambient light
B. The position of the light
C. The intensity of the spotlight
D. The diffuse color of the light
Correct Answer: A
Chapter: 43
Q1479:
What OpenGL function is used to apply the camera view transformation?
A. gluLookAt
B. glPushMatrix
C. glTranslatef
D. glMaterialfv
Correct Answer: A
Chapter: 43
Q1480:
What does glMaterialfv() function do in OpenGL?
A. Sets material properties for the object
B. Defines the color of an object
C. Initializes the object
D. Applies textures to objects
Correct Answer: A

Test Your Knowledge

Take a timed quiz on Computer Graphics

🚀 Start Quiz Now