NEW
Font size
WorksheetsCS0045 M3-M4
Total questions: 60
Worksheet time: 30mins
The function call glutDisplayFunc(display) is a callback function where display() is called only once in the whole lifetime of a program
True
False
How many bits does the glLineStipple() function pattern represent to describe a line pattern
64
16
32
8
What does the number suffix in the glVertex2f() function is referring to?
No of function parameters
The maximum value of the coordinates
No of colors to be used
None of the above
What does the letter f suffix in the glVertex2f() function is referring to?
The data type of the coordinates
Tells that you are specifying a position
The last character f is mandatory for using glVertex
None of the above
You use the command glVertex2fv() when you refer to a data that is in the array?
True
False
The color blue is represented by the command glColor3f(1.0f,0.0f,0.0f)
True
False
OpenGL uses an object-oriented framework to make its functions easy to use
True
False
The color black is represented by the command glColor3f(1.0f,1.0f,1.0f)
True
False
The color white is represented by the command glColor3f(0.0f,0.0f,0.0f)
True
False
It is required for OpenGL to enable Line Stippling before changing the line style pattern
True
False
The command used to enable line style pattern in OpenGL
GL_LINE
GL_LINE_LOOP
GL_LINE_STIPPLE
GL_LINE_PATTERN
In the glColor3f() function what does the 1st parameter represent
Green
Blue
Red
Alpha
In the glColor3f() function what does the 3rd parameter represent
Green
Blue
Red
Alpha
In the glColor3f() function what does the 2nd parameter represent
Green
Blue
Red
Alpha
OpenGL was first developed at
Apache
Oracle
SGI
is an OpenGL function species that end of a list of vertices
glEnd()
glBegin()
glVertex()
glClear()
is an OpenGL function species the location of the vertex
glFlush()
glBegin()
glVertex()
glClear()
is an OpenGL function force previously buffered OpenGL commands to execute
glFlush()
glBegin()
glVertex()
glClear()
is an OpenGL function clears all buffers whose bits are set in mask. GL_COLOR_BUFFER_BIT refers to the color buffer
glFlush()
glBegin()
glVertex()
glClear()
is an OpenGL function specifies the beginning of an object of type mode. Modes include GL_POINTS, GL_LINES, and GL_POLYGON
glFlush()
glBegin()
glVertex()
glClear()
The glutInitWindowPosition(0,0) makes the upper left corner of the window as a reference to be placed at what position in the screen
Upper Left
Bottom Left
Upper Right
Bottom Right
In the OpenGL Rendering pipeline it is where shapes are being corrected for possible detection of gaps on the surface so there would be no gaps
Tesselation
Rasterization
Per-Sample Operations
Primitive Assembly
In the OpenGL Rendering pipeline it is the process whereby each individual primitive is broken down into discrete elements called fragments, based on the sample coverage of the primitive.
Tesselation
Rasterization
Per-Sample Operations
Primitive Assembly
In the OpenGL Rendering pipeline it is where fragment shaders are processed, and their resulting data are written to various buffers.
Tesselation
Rasterization
Per-Sample Operations
Primitive Assembly
In the OpenGL Rendering pipeline it is where the parts of the primitive that are determined to be potentially visible are sent to a fixed-function subsystem called the rasterizer
Vertex Post Processing
Rasterizer
Per-Sample Operations
Primitive Assembly
In the OpenGL Rendering pipeline it is the stage where the vertex outputs of the vertex processing undergo a variety of operations.
Vertex Post Processing
Rasterizer
Per-Sample Operations
Primitive Assembly
In the OpenGL Rendering pipeline it is where increases the number of polygons to smoothen out the object
Tesselation
Rasterization
Geometry Shader
Primitive Assembly
In the OpenGL Rendering pipeline it is the shader stage that will process a fragment generated by the rasterization into a set of colors
Tesselation
Fragment Shader
Geometry Shader
Primitive Assembly
In the OpenGL Rendering pipeline it is the stage that handles the processing of individual vertices
Vertex Shader
Per-Sample Operations
Primitive Assembly
Vertex Post Processing
In the OpenGL Rendering pipeline it is the stage where we describe certain attributes, like the position of a point in 2D or 3D space, or multiple points on a surface
Vertex Specification
Per-Sample Operations
Primitive Assembly
Vertex Post Processing
The glutInitWindowSize(param1,param2) parameters specifies the ______ of a window
Bottom, Top
Width, Height
Height, Width
Top, Bottom
OpenGLs architecture is a client-server model where the client is the application and the server is the
Video Card
Device Driver
Code Server
Internet Server
OpenGL is a computer graphics rendering
Software
Tool
Engine
API
What year does the first version of OpenGL was released
1991
1993
1994
1992
A glut function that makes the program to enter an infinite event-processing loop. It should be the last statement in the main() function
glutMainLoop()
glutInit()
glutCreateWindow()
glutDisplayFunc()
GL_POINTS needs two glVertex2f() commands to render a point
True
False
GL_LINES needs two glVertex2f() commands to render a line
True
False
What is the minimum number of vertex specification in using GL_QUADS
3
4
2
5
If the number of vertices specified for GL_TRIANGLES is not multiples of 3. What will happen to the rendered triangle
Nothing will be rendered
A compilation error will occur
A runtime error will occur
A triangle will be rendered and the excess vertex will be ignored
OpenGL was designed to be
Object-Oriented
Window System Independent
Fast and Lightweight
All of the above
OpenGL was designed to be
Object-Oriented
Operating System Independent
Fast and Lightweight
All of the above
Shaders are required to create an OpenGL application
True
False
How many OpenGL Primitives are there in the OpenGL API?
10
9
7
8
What is the minimum number of vertex specification in using GL_POLYGON
4
2
3
5
is a user defined program designed to run on some stage of a graphics
Material
Shader
Texture
Lighting
What group is responsible for managing the OpenGL specification
Apache
Khronos
SGI
is the header file to be included to use the GLUT library
gl.h
glut.h
opengl.h
freeglut.h
Use this to render mathematical points. It also renders a point for each vertex specified.
GL_POINTS
GL_LINES
GL_QUADS
GL_POLYGON
GL_TRIANGLES
Use this to draw a single filled convex n-gon primitive. It also renders an n-sided polygon. If n is less then 3, it will not render anything
GL_POINTS
GL_LINES
GL_QUADS
GL_POLYGON
GL_TRIANGLES
Use this to draw individual convex quadrilaterals. It renders a quadrilateral for each group of 4 vertices
GL_QUADS
GL_QUAD_STRIP
GL_QUAD_LOOP
Use this to draw a sequence of quadrilaterals that share edges.
GL_QUADS
GL_QUAD_STRIP
GL_QUAD_LOOP
Use this to draw individual triangles. It also renders a triangle for each group of 3 vertices
GL_TRIANGLE_STRIP
GL_TRIANGLE_FAN
GL_TRIANGLES
Use this to draw sequence of triangles that share edges
GL_TRIANGLE_STRIP
GL_TRIANGLE_FAN
GL_TRIANGLES
Use this to draw a fan of triangles that share edges and also share a vertex. Each triangle shares the first vertex specified
GL_TRIANGLE_STRIP
GL_TRIANGLE_FAN
GL_TRIANGLES
Use this primitive to draw unconnected line segments. OpenGL draws a line segment for each group of 2 vertices
GL_LINES
GL_LINE_STRIP
GL_LINE_LOOP
Use this primitive to draw a sequence of connected line segments. OpenGL renders a line segment between the 1st and 2nd vertices
GL_LINES
GL_LINE_STRIP
GL_LINE_LOOP
Use this primitive to close a line strip. OpenGL renders a line segment between the 1st and 2nd vertices with the addition of a closing line segment between the final and first vertices
GL_LINES
GL_LINE_STRIP
GL_LINE_LOOP
glLineStipple syntax
glLineStipple(repeatFactor, pattern)
glLineStipple(pattern, repeatFactor)
glLineStipple(repeatFactor, patternFactor)
glLineStipple(patternFactor, repeatFactor)
default value of glLineWidth
1.0
0.0
2.5
5.0
sets the fixed width of lines
glLine
glLineWidth
glLineLength
glLineVertex
