wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

OpenGL Quiz

Total questions: 99

Worksheet time: 50mins

Name
Class
Date
1.

What is OpenGL?

a)

A programming language

b)

A Graphics Rendering API

c)

A database management system

d)

An operating system

2.

When we say a program is OpenGL-based, what does it mean?

a)

It is written in OpenGL language

b)

It is written in a programming language that makes calls to OpenGL libraries

c)

It is a standalone application

d)

It is a hardware-based program

3.

Which of the following programming languages can be used to write OpenGL-based applications?

a)

Python

b)

JavaScript

c)

C/C++

d)

HTML

4.

What is one of the key characteristics of OpenGL regarding window and operating system dependency?

a)

OpenGL is dependent on the window and operating system.

b)

OpenGL is window and operating system independent.

c)

OpenGL includes functions for window management.

d)

OpenGL is only compatible with specific operating systems.

5.

Which of the following functions is NOT included in OpenGL?

a)

Window management.

b)

User interaction.

c)

File I/O.

d)

All of the above.

6.

Who is responsible for window management when using OpenGL?

a)

OpenGL itself.

b)

The host environment.

c)

The user.

d)

The operating system.

7.

What is the primary purpose of the GL library in OpenGL?

a)

It is an auxiliary library for graphics accessory functions.

b)

It is a utility toolkit for window management.

c)

It is the "core" library of OpenGL that is platform independent.

d)

It is used for handling audio processing.

8.

Which OpenGL library is responsible for handling a variety of graphics accessory functions?

a)

GL

b)

GLU

c)

GLUT

d)

GLEW

9.

What is the function of the GLUT library in OpenGL?

a)

It is the "core" library of OpenGL.

b)

It handles a variety of graphics accessory functions.

c)

It is a utility toolkit that handles window management.

d)

It is used for platform-specific optimizations.

10.

What does the diagram represent in the context of computer graphics?

a)

OpenGL API Hierarchy

b)

Software Development Lifecycle

c)

Operating System Architecture

d)

Network Protocol Stack

11.

Which component in the OpenGL API hierarchy is responsible for providing utility functions for OpenGL?

a)

GL

b)

GLU

c)

GLUT

d)

X, Win32, Mac O/S

12.

In the OpenGL API hierarchy, which layer interacts directly with the operating system (e.g., X, Win32, Mac O/S)?

a)

GLU

b)

GLUT

c)

OpenGL Motif widget or similar

d)

Application program

13.

What is the role of GLUT in the OpenGL API hierarchy?

a)

It provides a platform-independent interface for creating windows and handling input.

b)

It is responsible for rendering 3D graphics.

c)

It directly interacts with the hardware.

d)

It provides operating system-specific functionality.

14.

Which library is referred to as the "core" library in the table?

a)

Auxiliary library

b)

OpenGL

c)

Utility toolkits

d)

GLUT

15.

What is the header file associated with the Auxiliary library?

a)

gl.h

b)

glu.h

c)

glut.h

d)

glaux.h

16.

Which library handles a variety of accessory functions?

a)

OpenGL

b)

Auxiliary library

c)

Utility toolkits

d)

glaux

17.

What is the purpose of the Utility toolkits as mentioned in the table?

a)

Core library functions

b)

Handles accessory functions

c)

Window management

d)

Graphics rendering

18.

Which header file is used for the Utility toolkits?

a)

gl.h

b)

glu.h

c)

glut.h

d)

glaux.h

19.

In which programming language are all the libraries presented?

a)

Python

b)

Java

c)

C

d)

C++

20.

What is GLUT primarily used for in OpenGL?

a)

It is a Window Manager that handles window creation, user interaction, callbacks, etc.

b)

It is a graphics rendering engine.

c)

It is a programming language for OpenGL.

d)

It is a hardware component for OpenGL.

21.

What is one of the key features of GLUT?

a)

It is platform independent.

b)

It is hardware dependent.

c)

It only works on Windows.

d)

It requires additional software for compatibility.

