Please enable JavaScript.
Coggle requires JavaScript to display documents.
Computer Graphics - OpenGL, SDL., Graphics spaces, Camera, (GLuint…
Computer Graphics - OpenGL, SDL.
-
-
-
Rendering pipeline
-
-
Stages
Programmable
-
Characteristics
-
Goes through every fragment you've got, each individual pixel and it will perform an operation on that.
-
Place where you handle all of the lightning of the program, texturing, shadows, etc.
-
-
If you were to output a texture on the geometry shader, you could "catch it" here with the in keyword.
-
Concept
-
Characteristics
-
Takes a primitive and "emits"/outputs its' vertices to create this primitive, or even a new one.
For example, takes a square primitive and outputs the vertices of the square.
-
Can convert primitives into other stuff, like other primitives or even lines, etc.
-
-
Characteristics
-
-
-
-
For each vertex, you can pass data down the pipeline into the fragment shader.
-
Example Program
Line 3
-
vec 3 means it's a vector consisting of 3 values.
In this case, vec3 is an x, y, z point because of the pos variable name.
-
-
Non-programmable
Concept
Here everything that has been defined mathematically will be assembeled.
For example, if you are rendering triangles and you have defined 6 vertices, the vertices would become 2 triangles in this phase.
Face culling
This is the removal of sides of primitives that the user can't see. In other words, the sides that are facing away from the user, from the POV.
-
Concept
It's the process of converting 3D objects or vector images into a pixel format that is more suitable for computers to display the graphics on the screen. It converts primitives into a grid of pixels, where each pixel represents a specific color or shade.
Characteristics
-
-
-
Calculates the color or intensity of each pixel basing it on the properties of the primitives that are intersecting.
Some possible properties are: color, texture, lightning and transparency.
Concept
Series of test-runs to check if the fragment should be drawn on the screen. Might be a waste to draw it, even if we have all the data for it.
Characteristics
Test depth. It tests the depth of the fragments.
For example, if we want to draw 2 triangles on the same screen and on the same place, it will check the depth of each triangle and it won't draw the parts that are behind the first triangle, because if you can't see it, you shouldn't bother drawing it.
Color blending.
Good to create transparency effects, ej. windows.
After doing all of these tests it will write the fragment data to the Framebuffer that is currently bound. (This one is usually the default one).
Double buffering. When there are two buffers, one that the user sees and one that the user can't see. The idea is that you draw new information to the hidden buffer and then swap it out for the visible buffer.
You can also create more buffers that don't have to be in this cycle and then you can create a scene in this new buffer and attach a texture to it. This allows for very cool features.
-
-
Stages
-
Clipping
Characteristics
Removes primitives that are not visible to the user.
Avoiding making calculations and drawing things the user can't see.
-
Concept
Sets up and prepares the vertices of the primitives that are going to be rendered by the pipeline. It defines the shape.
-
-
-
-
Vocabulary
-
Vertex
Concept
It's a point in space usually defined by a user with x, y and z coordinates.
Fragments
Concept
-
Pieces of data necessary to generate a single pixel's worth of a primitive that is being drawed on the screen on the frame buffer.
-
Questions to test myself
-
Main Questions, questions that:
I can't learn from coding practice
-
-
-
What's the function of each stage of the Rendering Pipeline, what caracterizes each stage?
-
-
What are attribute pointers, what stage are they usually related to?
How do you create a VAO and VBO, what are the steps?
-
-
What do you need to do to create and code a vertex shader. What code do you need to make to create a simple program?
-
How do you write a Fragment Shader, what do you need to do to create a simple shader program?
-
Shaders
-
-
Shader Programs
Concept
Combination of many shaders that are connected to one another and will be drawn in a single call through the pipeline.
One shader program could consist of a Vertex, Tessellation, Geometry and Fragment shader, associated to one another. When we do the call in the rendering pipeline, every shader gets used.
-
-
-
-
-
-
-
-
Lightning
Types
Directional light
Concept
Like the sun, very broad and general.
-
-
-
-
-
-
-
-
-
Graphics spaces
View Space
The 3D world with all the objects/models, viewed from the camera.
-
World Space
It's the 3D world where all the objects are (like for example, all the trees, the terrain, the map)
-
Model Space
-
A place with one object located in the origin (0, 0, 0). There's nothing else (no grass, no sky, just a 3D model of a tree for example).
-
-
Camera
-
Matrices
-
Projection Matrix
-
Can apply transformations to the 3D object.
For example, scaling (making it bigger or smaller), rotation and translation (moving it).
-
-
-
View Matrix
Set of decimal (float) numbers that store the properties and attributes of the camera (like the position, orientation, perspective).
-
-
Camera class
Manage points of view better, control better the different camera views.
Control input, camera movement, optimization.
-
-
List of keywords:
- View Matrix
- Projection Matrix
- Camera Movement:
- User interaction:
- Keyboard and mouse input.
- Scroll input.
- Camera class structure:
- Initialization
- Update methods
- Encapsulation
- Performance and Optimization
- Integration with the scene
- List of keyworks and key concepts:
- VAO
- Vertex Array Object, stores the configurations of the vertex data.
- VBO
- Vertex Array Buffer. It stores the actual data in the buffer. It's like a box for the data located in the CPU.
- EBO
- Element Buffer Object. Transforms the data in the buffer to elements.
- Memory leaks.
- When you create an object but then don't remove it. The memory will be assigned but it won't be released even after you don't want to use the object anymore.
- Indices generation
- Indices that indicate to OpenGL where exactly are the vertices going to be placed (usually to create triangles).
- Vertices generation
- Generation of the actual vertices that will be placed to create a mesh for an object (a terrain, for example).
- Texture coordinates
- Texture loading
- When you load a texture image, or many texture images.
- Buffer Generation
- When you create the VAO, VBO, and EBO, bind them, and then upload them.
- Resource cleanup
-
- Vertex Attribute configuration
- Set texture wrapping and filtering configurations.
- Texture image format verification
- Upload texture data to GPU.
- Mipmap
- Set transformation matrices
- Send transformation matrices to shader.
- Read shaders from source file and check for errors.
- Compilation of shaders
- Shader program
- Functions that create uniforms.
- Texture Sampling
- Fragments
- Uniforms
- Fragment Shader
- Vertex Shader
- Model space
- Clip space
- Texturing
- Applying a matrix
- Coordinate spaces
- 4D homogeneous coordinates
- Transform vertex position
- Shaders