MCQs > IT & Programming > OpenGL MCQs > Basic OpenGL MCQs

Basic OpenGL MCQ

1. glLoadIdentity () is the preferred way to load the identity matrix onto the matrix stack.

Answer

Correct Answer: True

Note: This Question is unanswered, help us to find answer for this one

2.

Which color is defined by the following call?

glColor4f (0.0, 0.0, 1.0, 0.0);


Answer

Correct Answer:

None of the above 


Note: This Question is unanswered, help us to find answer for this one

3.

What will be drawn by the following code?

    glBegin (GL_QUADS);

    glVertex2i (1, 0);

    glVertex2i (1, 1);

    glVertex2i (-1, 0);

    glVertex2i (-1, 1);

    glEnd ();


Answer

Correct Answer:

None of the above


Note: This Question is unanswered, help us to find answer for this one

4. Can "discard" be used in a vertex shader?

Answer

Correct Answer: No

Note: This Question is unanswered, help us to find answer for this one

5. Can you read a uniform value from the C code?

Answer

Correct Answer: Yes

Note: This Question is unanswered, help us to find answer for this one

6. OpenGL has some windows manipulation functions.

Answer

Correct Answer: False

Note: This Question is unanswered, help us to find answer for this one

7. On which matrix stack should gluLookAt be used?

Answer

Correct Answer: Modelview

Note: This Question is unanswered, help us to find answer for this one

8. Is glFinish blocking?

Answer

Correct Answer: Yes

Note: This Question is unanswered, help us to find answer for this one

9. What is/are the return type/s of glGetx () ?

Answer

Correct Answer: void

Note: This Question is unanswered, help us to find answer for this one

10. What will happen if a null pointer is used with glTexImage2D()? (In OpenGL >1.1)

Answer

Correct Answer: The texture space will be allocated for future use with sub-textures

Note: This Question is unanswered, help us to find answer for this one

11. Which of the following is not an OpenGL primitive?

Answer

Correct Answer: Circle

Note: This Question is unanswered, help us to find answer for this one

12.

The matrix, after the following calls, will be the identity matrix?

    glLoadIdentity ();

    glTranslatef (0, 0, -10);

    glRotatef (40, 1, 0, 0);

    glTranslatef (0, 0, 10);

    glRotatef (-40, 1, 0, 0);

Answer

Correct Answer:

False 


Note: This Question is unanswered, help us to find answer for this one

13. What is the primary language of OpenGL?

Answer

Correct Answer: C++

Note: This Question is unanswered, help us to find answer for this one

14. What is the default parameter qualifier?

Answer

Correct Answer: in

Note: This Question is unanswered, help us to find answer for this one

15. Which of the following buffer types is/are supported in OpenGL?

Answer

Correct Answer: All of the above

Note: This Question is unanswered, help us to find answer for this one

16. On which matrix stack should gluOrtho2D be used?

Answer

Correct Answer: Projection

Note: This Question is unanswered, help us to find answer for this one

17. What does gluOrtho2D do?

Answer

Correct Answer: It defines a projection matrix

Note: This Question is unanswered, help us to find answer for this one

18. What is the purpose of glTexCoord?

Answer

Correct Answer: To associate a texture coordinate with a vertex or raster position

Note: This Question is unanswered, help us to find answer for this one

19. How do you initialize the name stack?

Answer

Correct Answer: Using glInitNames ()

Note: This Question is unanswered, help us to find answer for this one

20. Which of the following is not a valid argument to glMatrixMode ?

Answer

Correct Answer: GL_DEPTH

Note: This Question is unanswered, help us to find answer for this one

21.

With depth test enabled, will the following drawing code work for depth testing?

void draw (void)

{

    glClear (GL_COLOR_BUFFER_BIT);

    glPolygonMode (GL_FRONT_AND_BACK, GL_LINE);

    glMatrixMode (GL_MODELVIEW);

    glLoadIdentity ();

    glTranslatef (0, 0, -10);

    

    glColor3f (1.0, 1.0, 0.0);

    

    glBegin (GL_QUADS);

    glVertex2i (1, 0);

    glVertex2i (1, 1);

    glVertex2i (-1, 1);

    glVertex2i (-1, 0);

    glEnd ();

    glFlush ();

}

Answer

Correct Answer:

No 


Note: This Question is unanswered, help us to find answer for this one

22. What is blending?

Answer

Correct Answer: Layer composition

Note: This Question is unanswered, help us to find answer for this one

23. What is a varying variable?

Answer

Correct Answer: A variable passed from the vertex shader to the fragment shader

Note: This Question is unanswered, help us to find answer for this one

24. What does glBitmap do?

Answer

Correct Answer: It draws a bitmap

Note: This Question is unanswered, help us to find answer for this one

25. What is vsync?

Answer

Correct Answer: Synchronization with the monitor refresh rate

Note: This Question is unanswered, help us to find answer for this one

26. In Linux, what API will you use to get an OpenGL context?

Answer

Correct Answer: glX

Note: This Question is unanswered, help us to find answer for this one

27. In Windows, what API will you use to get an OpenGL context?

Answer

Correct Answer: wgl

Note: This Question is unanswered, help us to find answer for this one