22.

How does GLUT make learning and writing OpenGL programs easier?

a)

By providing a distraction-free environment.

b)

By offering pre-written OpenGL programs.

c)

By requiring no programming knowledge.

d)

By automating all coding tasks.

23.

Which header file is considered the "core" and is the only required file for OpenGL?

a)

#include

b)

#include

c)

#include

d)

#include

24.

What is the purpose of the header file #include ?

a)

Handles window managements

b)

Handles accessory functions

c)

Core functionality of OpenGL

d)

Handles file input/output

25.

Which header file is responsible for handling window management in OpenGL?

a)

#include

b)

#include

c)

#include

d)

#include

26.

What is the only library required for the "core" functionality in OpenGL?

a)

opengl32.lib and gl.h

b)

glu32.lib and gl.h

c)

glut32.lib and gl.h

d)

opengl32.lib and glu.h

27.

Which library should be linked using "opengl32.lib" on a PC or "-lgl" on UNIX?

a)

GL library

b)

GLU library

c)

GLUT library

d)

OpenCV library

28.

What is the correct file to link for the GLU library on a PC?

a)

opengl32.lib

b)

glu32.lib

c)

glut32.lib

d)

-lglu

29.

Which library is linked using "glut32.lib" on a PC or "-lglut" on UNIX?

a)

GL library

b)

GLU library

c)

GLUT library

d)

OpenGL library

30.

What is the UNIX command to link the GLU library?

a)

-lgl

b)

-lglu

c)

-lglut

d)

-lopengl

31.

Which of the following libraries is linked using "opengl32.lib" on a PC?

a)

GL library

b)

GLU library

c)

GLUT library

d)

DirectX library

32.

What does the naming convention of OpenGL functions indicate?

a)

The library the function is from, the number of arguments, and their types.

b)

The programming language used to write the function.

c)

The operating system compatibility of the function.

d)

The version of OpenGL the function supports.

33.

Which part of the OpenGL function naming convention specifies the type of arguments the function takes?

a)

Library prefix

b)

Root command

c)

Argument type

d)

Argument count

34.

What is the purpose of the library prefix in OpenGL function naming?

a)

To indicate the library the function belongs to.

b)

To specify the number of arguments.

c)

To define the type of arguments.

d)

To describe the function's root command.

35.

In the OpenGL function naming convention, what does the argument count represent?

a)

The number of arguments the function takes.

b)

The type of arguments the function takes.

c)

The library the function belongs to.

d)

The root command of the function.

36.

What does "gl" in OpenGL function naming stand for?

a)

Graphics Library

b)

OpenGL

c)

General Library

d)

Global Logic

37.

In the function name "glColor3f(...)", what does the "f" indicate?

a)

The argument is of float type

b)

The argument is of integer type

c)

The argument is a function

d)

The argument is a vector

38.

What does "glu" represent in OpenGL function naming?

a)

Graphics Library Utility

b)

General Library Unit

c)

GLU

d)

OpenGL Utility

39.

In OpenGL function naming, what does the "v" in a function name signify?

a)

The argument is of vector type

b)

The argument is of float type

c)

The argument is of integer type

d)

The argument is a variable

40.

What is the first step in the Basic OpenGL Coding Framework?

a)

Initialize OpenGL state

b)

Configure GL (and GLUT)

c)

Register callback functions

d)

Event processing loop

41.

Which of the following is part of initializing the OpenGL state?

a)

Open window

b)

Register callback functions

c)

Set background color

d)

glutMainLoop()

42.

What is the purpose of the `glutMainLoop()` function in the Basic OpenGL Coding Framework?

a)

To initialize OpenGL state

b)

To register callback functions

c)

To avoid disappearing of the window

d)

To configure GL and GLUT

43.

Which step in the Basic OpenGL Coding Framework involves handling user interactions like keyboard and mouse inputs?

a)

Configure GL (and GLUT)

b)

Initialize OpenGL state

c)

Register callback functions

