Computer Graphics MCQs with Answers
Practice important Computer Graphics MCQs with answers and explanations.
Multiple Choice Questions
Q1481: In the provided code, which material property is set by glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse);?
- A: Diffuse reflection
- B: Specular reflection
- C: Ambient reflection
- D: Emission
View Answer
A
Q1482: What is the purpose of the glPushMatrix() function in OpenGL?
- A: Saves the current transformation matrix
- B: Translates the object
- C: Sets the light source position
- D: Pops the transformation matrix
View Answer
A
Q1483: The function glColorMaterial(GL_FRONT, GL_DIFFUSE) changes which material property?
- A: Diffuse reflection
- B: Specular reflection
- C: Ambient reflection
- D: Shininess
View Answer
A
Q1484: In OpenGL, what does glEnable(GL_COLOR_MATERIAL) do?
- A: Enables color tracking for material properties
- B: Enables lighting
- C: Initializes objects for rendering
- D: Applies texture to objects
View Answer
A
Q1485: Which of the following commands sets up the light source in OpenGL?
- A: glLightfv(GL_LIGHT0, GL_POSITION, light_position)
- B: glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse)
- C: glColor3f(0.2, 0.5, 0.8)
- D: glTranslatef(1.25, 3.0, 0.0)
View Answer
A
Q1486: What does glutSolidSphere(1.0, 16, 16); do in OpenGL?
- A: Draws a solid sphere
- B: Translates an object
- C: Sets the light position
- D: Enables smooth shading
View Answer
A
Q1487: The function glEnable(GL_LIGHTING) enables what in OpenGL?
- A: Lighting in the scene
- B: Depth testing
- C: Texture mapping
- D: Transformation matrix
View Answer
A
Q1488: Which material property is modified by glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular);?
- A: Specular reflection
- B: Diffuse reflection
- C: Ambient reflection
- D: Emission
View Answer
A
Q1489: In the provided OpenGL code, what is the purpose of glTranslatef(-1.25, 3.0, 0.0);?
- A: Translates the object to a new position
- B: Sets the light source position
- C: Scales the object
- D: Rotates the object
View Answer
A
Q1490: What is the role of glutMainLoop() in OpenGL?
- A: Starts the rendering loop
- B: Initializes the window
- C: Defines the light source
- D: Changes the color of the object
View Answer
A