DA 3 - CS0045 || CANVAS

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/30

encourage image

There's no tags or description

Looks like no tags are added yet.

31 Terms

1
New cards

Which function specifies how VBO vertex data should be implemented?

Group of answer choices

glDeleteBuffer()

glBufferData()

glVertexPointer()

glGenBuffers()

glVertexPointer()*

2
New cards

The polygon example is described as displaying a _______.

Group of answer choices

cube

hexagonal figure

line loop

triangle

triangle*

3
New cards

Matrix values are indexed using ________.

Group of answer choices

x only

vertex and color

row and column

column only

row and column*

4
New cards

The polygon example contains how many vertices?

Group of answer choices

6

3

4

18

3*

5
New cards

Which pointer function appears with the GL_NORMAL_ARRAY state in the indexed sample?

Group of answer choices

glNormalPointer()

glColorPointer()

glRasterPos2f()

glIndexPointer()

glNormalPointer()*

6
New cards

A matrix is described as a rectangular array similar to a ____.

Group of answer choices

two-dimensional array

linked list

callback

single scalar

two-dimensional array*

7
New cards

Translating (10,10,10,1) by +10 in X produces an X coordinate of ____.

Group of answer choices

20

10

0

100

20*

8
New cards

A homogeneous vector (x,y,z,0) represents a ____.

Group of answer choices

direction

translation

color

position in space

direction*

9
New cards

Which function uploads an array's data to graphics-card memory?

Group of answer choices

glBufferData()

glBindBuffer()

glDrawArrays()

glEnableClientState()

glBufferData()*

10
New cards

Which function generates buffer object IDs?

Group of answer choices

glDeleteBuffers()

glBindBuffer()

glBufferData()

glGenBuffers()

glGenBuffers()*

11
New cards

When value reaches 10 in modifyPolygon(), the program deletes the buffer and ____.

Group of answer choices

exits

creates a second window

changes its color

switches to GL_POINTS

exits*

12
New cards

Which OpenGL vertex form is related to homogeneous coordinates in the slides?

Group of answer choices

glVertex4f

glRasterPos2f

glColor4f

glVertex2f

glVertex4f*

13
New cards

OpenGL uses what matrix size for transformations according to Module 6?

Group of answer choices

4 x 3

2 x 2

4 x 4

3 x 3

4 x 4*

14
New cards

What requirement must be met to add or subtract two matrices?

Group of answer choices

They must have different dimensions

They must both be 4x4

They must contain only integers

They must have exactly the same row and column dimensions

They must have exactly the same row and column dimensions*

15
New cards

What access mode is used by glMapBuffer() in the modification sample?

Group of answer choices

GL_VERTEX_ARRAY

GL_STREAM_DRAW

GL_STATIC_DRAW

GL_READ_WRITE

GL_READ_WRITE*

16
New cards

Which usage hint is appropriate for data modified once and used many times?

Group of answer choices

GL_STATIC_DRAW

GL_DYNAMIC_DRAW

GL_READ_WRITE

GL_STREAM_DRAW

GL_STATIC_DRAW*

17
New cards

Which target is used for an index buffer with glDrawElements()?

Group of answer choices

GL_ELEMENT_ARRAY_BUFFER

GL_ARRAY_BUFFER

GL_VERTEX_ARRAY

GL_NORMAL_ARRAY

GL_ELEMENT_ARRAY_BUFFER*

18
New cards

Which library is used in the module to simplify access to extended OpenGL functions?

Group of answer choices

GLUT only

SDL

DirectX

GLEW

GLEW*

19
New cards

The program enters glutMainLoop() after glewInit() returns ____.

Group of answer choices

GLEW_OK

GLUT_OK

GLEW_STATIC

GL_TRUE

GLEW_OK*

20
New cards

VBOs improve performance mainly because vertex data can reside in ____ memory.

Group of answer choices

window

keyboard

video device

system-only

video device*

21
New cards

The polygon's vertex array contains how many GLfloat coordinate values?

Group of answer choices

6

24

12

18

12*

22
New cards

Which function maps the polygon VBO before the translation calculations modify it?

Group of answer choices

glVertexPointer()

glMapBuffer()

glBufferSubData()

glDrawArrays()

glMapBuffer()*

23
New cards

Which variables hold the translated coordinate results before they are written back?

Group of answer choices

tx, ty, tz

px, py, pz

rx, ry, rz

sx, sy, sz

tx, ty, tz

24
New cards

Which usage hint describes data modified once and used at most a few times?

Group of answer choices

GL_DYNAMIC_DRAW

GL_WRITE_ONLY

GL_STREAM_DRAW

GL_STATIC_DRAW

GL_STREAM_DRAW*

25
New cards

Which usage hint is appropriate for data modified repeatedly and used many times?

Group of answer choices

GL_STREAM_DRAW

GL_READ_ONLY

GL_DYNAMIC_DRAW

GL_STATIC_DRAW

GL_DYNAMIC_DRAW*

26
New cards

Which drawing function uses the index buffer?

Group of answer choices

glDrawElements()

glVertexPointer()

glArrayElement()

glDrawArrays()

glDrawElements()*

27
New cards

Why is GL_DYNAMIC_DRAW used in the updateable triangle sample?

Group of answer choices

The program draws only once

The buffer stores only indices

The data never changes

The data is expected to be modified repeatedly and used many times

The data is expected to be modified repeatedly and used many times*

28
New cards

In the translation matrix template, x, y, and z translation values appear in the ____ column.

Group of answer choices

third

first

fourth

second

fourth*

29
New cards

Which primitive is used to draw the six faces of the sample cube?

Group of answer choices

GL_LINES

GL_TRIANGLES

GL_QUADS

GL_POINTS

GL_QUADS*

30
New cards

Which ordering correctly prepares a VBO containing vertices plus added color data?

Group of answer choices

glBufferData -> glBufferSubData -> enable arrays -> set pointers

set pointers -> delete buffer -> glBufferData -> glBegin

glArrayElement -> glGenBuffers -> glBufferSubData -> glewInit

enable arrays -> glBufferSubData -> glBufferData -> delete buffer

glBufferData -> glBufferSubData -> enable arrays -> set pointers*

31
New cards