d)

Event processing loop

44.

What does the "Configure GL (and GLUT)" step include?

a)

Setting background color and light

b)

Opening a window and setting display mode

c)

Registering render functions

d)

Running the event processing loop

45.

What is the purpose of the `glutInitDisplayMode` function in the given program?

a)

To initialize the display mode with options like single buffering and RGB color mode.

b)

To set the window size.

c)

To create a window with a specific title.

d)

To start the main loop of the program.

46.

Which function is used to set the window size in the given program?

a)

glutCreateWindow

b)

glutInitWindowSize

c)

glutDisplayFunc

d)

glutMainLoop

47.

What is the title of the window created by the `glutCreateWindow` function in the program?

a)

"OpenGL Program"

b)

"My First Program"

c)

"Sample Window"

d)

"Graphics Window"

48.

Which function is responsible for entering the main event loop in the program?

a)

glutDisplayFunc

b)

glutMainLoop

c)

glutReshapeFunc

d)

glutKeyboardFunc

49.

What is the purpose of the `glutInit` function in the given code snippet?

a)

To initialize the GLUT library.

b)

To set the display mode.

c)

To create a window.

d)

To set the window size.

50.

Which function is used to set the display mode in the given code snippet?

a)

glutInit

b)

glutInitDisplayMode

c)

glutCreateWindow

d)

glutInitWindowSize

51.

What does the parameter `GLUT_SINGLE | GLUT_RGB` in `glutInitDisplayMode` specify?

a)

Double buffering and grayscale color.

b)

Single buffering and RGB color.

c)

Single buffering and grayscale color.

d)

Double buffering and RGB color.

52.

Which function is used to set the window size in the given code snippet?

a)

glutInit

b)

glutInitDisplayMode

c)

glutInitWindowSize

d)

glutCreateWindow

53.

What is the title of the window created by the `glutCreateWindow` function in the given code snippet?

a)

"GLUT Window"

b)

"My First Program"

c)

"OpenGL Window"

d)

"Default Window"

54.

Which function is used for standard GLUT initialization?

a)

glutInitDisplayMode(unsigned int mode)

b)

glutInit(int argc, char **argv)

c)

glutCreateWindow(char *name)

d)

glutInitWindowSize(int width, int height)

55.

Which function is used to set the display mode in GLUT?

a)

glutInitWindowPosition(int x, int y)

b)

glutCreateWindow(char *name)

c)

glutInitDisplayMode(unsigned int mode)

d)

glutInit(int argc, char **argv)

56.

Which function is used to set the window size in GLUT?

a)

glutInitWindowSize(int width, int height)

b)

glutInitWindowPosition(int x, int y)

c)

glutCreateWindow(char *name)

d)

glutInitDisplayMode(unsigned int mode)

57.

Which function is used to set the window position in GLUT?

a)

glutInitWindowSize(int width, int height)

b)

glutInitWindowPosition(int x, int y)

c)

glutCreateWindow(char *name)

d)

glutInitDisplayMode(unsigned int mode)

58.

Which function is used to create a window in GLUT?

a)

glutInitWindowSize(int width, int height)

b)

glutInitWindowPosition(int x, int y)

c)

glutCreateWindow(char *name)

d)

glutInitDisplayMode(unsigned int mode)

59.

What does the function `glClearColor(1.0, 1.0, 1.0, 1.0)` set in OpenGL?

a)

Background color

b)

Line color

c)

Projection matrix

d)

Texture mapping

60.

What is the purpose of the function `glColor3f(1.0, 0.0, 0.0)` in OpenGL?

a)

Sets the background color

b)

Sets the line color

c)

Sets the transparency level

d)

Sets the viewport dimensions

61.

What does the function `gluOrtho2D(0.0, 500.0, 0.0, 500.0)` define in OpenGL?

a)

A 3D perspective projection

b)

A 2D orthographic projection

c)

A texture mapping setup

d)

A lighting configuration

62.

What is a callback function?

a)

