1/285
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
For this course we will be using the DEvC++ IDE. Which version of IDE does this course recommend?
BloodShed
Orwell DevCpp
MingW
GCC
Orwell DevCpp
Vertex Buffer Objects (VBOs) allow vertex data to be uploaded and stored in the video card's memory instead of the system memory.
True
False
True
Which of the following OpenGL functions generates a buffer ID?
glBindBuffer()
glGenBuffers()
glBufferData()
glEnableClientState()
glGenBuffers()
glewInit() must be called before the creation of the OpenGL window.
True
False
False
Which of the following specifies how often data in a VBO will change?
GL_STATIC_DRAW
GL_DYNAMIC_DRAW
GL_STREAM_DRAW
All of the above
All of the above
Matrix multiplication in OpenGL uses 4x4 matrices for transformations.
True
False
True
Which matrix is used to change the position of an object?
Scaling Matrix
Translation Matrix
Rotation Matrix
Identity Matrix
Translation Matrix
When using color arrays, glEnableClientState(GL_COLOR_ARRAY) must be enabled before drawing.
True
False
True
OpenGL's glVertexPointer() function defines an array of vertex data.
True
False
True
In homogeneous coordinates, if w = 1, the vector represents a direction in space.
True
False
False
Which of the following functions is used to render primitives from array data?
glDrawArrays()
glDrawBuffer()
glColorPointer()
glArrayElement()
glDrawArrays()
Using VBOs improves performance because vertex data is stored and processed on the GPU.
True
False
True
What should be called after modifying a mapped buffer object?
glBindBuffer()
glBufferData()
glUnmapBuffer()
glDisableClientState()
glUnmapBuffer()
What is the purpose of glMapBuffer() in VBOs?
To delete the buffer
To map the buffer object into the client's memory
To bind a texture
To clear the color buffer
To map the buffer object into the client's memory
When glMapBuffer() is called, it immediately returns control to the program even if the GPU is still using the buffer.
True
False
False
The glEnableClientState(GL_VERTEX_ARRAY) function is used to enable vertex array usage.
True
False
True
GLUT was originally written by.
Graydon Hoare
James Gosling
Mark Kilgard
Ivan Sutherland
Mark Kilgard
On what version of OpenGL does the original GLUT was abandoned?
3.7
1.7
2.5
4.3
3.7
It is a free-software/open source alternative to the OpenGL Utility Toolkit library.
GCC
MingW
Freeglut
LLVM
Freeglut
What does GLUT stands for?
OpenGL Utility Toolkit
OpenGL Utility Template
OpenGL User Tools
OpenGL User Graphical Text
OpenGL Utility Toolkit
In creating an OpenGL application in Dev-C++, what type of project should be selected?
DLL
Windows Application
Static Library
Console Application
Console Application
Where do you add the include and library folders of freeglut?
Project->Options->Directories
Project->Add To Project
Project->New File
Tools->Package Manager
Project->Options->Directories
What additional command line options do you include for an OpenGL program to work in Dev-C++?
-lfreeglut
-lglu32
-lopengl32
All of the above
All of the above
A command line option needed for the successful compilation of an OpenGL application.
-lfreeglut
-lopengl
-lgraphics
-lfreegl
-lfreeglut
Which of the following is the proper declaration of a pointer?
int *x;
int x;
int &x;
ptr x;
int *x;
OpenGL is best described as:
A graphics hardware device
A computer graphics rendering API
An operating system component
A programming language
A computer graphics rendering API
Which company first developed OpenGL?
Microsoft
Silicon Graphics (SGI)
IBM
Oracle
Silicon Graphics (SGI)
The first version of OpenGL was released in:
1990
1992
1994
1996
1994
OpenGL operates using which model?
Object-Oriented Model
Client-Server Model
Event-Driven Model
MVC Model
Client-Server Model
Which organization currently manages OpenGL standards?
ISO
IEEE
Khronos Group
ACM
Khronos Group
The latest version of OpenGL mentioned in the slides is:
3
4
4.5
5
4.5
In the sample OpenGL program, which function clears the screen buffer?
glEnd()
glBegin()
glClear()
glFlush()
glClear()
Which OpenGL function specifies the start of a primitive?
glStart()
glVertex()
glDraw()
glBegin()
glBegin()
What is the role of glEnd()?
Ends a list of vertices
Ends a program
Clears memory
Closes the window
Ends a list of vertices
Which OpenGL function forces buffered commands to execute?
glClear()
glBegin()
glDrawArrays()
glFlush()
glFlush()
Which keyword is used to define a function in C++?
method
func
function
No keyword required
No keyword required
What is the default return type of a function in C++ if none is specified?
void
int
float
double
void
Which of the following correctly defines a function prototype in C++?
int sum(int, int);
sum(int, int);
function sum(int, int);
prototype sum(int, int);
int sum(int, int);
What is a function that calls itself called?
inline function
overloadded function
recursive function
friend function
recursive function
Which of the following is true about inline functions?
Defined inside a class only
Compiler always expands inline functions
They reduce function call overhead
They can only return integers
They reduce function call overhead
What is the purpose of the return statement?
to stop a loop
to end a function and return a value
to return a value
to allocae memory
to end a function and return a value
Which function type does not return any value?
vois
int
double
char
vois
What happens if a function is declared but not defined in C++?
compiler ignores it
linker error occurs
it runs with default behavior
it is treated as inline
linker error occurs
Which keyword is used to define a function inside a class?
inline function
member
nothing spacial, just declare normally
func
nothing spacial, just declare normally
Which of the following allows multiple functions with the same name but different parameters?
Function overriding
Function overloading
Function templating
Operator overloading
Function overloading
What is computer graphics primarily concerned with?
Group of answer choices
Editing audio
Writing novels
Managing databases
Creating and manipulating visual content using computers
Creating and manipulating visual content using computers
Which programming language is widely used for graphics due to performance and memory control?
Group of answer choices
Ruby
C++
Python
Java
C++
What does GPU stand for?
Group of answer choices
Global Performance Utility
Graphics Processing Unit
Graphical Programming Utility
General Processing Unit
Graphics Processing Unit
Which of the following is a raster graphics format?
Group of answer choices
DWG
SVG
Postscript
PNG
PNG
Which graphics type is scalable without loss of quality?
Group of answer choices
Bitmap
Raster
Pixmap
Vector
Vector
Who is considered a pioneer of computer graphics?
Group of answer choices
Alan Turing
John Carmack
Ivan Sutherland
Tim Berners-Lee
Ivan Sutherland
What is the aspect ratio of a screen with 4 horizontal units and 3 vertical units?
Group of answer choices
1:1
3:4
16:9
4:3
4:3
Which application area uses computer graphics for virtual surgery simulations?
Group of answer choices
Scientific Visualization
Medical Visualization
AR
CAD
Medical Visualization
What does VRAM stand for?
Group of answer choices
Video RAM
Visual RAM
Variable RAM
Virtual RAM
Video RAM
Which bit depth supports 256 tones?
Group of answer choices
4-bit
8-bit
24-bit
16-bit
8-bit
Which rendering algorithm introduced in 1980 simulates global illumination using ray tracing?
Group of answer choices
Anti-aliasing
Ray tracing
Z-buffer
Radiosity
Ray tracing
Which graphics pioneer developed the Sketchpad system?
Group of answer choices
Sutherland
Catmull
Blinn
Warnock
Sutherland
Which lighting model includes ambient, diffuse, and specular components?
Group of answer choices
Gouraud
Phong
Lambert
Blinn
Phong
What is the primary advantage of vector graphics over raster graphics?
Group of answer choices
Smaller file size
Better color depth
Scalability without pixelation
Faster rendering
Scalability without pixelation
Which algorithm solves the visibility problem by sorting surfaces?
Group of answer choices
Z-buffer
Warnock
Appel
Sutherland
Sutherland
Which rendering equation was introduced by Kajiya in 1986?
Group of answer choices
Radiosity
Rendering equation
Ray tracing
Shade trees
Rendering equation
Which bit depth supports over 16 million tones?
Group of answer choices
24-bit
32-bit
8-bit
16-bit
24-bit
Which file format is used for vector graphics in web applications?
Group of answer choices
TIFF
SVG
PNG
JPG
SVG
Which graphics concept studies how humans perceive light and visual information?
Group of answer choices
Simulation
Perception
Visualization
Rendering
Perception
Which graphics technique uses physics to animate models over time?
Group of answer choices
Shading
Modeling
Rendering
Simulation
Simulation
What is one purpose of using functions in programming?
Group of answer choices
To increase memory usage
To reuse abstractions
To complicate the code
To make the program longer
To reuse abstractions
The sqrt() function calculates the square root of a number.
Group of answer choices
False
True
True
Which of the following is a function with no return value and no parameter?
Group of answer choices
int addTwoNumbers(int n1, int n2)
void displayHello()
void printit(int x)
int addTwo()
void displayHello()
The int main() function is the only required function in a C++ program.
Group of answer choices
False
True
False
What does the fabs() function return?
Group of answer choices
The logarithm of a number
The floor of a number
The absolute value of a floating-point number
The cube root of a number
The absolute value of a floating-point number
The pow(x, y) function raises x to the power of y.
Group of answer choices
False
True
True
What is the output of cout << "Hello World..." << endl;?
Group of answer choices
Hello World...
"Hello World..."
cout
endl
Hello World...
What is a function prototype?
Group of answer choices
A declaration that tells the compiler about a function's valid input and output
The main part of a function
The body of a function
A variable that stores a function
A declaration that tells the compiler about a function's valid input and output
What is the value of cbrt(27.0)?
Group of answer choices
-3.0
9.0
3.0
27.0
3
Which of the following is a purpose of the return statement?
Group of answer choices
It tells the computer to leave the function immediately.
It tells the computer to call another function.
It tells the computer to ignore the function.
It tells the computer to repeat the function.
It tells the computer to leave the function immediately.
What is the value of addTwoNumbers(10, 100) given the example code in the presentation?
Group of answer choices
100
50
110
10
110
Which of the following is a key characteristic of a well-defined function according to the presentation?
Group of answer choices
It should perform a single well-defined task.
It should always have a return value.
It should have multiple purposes.
It should be as long as possible.
It should perform a single well-defined task.
Which of the following are examples of functions with a parameter and a return value?
Group of answer choices
void displayHello()
void displaySomething(string str, int count)
int addTwo()
int addTwoNumbers(int n1, int n2)
int addTwoNumbers(int n1, int n2)
What is the output of fmod(13.657, 2.333)?
Group of answer choices
1.992
1.991
13.657
11.324
1.992
What is the output of addTwoNumbers(addTwo(), 100) given the example code?
#include
#include
#include
int result;
int addTwo() {
return 15;
}
int addTwoNumbers(int a, int b) {
return a + b;
}
void display() {
glClear(GL_COLOR_BUFFER_BIT);
std::string text = "Result = " + std::to_string(result);
glColor3f(1.0f, 1.0f, 1.0f);
glRasterPos2f(-0.2f, 0.0f);
for (char c : text) {
glutBitmapCharacter(GLUT_BITMAP_HELVETICA_18, c);
}
glFlush();
}
int main(int argc, char** argv)
result = addTwoNumbers(addTwo(), 100);
std::cout << "Result = " << result << std::endl;
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
glutInitWindowSize(400, 200);
glutCreateWindow("Function Output Example");
glClearColor(0.0, 0.0, 0.0, 1.0); // background = black
glutDisplayFunc(display);
glutMainLoop();
return 0;
}
115
What is the purpose of the using namespace std; statement?
Group of answer choices
It creates a new namespace called std.
It includes the standard input/output library.
It is a required part of all C++ programs.
It allows the program to use identifiers from the std namespace without the std:: prefix.
It allows the program to use identifiers from the std namespace without the std:: prefix.
Which of the following is an example of an int function with no parameters?
Group of answer choices
int addTwo()
void printit()
int addTwoNumbers(int n1, int n2)
void displaySomething(string str, int count)
int addTwo()
What does the return 0; statement in int main() typically signify?
Group of answer choices
The program executed successfully.
An error occurred.
The program is about to loop.
A value of 0 is being returned.
The program executed successfully.
A function's "contract" defines its inputs and outputs.
Group of answer choices
False
True
True
What is the value of floor(-9.8)?
Group of answer choices
9.0
10.0
-9.0
-10.0
-10
What does OpenGL stand for?
Group of answer choices
Open Game Library
OpenGL Application
Open Graphics Language
Open Graphics Library
Open Graphics Library
The OpenGL rendering pipeline is a sequence of stages that processes 3D data to produce a 2D image.
Group of answer choices
True
False
True
Which of the following is a fixed-function stage of the OpenGL rendering pipeline?
Group of answer choices
Geometry Shader
Vertex Shader
Fragment Shader
Rasterization
Rasterization
Which company first developed OpenGL?
Group of answer choices
Silicon Graphics
Microsoft
NVIDIA
Khronos Group
Silicon Graphics
The Geometry Shader is a mandatory stage of the rendering pipeline.
Group of answer choices
True
False
False
What is the purpose of the Fragment Shader?
Group of answer choices
To convert primitives into fragments
To process vertex data
To assemble primitives
To determine the final color of a fragment
To determine the final color of a fragment
Which of the following is a geometric primitive in OpenGL?
Group of answer choices
Textures
Spheres
Polygons
Pixels
Polygons
What is a "programmable stage" in the OpenGL pipeline?
Group of answer choices
A stage that cannot be changed
A stage where developers can write custom code called shaders
A stage that only uses fixed functions
A stage for memory management
A stage where developers can write custom code called shaders
What does the glutCreateWindow() function do?
Group of answer choices
Sets the window size
Initializes the OpenGL library
Creates a window on the screen with a specified title
Creates a new thread for the program
Creates a window on the screen with a specified title
What is the purpose of the glFlush() command?
Group of answer choices
To create a new primitive
To clear the color buffer
To close the window
To force buffered OpenGL commands to execute
To force buffered OpenGL commands to execute
What is the Khronos Group?
Group of answer choices
A company that manufactures GPUs
The original developer of OpenGL
An industry consortium that manages open, royalty-free standards
A library for creating 3D graphics
An industry consortium that manages open, royalty-free standards
The glutInit() function must be called before other GLUT and OpenGL functions.
Group of answer choices
False
True
True
What is the purpose of glVertex2f()?
Group of answer choices
To draw a line
To specify a color
To end a list of vertices
To specify the location of a vertex
To specify the location of a vertex
What is the purpose of glutMainLoop()?
Group of answer choices
To define a callback function
To enter an infinite event-processing loop
To clear the window
To draw the primitives
To enter an infinite event-processing loop
What is the term for a property that determines how a primitive is displayed by OpenGL?
Group of answer choices
Primitive
Attribute
Mask
Vertex
Attribute