Computer Graphics MCQs with Answers
Practice important Computer Graphics MCQs with answers and explanations.
Chapter: 43
Q1441:
The glOrtho() function in OpenGL is used for:
A. Setting the position of the viewpoint
B. Defining the material properties
C. Setting the projection matrix for orthogonal views
D. Enabling depth testing
Correct Answer:
C
Chapter: 43
Q1442:
In OpenGL, the glLightfv() function is used to define:
A. The material properties of an object
B. The ambient light level of the scene
C. The properties of a light source
D. The depth of the scene
Correct Answer:
C
Chapter: 43
Q1443:
A normal vector in OpenGL helps to determine:
A. How much light a vertex receives
B. The position of the camera
C. The color of the light source
D. The size of the object
Correct Answer:
A
Chapter: 43
Q1444:
The default lighting model in OpenGL assumes the viewer is located at:
A. A fixed position
B. Infinite distance
C. The center of the scene
D. The light source position
Correct Answer:
B
Chapter: 43
Q1445:
What does the glEnable(GL_DEPTH_TEST) function do in OpenGL?
A. Enables depth buffer testing for hidden surface removal
B. Enables lighting calculations for the scene
C. Sets the background color of the scene
D. Defines the ambient light source
Correct Answer:
A
Chapter: 43
Q1446:
In OpenGL, the function glLightfv() allows us to set which of the following light characteristics?
A. Position, Diffuse color, Specular color
B. Position, Shininess, Material reflection
C. Position, Ambient light, Viewer's location
D. Position, Light's direction, Depth
Correct Answer:
A
Chapter: 43
Q1447:
The glMaterialfv() function in OpenGL is used to define:
A. The position of light sources
B. The properties of the materials in the scene
C. The type of light used
D. The shininess of the material
Correct Answer:
B
Chapter: 43
Q1448:
The glShadeModel() function controls the rendering of surfaces. Which option is the default setting?
A. GL_FLAT
B. GL_SMOOTH
C. GL_GOURAUD
D. GL_SHINY
Correct Answer:
B
Chapter: 43
Q1449:
Which function is used to position the viewpoint in OpenGL?
A. glOrtho()
B. glTranslate()
C. glPushMatrix()
D. glLoadIdentity()
Correct Answer:
A
Chapter: 43
Q1450:
What OpenGL function is used to create a sphere with lighting effects?
A. glutSolidSphere()
B. glSphere()
C. glCreateSphere()
D. glutCreateSphere()
Correct Answer:
A
Chapter: 43
Q1451:
The glLightfv() function requires which of the following as a parameter to specify the color of light?
A. GL_DIFFUSE
B. GL_POSITION
C. GL_SPECULAR
D. GL_AMBIENT
Correct Answer:
A
Chapter: 43
Q1452:
OpenGL uses which model to approximate lighting?
A. Ray tracing
B. Color index model
C. RGB model
D. Diffuse reflection model
Correct Answer:
C
Chapter: 43
Q1453:
What is the main purpose of glLightModel*() in OpenGL?
A. It specifies the location of the light sources
B. It defines the lighting model parameters for the scene
C. It calculates the reflection on surfaces
D. It sets the ambient color of the material
Correct Answer:
B
Chapter: 43
Q1454:
In OpenGL, what function is used to ensure proper depth testing?
A. glEnable(GL_LIGHTING)
B. glEnable(GL_DEPTH_TEST)
C. glLightfv(GL_LIGHT0)
D. glMaterialfv(GL_FRONT)
Correct Answer:
B
Chapter: 43
Q1455:
Which function in OpenGL is used to clear both color and depth buffers?
A. glClear()
B. glClearColor()
C. glShadeModel()
D. glFlush()
Correct Answer:
A
Chapter: 43
Q1456:
In OpenGL, material properties like shininess and specular reflectance are defined by which function?
A. glMaterialfv()
B. glLightfv()
C. glEnable()
D. glClearColor()
Correct Answer:
A
Chapter: 43
Q1457:
The default value for GL_DIFFUSE and GL_SPECULAR is:
A. (1.0, 1.0, 1.0, 1.0)
B. (0.0, 0.0, 0.0, 1.0)
C. (1.0, 0.0, 0.0, 1.0)
D. (0.5, 0.5, 0.5, 1.0)
Correct Answer:
B
Chapter: 43
Q1458:
What is the main effect of glLightfv in OpenGL?
A. It sets the color of the light
B. It sets the position of the light
C. It sets the intensity of the light
D. It enables lighting
Correct Answer:
B
Chapter: 43
Q1459:
Which OpenGL function is used to define a material property?
A. glMaterialfv
B. glMaterial*
C. glLightfv
D. glEnable
Correct Answer:
B
Chapter: 43
Q1460:
In OpenGL, which transformation does NOT affect the light's position?
A. Projection Matrix
B. Modelview Matrix
C. Viewing Transformation
D. None of the above
Correct Answer:
A