A function that is called when a specific event occurs

b)

A function that runs continuously in the background

c)

A function that initializes a program

d)

A function that terminates a program

63.

What does GLUT use a callback mechanism for?

a)

To process events

b)

To manage memory

c)

To compile code

d)

To debug programs

64.

Which GLUT callback function is used when the contents of the window need to be refreshed?

a)

glutReshapeFunc()

b)

glutDisplayFunc()

c)

glutKeyboardFunc()

d)

glutIdleFunc()

65.

What is the purpose of the glutReshapeFunc() callback function in GLUT?

a)

To handle mouse button actions

b)

To refresh the contents of the window

c)

To handle window resizing or moving

d)

To detect idle state

66.

Which GLUT callback function is triggered by key actions?

a)

glutKeyboardFunc()

b)

glutMouseFunc()

c)

glutMotionFunc()

d)

glutIdleFunc()

67.

What is the role of glutIdleFunc() in GLUT?

a)

To handle mouse movements while a button is pressed

b)

To handle idle state when nothing else is going on

c)

To refresh the contents of the window

d)

To handle mouse button actions

68.

Which GLUT callback function is used to detect mouse movements regardless of the mouse button state?

a)

glutMotionFunc()

b)

glutPassiveMouseFunc()

c)

glutMouseFunc()

d)

glutIdleFunc()

69.

What is the purpose of glutMotionFunc() in GLUT?

a)

To detect mouse movements while a button is pressed

b)

To refresh the contents of the window

c)

To handle key actions

d)

To detect idle state

70.

Which function is used to register a display callback in the given code snippet?

a)

glutDisplayFunc(display)

b)

glutReshapeFunc(resize)

c)

glutKeyboardFunc(key)

d)

glutMouseFunc(mouse)

71.

What is the purpose of the function `glutReshapeFunc(resize)` in the given code snippet?

a)

To handle keyboard input

b)

To handle window resizing

c)

To handle mouse input

d)

To display graphics

72.

Which callback function is used to handle keyboard input in the given code snippet?

a)

glutDisplayFunc(display)

b)

glutReshapeFunc(resize)

c)

glutKeyboardFunc(key)

d)

glutMouseFunc(mouse)

73.

In the given code snippet, what is the main purpose of registering callback functions?

a)

To initialize variables

b)

To set up functions that respond to specific events

c)

To create a graphical user interface

d)

To compile the program

74.

What is the purpose of the Event Process Loop in an application?

a)

To initialize variables and allocate memory.

b)

To receive events and schedule callback functions.

c)

To terminate the application.

d)

To compile the application code.

75.

Which function is used to start the Event Process Loop in the given code snippet?

a)

glutMainLoop()

b)

mainLoop()

c)

startEventLoop()

d)

processEvents()

76.

Which of the following is NOT a feature of the OpenGL API mentioned in the image?

a)

Geometric Primitives

b)

Color Mode

c)

Networking Protocols

d)

Texture Mapping

77.

What is one of the features of OpenGL API that deals with modifying the position, scale, or rotation of objects?

a)

Lighting and shading

b)

Transformations

c)

Texture Mapping

d)

Color Mode

78.

Which feature of OpenGL API is responsible for applying visual effects like brightness and shadows to objects?

a)

Lighting and shading

b)

Geometric Primitives

c)

Texture Mapping

d)

Managing OpenGL’s State

79.

What does the OpenGL API use to define basic shapes like points, lines, and polygons?

a)

Color Mode

b)

Geometric Primitives

c)

Texture Mapping

d)

Lighting and shading

80.

Which feature of OpenGL API is used to manage how colors are displayed in the graphics?

a)

Color Mode

b)

Texture Mapping

c)

Transformations

d)

Lighting and shading

81.

Which of the following is an example of a primitive in OpenGL API functions?

a)

A point, line, polygon, bitmap, or image

b)

Rotation, size, perspective in 3D coordinate space

c)

RGB, RGBA, Color index

d)

