MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

COMPUTER GRAPHICS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
If lighting is disabled, which function specifies the color of the vertex?
A
glClearColor()
B
glDisplayfunc()
C
glColor()
D
None of These
Explanation: 

Detailed explanation-1: -When lighting is disabled, the color of a vertex is simply the current color as set by glColor*.

Detailed explanation-2: -The glVertex function commands are used within glBegin/glEnd pairs to specify point, line, and polygon vertices.

Detailed explanation-3: -The background-color CSS property sets the background color of an element.

Detailed explanation-4: -glClearColor(0, 0, 1, 0); then recompile the program and run it. The background of the OpenGL window should be blue. Colors in OpenGL are typically represented in RGB or RGBA mode.

Detailed explanation-5: -We use glColor function to set the foreground color, and glClearColor function to set the background (or clearing) color. Notes: Color is typically specified in float in the range 0.0f and 1.0f .

There is 1 question to complete.