28. Which primitives may be used to draw a circle?

Answer

Correct Answer: Polygon
Lines

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

29. What is usually the best texture format for upload?

Answer

Correct Answer: GL_UNSIGNED_INT_8_8_8_8_REV

Note: This Question is unanswered, help us to find answer for this one

30. What should be the render mode to use glLoadName ()?

Answer

Correct Answer: GL_SELECT

Note: This Question is unanswered, help us to find answer for this one

31. Which function should be used to specify the value of a sampler1D?

Answer

Correct Answer: glUniform1i

Note: This Question is unanswered, help us to find answer for this one

32.

Is the following code valid?

   glMatrixMode (GL_MODELVIEW);

    glLoadIdentity ();

    glTranslatef (0, 0, -10);

Answer

Correct Answer:

Yes 


Note: This Question is unanswered, help us to find answer for this one

33.

What is the difference between statements A and B?

A: gl_Position = gl_ProjectionMatrix * gl_ModelViewMatrix * gl_Vertex;

B: gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;

Answer

Correct Answer:

They are equivalent


Note: This Question is unanswered, help us to find answer for this one

34. What is the first argument of glRotate?

Answer

Correct Answer: The angle in degrees

Note: This Question is unanswered, help us to find answer for this one

35.

Which color is defined by the following call?

glColor3f (1.0, 0.0, 0.0);

Answer

Correct Answer:

blue 


Note: This Question is unanswered, help us to find answer for this one

36. What is true of OpenGL?

Answer

Correct Answer: It has numerous implementations
It can be fully implemented in software

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

37.

What should be added to make this drawing function valid?

void draw (void)

{

    glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

    glTranslatef (0, 0, -10);

    

    glColor3f (1.0, 1.0, 0.0);

    glBegin (GL_QUADS);

    glVertex2i (1, 0);

    glVertex2i (1, 1);

    glVertex2i (-1, 1);

    glVertex2i (-1, 0);

    glEnd ();

    

    glFlush ();

}

Answer

Correct Answer:

glPushMatrix () 


Note: This Question is unanswered, help us to find answer for this one

38. What does glActiveTexture do?

Answer

Correct Answer: It changes the active texture unit

Note: This Question is unanswered, help us to find answer for this one

39. Which of the following is faster?

Answer

Correct Answer: Vertex buffer objects

Note: This Question is unanswered, help us to find answer for this one

40. What does glFrustum do?

Answer

Correct Answer: It multiplies the current matrix by a perspective matrix

Note: This Question is unanswered, help us to find answer for this one

41. glOrtho is used to define a _________ matrix.

Answer

Correct Answer: projection

Note: This Question is unanswered, help us to find answer for this one

42. Who created OpenGL?

Answer

Correct Answer: SGI

Note: This Question is unanswered, help us to find answer for this one

43. Which function should be used to specify the coordinates of a point?

Answer

Correct Answer: glVertex

Note: This Question is unanswered, help us to find answer for this one

44. What image format does OpenGL understand?

Answer

Correct Answer: OpenGL cannot read images directly

Note: This Question is unanswered, help us to find answer for this one

45. Which of the following are valid picking methods?

Answer

Correct Answer: Back buffers
Select buffers

Note: This question has more than 1 correct answers

Note: This Question is unanswered, help us to find answer for this one

46. What is a display list?

Answer

Correct Answer: A list of commands

Note: This Question is unanswered, help us to find answer for this one

47. How can you access the current modelview matrix?

Answer

Correct Answer: None of the above

Note: This Question is unanswered, help us to find answer for this one

48.

What is true of the following code?

glPushMatrix ();

glLoadIdentity ();

glTranslatef (1.0, 2.0, 4.0);

glPopMatrix ();

Answer

Correct Answer:

After this code has been executed, the matrix stack will be restored to its original state. 


Note: This Question is unanswered, help us to find answer for this one

49. What is the common size of OpenGL matrices?

Answer

Correct Answer: 4x4

Note: This Question is unanswered, help us to find answer for this one

50. Which of the following might be used to draw VBOs?

Answer

Correct Answer: None of the above

Note: This Question is unanswered, help us to find answer for this one

51. Is gluBeginPolygon the same as glBegin(GL_POLYGON)?

Answer

Correct Answer: No

Note: This Question is unanswered, help us to find answer for this one

52. In which version of OpenGL, GLSL was introduced as a core feature?

Answer

Correct Answer: 2.0

Note: This Question is unanswered, help us to find answer for this one

53. What does glPassThrough() do?

Answer

Correct Answer: It places a marker in the feedback buffer

Note: This Question is unanswered, help us to find answer for this one

54. Does gluProject use the current matrix stack?

Answer

Correct Answer: No

Note: This Question is unanswered, help us to find answer for this one

55. Which of the following functions has an unsigned byte variant? (taking GLubyte as arguments)

Answer

Correct Answer: glColor

Note: This Question is unanswered, help us to find answer for this one

56.

What will be the size of the quad drawn by the following code on the screen?

    glBegin (GL_QUADS);

    glVertex2i (1, 0);

    glVertex2i (1, 1);

    glVertex2i (-1, 1);

    glVertex2i (-1, 0);

    glEnd ();