Double buffering, Z-buffering, Accumulation buffer

82.

What does the transformation function in OpenGL API deal with?

a)

Accurately compute the color of any point given the material properties

b)

Rotation, size, perspective in 3D coordinate space

c)

RGB, RGBA, Color index

d)

Double buffering, Z-buffering, Accumulation buffer

83.

Which color modes are supported by OpenGL API functions?

a)

RGB, RGBA, Color index

b)

Double buffering, Z-buffering, Accumulation buffer

c)

A point, line, polygon, bitmap, or image

d)

Rotation, size, perspective in 3D coordinate space

84.

What is the purpose of materials lighting and shading in OpenGL API functions?

a)

To compute the color of any point given the material properties

b)

To handle rotation, size, and perspective in 3D coordinate space

c)

To manage double buffering, Z-buffering, and accumulation buffer

d)

To define RGB, RGBA, and Color index

85.

Which of the following is NOT a buffering technique in OpenGL API functions?

a)

Double buffering

b)

Z-buffering

c)

Accumulation buffer

d)

Texture mapping

86.

Which geometric primitive is represented by individual points?

a)

GL_LINES

b)

GL_POINTS

c)

GL_TRIANGLES

d)

GL_POLYGON

87.

What geometric primitive is formed by connecting vertices in a closed loop?

a)

GL_LINE_STRIP

b)

GL_LINE_LOOP

c)

GL_TRIANGLES

d)

GL_QUADS

88.

Which geometric primitive is used to represent a polygon with multiple vertices?

a)

GL_POLYGON

b)

GL_TRIANGLES

c)

GL_LINE_STRIP

d)

GL_POINTS

89.

What is the geometric primitive that connects vertices to form triangles?

a)

GL_TRIANGLES

b)

GL_QUADS

c)

GL_LINE_LOOP

d)

GL_POINTS

90.

What is the common characteristic of all geometric primitives?

a)

They are specified by edges.

b)

They are specified by vertices.

c)

They are specified by angles.

d)

They are specified by areas.

91.

What does the `glBegin(GLenum type)` command do in OpenGL?

a)

Marks the beginning of a vertex-data list that describes geometric primitives.

b)

Marks the end of a vertex-data list.

c)

Specifies vertex for describing a geometric object.

d)

Initializes OpenGL rendering context.

92.

What is the purpose of the `glEnd(void)` command in OpenGL?

a)

Marks the beginning of a vertex-data list.

b)

Marks the end of a vertex-data list.

c)

Specifies vertex for describing a geometric object.

d)

Clears the OpenGL buffer.

93.

What does the `glVertex*(...)` command specify in OpenGL?

a)

Specifies vertex for describing a geometric object.

b)

Marks the beginning of a vertex-data list.

c)

Marks the end of a vertex-data list.

d)

Initializes OpenGL rendering context.

94.

What does the "type" parameter in the glBegin function determine?

a)

The color of the vertices.

b)

How vertices are combined.

c)

The size of the vertices.

d)

The position of the vertices.

95.

What is the purpose of the `glBegin(GL_POLYGON)` function in the given code snippet?

a)

To set the color of the square.

b)

To define the vertices of the square.

c)

To start defining a polygon.

d)

To end the drawing of the square.

96.

Which function is used to specify the color of the square in the given code?

a)

glColor3fv(color)

b)

glBegin(GL_POLYGON)

c)

glVertex2f(0.0, 0.0)

d)

glEnd()

97.

How many vertices are defined in the given code snippet to draw the square?

a)

2

b)

3

c)

4

d)

5

98.

What is the purpose of the `glEnd()` function in the given code snippet?

a)

To end the program.

b)

To stop defining the polygon.

c)

To set the color of the square.

d)

To define the vertices of the square.

99.

What are examples of geometric primitives mentioned in the learning material?

a)

Points, lines, and polygons

b)

Circles, ellipses, and cubes

c)

Triangles, spheres, and cylinders

d)

Rectangles, squares, and hexagons