Computer Graphics MCQs with Answers
Practice important Computer Graphics MCQs with answers and explanations.
Multiple Choice Questions
Q1491: Which parameter is used to specify the light position in OpenGL?
- A: GL_POSITION
- B: GL_DIFFUSE
- C: GL_SPECULAR
- D: GL_AMBIENT
View Answer
A
Q1492: The function glDisable(GL_COLOR_MATERIAL) does what in OpenGL?
- A: Disables color tracking for material properties
- B: Disables lighting
- C: Disables depth testing
- D: Disables texture mapping
View Answer
A
Q1493: In the provided example, which OpenGL function sets the shininess of the material?
- A: glMaterialf(GL_FRONT, GL_SHININESS, low_shininess)
- B: glLightfv(GL_LIGHT0, GL_POSITION, light_position)
- C: glEnable(GL_COLOR_MATERIAL)
- D: glColor3f(0.9, 0.0, 0.2)
View Answer
A
Q1494: Which OpenGL function is used to change the current color of an object?
- A: glColor3f(0.2, 0.5, 0.8)
- B: glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse)
- C: glEnable(GL_LIGHTING)
- D: glTranslatef(1.25, 3.0, 0.0)
View Answer
A
Q1495: What is the purpose of glutReshapeFunc(reshape); in OpenGL?
- A: Handles window resizing
- B: Initializes lighting settings
- C: Sets the camera position
- D: Enables texture mapping
View Answer
A
Q1496: The function glutMouseFunc(mouse); in OpenGL is used to handle what?
- A: Mouse button presses
- B: Window resizing
- C: Object transformations
- D: Light changes
View Answer
A
Q1497: Which OpenGL function is used to load the projection matrix for setting the viewport?
- A: glMatrixMode(GL_PROJECTION)
- B: glShadeModel(GL_SMOOTH)
- C: glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse)
- D: glEnable(GL_DEPTH_TEST)
View Answer
A
Q1498: In OpenGL, which of the following functions is used to set the diffuse reflection for the front face of an object?
- A: glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse)
- B: glLightfv(GL_LIGHT0, GL_POSITION, light_position)
- C: glTranslatef(1.25, 3.0, 0.0)
- D: glColorMaterial(GL_FRONT, GL_DIFFUSE)
View Answer
A
Q1499: Fill in the blank: The function glMaterialfv() is used to set the ________ in OpenGL.
- A: Material properties
- B: Texture properties
- C: Lighting parameters
- D: Projection matrix
View Answer
A
Q1500: The glutMouseFunc(mouse) function is used to handle ________.
- A: Mouse events
- B: Keyboard events
- C: Object transformations
- D: Window events
View Answer
A