MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

COMPUTER GRAPHICS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
What is the difference between glColor3d and glColor3f?
A
glColor3d only sets RGB, while glColor3f sets R, G, B and A
B
glColor3d allows 3d color operations, while glColor3f only allows 8-bit
C
glColor3d takes double arguments, while glColor3f takes float arguments
D
glColor3d is in real space, glColor3f is in integer space
Explanation: 

Detailed explanation-1: -glColor3d only sets RGB, while glColor3f sets R, G, B and A B.

Detailed explanation-2: -glColor3f can be called in between glBegin and glEnd. When it is used this way, it can be used to give each vertex its own color. The resulting rectangle is then shaded with an attractive color gradient, as shown on the right.

Detailed explanation-3: -glColor3ub is the version for unsigned char in C/C++, that is a 8-bit integer without a sign. glColor3b is the version for char which is a signed 8-bit integer.

There is 1 question to complete.