Computer Graphics MCQs with Answers
Practice important Computer Graphics MCQs with answers and explanations.
Multiple Choice Questions
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
View Answer
A
Q1452: OpenGL uses which model to approximate lighting?
- A: Ray tracing
- B: Color index model
- C: RGB model
- D: Diffuse reflection model
View Answer
C
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
View Answer
B
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)
View Answer
B
Q1455: Which function in OpenGL is used to clear both color and depth buffers?
- A: glClear()
- B: glClearColor()
- C: glShadeModel()
- D: glFlush()
View Answer
A
Q1456: In OpenGL, material properties like shininess and specular reflectance are defined by which function?
- A: glMaterialfv()
- B: glLightfv()
- C: glEnable()
- D: glClearColor()
View Answer
A
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)
View Answer
B
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
View Answer
B
Q1459: Which OpenGL function is used to define a material property?
- A: glMaterialfv
- B: glMaterial*
- C: glLightfv
- D: glEnable
View Answer
B
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
View Answer
A