06 - OpenGL Flashcards

1
Q

What are the “Naming Conventions” for “OpenGL Functions”, “OpenGL Constants”, “OpenGL Types”

A

OpenGL Functions => gl
OpenGL Constants => GL_
OpenGL Types => GL

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

Why are “GL_POINTS” and “GL_LINES” ugly? How to fix it

A
  • infinity width => no anti-aliasing
  • fix: use thin triangles
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How does the “Vertex Shader” work

A
  • transform each vertex individually (e.g. “Gouraud Shading”)
    => better for transformations (only vertices of object must be moved, not all pixels in a fragment)
  • can’t add or delete vertices
  • input: vertex with attributes
  • output: vertex with attributes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How do the “Primitive Assembly” and “Tessellation Shader” work

A

“Primitive Assembly”
- input: n vertices
-> compose requested primitives
-> special case: GL_PATCH

“Tessellation Shader”
- uses GL_PATCH
- how should patches be subdivided
- how should the result be shaded

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

How does the “Geometry Shader” work? What other parts (not programmable) work with it?

A
  • extend, remove, transform primitives
  • also:
    – clipping (result will be de-homogenized)
    – rasterization (outputs fragments)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How does the “Fragment Shader” work? What other parts (not programmable) work with it?

A
  • input: 1 fragment
  • output: 0-1 fragments
  • can discard
  • per-pixel shading (e.g. Phong-Shading)
  • per-pixel sampling (e.g. volume rendering -> ray casting)

-also:
– per fragment operations

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

What is the “Transform Feedback”

A
  • writes result of geometry processing to a buffer
  • buffer can be put into the pipeline by CPU
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How does the “Compute Shader” work

A
  • input: indices
    => called by indices
  • execution of compute shader organized in grid of workgroups
  • indices say what workgroups run with what threads
    => massive parallel execution

IMPORTANT: Not in the pipeline

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