Chapter 1 Continued
- I am starting at 1.7, Graphics architectures.
- On page 28/29 he presents three different potential architectures.
- The first is a "traditional" graphics system.
-
- The host is a traditional computer
- DAC: Digital to Analog Converter, a bad old graphics system.
- Probably supported basic canvas functions like we are using.
- Display
- In this system, the CPU was responsible for everything but drawing lines.
- And this transfer took place via a slow bus.
- In a game, the CPU had to generate and draw all of the triangles, as well as everything else.
- The second is a more modern system.
- The next step was the Display Processor
-
- The CPU would generate a display list and send it to the processor.
- The display list could be stored in the display processor's memory
- The CPU might change some parameters
- And the image could be redrawn with a simple call
- Thus the data needed to be transferred once
- Somewhat of a client-server model.
- The third architecture is the modern architecture
- The image is mostly the same as the last one.
- But the system implements a graphics pipeline
- The CPU sends a list of vertexes to the processor.
- These may or may not be stored in the GPU
- The coordinates of vertexes are changed, and other transformations may occur in the vertex processor
- This is at least a matrix vector multiplication
- We can also assign colors (but this is not the normal place)
- We can do many other things as well.
- Because we can write a program to run at this stage of the pipeline.
- This program is called the vertex shader
- The clipping processor
- Clips the lines so they fit into the drawing area.
- Called the clipping volume
- This is performed on triangles and other primitives
- We will see later how this is done.
- Rasterization transforms primitives into fragments
- Fragments are potential pixels.
- But they have additional information (such as depth, color properties, ...)
- This is programmable in modern GPUs as well.
- Fragment Processing occurs last
- Potential pixels are discarded
- or proper lighting is applied.
- Or anything else, this is programmable as well.
- OpenGL
- A cross language cross platform application programming interface (API)
- Started by SGI, currently managed by the Khronos Group.
- Provides calls for rendering 2D and 3D graphics.
- There have been four major and many many minor versions of OpenGL
- OpenGL 2.0 introduced the GLSL (OpenGL Shading Language) which allowd programming of the graphics card.
- The latest version is OpenGL 4.6, in 2017
- WebGL
- A javascript API compatible with "all standard web browsers"
- Supports shader code (OpenGL ES Shading Language (GLSL ES))
- GLSL ES is executed on the GPU
- 2.0 and above are based on OpenGL ES 3.0
- It does not support deprecated OpenGL 1.x functions.
- Has some helper libraries,
- Used by Unreal and Unity among others.
- The WebGL pipeline
- As describe above
-
- Two terms
- immediate mode graphics: primitives are specified in the program and immediately sent through the pipeline for display
- retained mode graphics: primitives are stored on the GPU
- Read Chapter 1.