Correct Answer: True
Note: This Question is unanswered, help us to find answer for this one
Which color is defined by the following call?
glColor4f (0.0, 0.0, 1.0, 0.0);
red
Green
white
yellow
None of the above
Correct Answer: None of the above
What will be drawn by the following code?
glBegin (GL_QUADS);
glVertex2i (1, 0);
glVertex2i (1, 1);
glVertex2i (-1, 0);
glVertex2i (-1, 1);
glEnd ();
A quad
A triangle
Two lines
A circle
Correct Answer: No
Correct Answer: Yes
Correct Answer: False
Correct Answer: Modelview
Correct Answer: void
Correct Answer: The texture space will be allocated for future use with sub-textures
Correct Answer: Circle
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);
True
False
Correct Answer: C++
Correct Answer: in
Correct Answer: All of the above
Correct Answer: Projection
Correct Answer: It defines a projection matrix
Correct Answer: To associate a texture coordinate with a vertex or raster position
Correct Answer: Using glInitNames ()
Correct Answer: GL_DEPTH
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);
glColor3f (1.0, 1.0, 0.0);
glFlush ();
}
Yes
No
Correct Answer: Layer composition
Correct Answer: A variable passed from the vertex shader to the fragment shader
Correct Answer: It draws a bitmap
Correct Answer: Synchronization with the monitor refresh rate
Correct Answer: glX
Correct Answer: wgl
Correct Answer: PolygonLines
Note: This question has more than 1 correct answers
Correct Answer: GL_UNSIGNED_INT_8_8_8_8_REV
Correct Answer: GL_SELECT
Correct Answer: glUniform1i
Is the following code valid?
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;
They are equivalent
The former has a syntax error whereas the latter has not any
The former is valid whereas the latter is not
Correct Answer: They are equivalent
Correct Answer: The angle in degrees
glColor3f (1.0, 0.0, 0.0);
blue
gray
green
Correct Answer: blue
Correct Answer: It has numerous implementationsIt can be fully implemented in software
What should be added to make this drawing function valid?
glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
It is already valid
glPushMatrix ()
glLoadIdentity ()
glPopMatrix ()
Correct Answer: glPushMatrix ()
Correct Answer: It changes the active texture unit
Correct Answer: Vertex buffer objects
Correct Answer: It multiplies the current matrix by a perspective matrix
Correct Answer: projection
Correct Answer: SGI
Correct Answer: glVertex
Correct Answer: OpenGL cannot read images directly
Correct Answer: Back buffers Select buffers
Correct Answer: A list of commands
What is true of the following code?
glPushMatrix ();
glTranslatef (1.0, 2.0, 4.0);
glPopMatrix ();
After this code has been executed, the matrix stack will be restored to its original state.
This code has a syntax error.
Load identity cannot appear after a push matrix.
None of the above is true
Correct Answer: After this code has been executed, the matrix stack will be restored to its original state.
Correct Answer: 4x4
Correct Answer: 2.0
Correct Answer: It places a marker in the feedback buffer
Correct Answer: glColor
What will be the size of the quad drawn by the following code on the screen?
1 pixel
1 cm
1 inch
Correct Answer:
Is the following code correct?
glEnd (GL_QUADS);
Correct Answer: It gets minimum and maximum pixel values
Correct Answer: GL_NEARESTGL_LINEAR
What will happen if you do the following?
glMatrixMode (GL_PROJECTION);
glRotatef (10, 1, 0, 0);
A bus error will result
An OpenGL error will result
A rotation matrix is multiplied with the current projection matrix
The projection matrix will be filled with garbages
Correct Answer: A rotation matrix is multiplied with the current projection matrix
Correct Answer: An attribute
Correct Answer: C
Correct Answer: GL_QUADS_FAN
Correct Answer: It clears the OpenGL buffers specified in an argument
Correct Answer: glTexImage2D
Consider the following code:
glTranslatef (1.0, 2.0, 3.0);
glRotatef (40, 1.0, 0.0, 0.0);
What will be the first transformation from a geometric point of view?
Translation
Rotation
Correct Answer: Rotation
Is the following a valid drawing function?
gluPerspective (45.0, (float)frame.size.width / (float)frame.size.height,
2.0, 1000.0);
Correct Answer: Column-major
glColor3ub (0, 255, 0);
Correct Answer: green
A polygon
A line
This code is invalid
Correct Answer: This code is invalid
Correct Answer: glLoadTransposeMatrix transposes the given matrix before loading it wheras glLoadMatrix does not
Correct Answer: glRotate
If the viewport is 1024 by 768, the projection matrix is a 45 degree perspective matrix with the viewport ratio and the modelview matrix is the identity, what will be drawn on the screen when the following drawing code is entered?
Yellow lines
Yellow square
Yellow rectangle
This code is an invalid drawing function
Correct Answer: Yellow rectangle
Correct Answer: Solarize
Correct Answer: 4
Correct Answer: Storing data in GRAM with functions such as glDrawPixels, glTexImage2d
Correct Answer: Multisampling is a method of doing anti-aliasing (and scaling) which is still in use but is deprecated
Correct Answer: Light
Correct Answer: Baked geometry
Correct Answer: Additive
Correct Answer: A deprecated set of functions that permit the user to quickly learn the basic building blocks of OpenGL
Correct Answer: A logical operation applied between RGBA color and RGBA color at the corresponding location.
Correct Answer: Primitives can be redrawn from display lists. Hence, no information is lost.
Correct Answer: Nothing
Correct Answer: Display List
Correct Answer: No, most of the time.
Correct Answer: column-major
Correct Answer: 1
Correct Answer: No.
Correct Answer: It is hardware specific and can be queried using glGet.
Correct Answer: It tells OpenGL how to mix fragments in a logical order.
Correct Answer: Yes with a simple matrix multiplication.
Correct Answer: To limit the drawing area.
Correct Answer: Once drawn, primative information is lost. To redraw, the primatives are drawn by reexecuting the display function.
Correct Answer: FALSE, shaders replaced this functionality.
Correct Answer: An array typecasted with (GLvoid *) or in the type indicated by the preceding letter.
Correct Answer: glUseProgram(ProgramID);
Correct Answer: EXT and ARB functions are not yet integrated into the "core" feature set and are considered experimental but candidate
Correct Answer: Vertex Array
Correct Answer: "Core" is the stuff that comes recommended in the specification for the version you are writing for, while "compatibility" uses deprecated functions or functions from other versions that are not backward compatible.
Correct Answer: void main() {}
Correct Answer: #version
Correct Answer: Vertex and fragment.
Correct Answer: Also known as a "per-pixel" operation (applicable in some cases), "per-fragment" more accurately describes an operation that occurs through each requested "fragment" by pipelines that deal directly with screen graphics
Correct Answer: Coordinate components
Correct Answer: Geometry, Tesselation, Vertex and Fragment
Correct Answer: 1 (unit length)
Correct Answer: There are several books on OpenGL, but the two most revered are the "red" and "blue" books, and the "orange" book was published to cover shader technologies by a third party.
Correct Answer: Khronos
Correct Answer: Not in the official specification, but such functionality is provided by the GLUT library.
Correct Answer: They are optimized out and removed by the compiler on most platforms.
Correct Answer: Vertex Buffer Object
Correct Answer: As newer versions are released, older versions with functionality that can be created in the newer version but faster through other methods must be deprecated but are still a part of the specification on most hardware platforms.
Correct Answer: Yes, apply inverse of M.
Correct Answer: Mathematical operation used to create a desired behavior for points and objects.
Correct Answer: Triangles, Triangle Strips and Triangle Fans
OpenGL MCQs | Topic-wise