OpenGL ES Flashcards

1
Q

What is the signature of glFoo3fv?

A

glFoo3fv(… const GLFloat* arg1);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the signature of glFoo2ub?

A

glFoo2ub(… const GLByte arg1, const glByte arg2);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is glUniform(GLint location, …)?

A

glUniform modifies the value of a uniform variable or a uniform variable array. The location of the uniform variable to be modified is specified by location, which should be a value returned by glGetUniformLocation. glUniform operates on the program object that was made part of current state by calling glUseProgram.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
void glDrawArrays(	GLenum mode,
 	GLint first,
 	GLsizei count)
A

glDrawArrays specifies multiple geometric primitives with very few subroutine calls. Instead of calling a GL procedure to pass each individual vertex, normal, texture coordinate, edge flag, or color, you can prespecify separate arrays of vertices, normals, and colors and use them to construct a sequence of primitives with a single call to glDrawArrays.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the practical difference between glDrawElements and glDrawArrays?

A

glDrawElements takes advantage of vertex indexing and reuse. If vertices are reused, it will be more efficient than glDrawArrays, which sends vertices across main memory.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is void glVertexAttribPointer(GLuint index​, GLint size​, GLenum type​, GLboolean normalized​, GLsizei stride​, const GLvoid * pointer​) ?

A

glVertexAttribPointer, glVertexAttribIPointer and glVertexAttribLPointer specify the location and data format of the array of generic vertex attributes at index index​ to use when rendering.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is void glVertexAttribDivisor(GLuint index, GLuint divisor) ?

A

glVertexAttribDivisor modifies the rate at which generic vertex attributes advance when rendering multiple instances of primitives in a single draw call.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

uniform

A

Uniforms are sent to both vertex shaders and fragment shaders and contain values that stay the same across the entire frame being rendered. A good example of this might be a light’s position.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

attribute

A

Attributes are values that are applied to individual vertices. Attributes are only available to the vertex shader. This could be something like each vertex having a distinct colour. Attributes have a one-to-one relationship with vertices.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

varying

A

Varyings are variables declared in the vertex shader that we want to share with the fragment shader. To do this we make sure we declare a varying variable of the same type and name in both the vertex shader and the fragment shader. A classic use of this would be a vertex’s normal since this can be used in the lighting calculations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What does the Model matrix do?

A

It maps from object space to world space.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does the View matrix do?

A

It maps from world space to camera space.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What does the Projection matrix do?

A

It maps camera space to screen space.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is immediate mode?

A

Examples include using glBegin, glVertex, glEnd. Or glDrawArrays with a client vertex array instead of a vertex buffer object. This functionality is deprecated and does not offer good performance. Most of these are blocking function calls.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is retained mode?

A

In retained mode, you create a vertex buffer object and hand it over to the library. You can no longer manipulate it. This allows your render thread and the GPU to work asynchronously.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Gamma Correction

A

The nonlinear operation used to extract luminance from images. The goal is to allocate bits for highlights that human vision can discern and not to waste them otherwise.

17
Q

sRGB

A

1996 MS & HP color space designed to compensate for typical home and office viewing conditions

18
Q

Tile Based Deferred Rendering

A

Optimization technique to take advantage of spatial coherence. Geometry is transformed into screen-space and then screen-based tiles. GPU renders each tile separately, saving time and power.

19
Q

presentRenderBuffer

A

EAGLContext instance method. Display’s renderbuffer’s contents to the screen.

20
Q

MSAA

A

Multisample Anti-Aliasing. Pixels at the edges of polygons are sampled multiple times.

21
Q

What version of OpenGL ES is supported by iOS 7?

A

OpenGL ES 3

22
Q

What shading languages are supported by OpenGL ES 3.0?

A

GLSL 3.0. The functionality of GLSL 3.0 is a superset of all previous versions.

23
Q

What is CG?

A

CG is a shading language created by NVidia. The CG compiler outputs GLSL or HLSL programs, making it compatible with OpenGL or DirectX.