Programming Graphics
diffuse = [1.0, 1.0, 1.0, 1.0]
specular = [1.0, 1.0, 1.0, 1.0]
position = [0.0, 3.0, 3.0, 0.0]
lmodel_ambient = [0.2, 0.2, 0.2, 1.0]
glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse)
glLightfv(GL_LIGHT0, GL_POSITION, position)
glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient)
glPushMatrix()
glTranslatef(x, y, 0.0)
glutSolidTeapot(1.0)
...
History
SAGE
History
Sketchpad
History
History
Computer Graphics Fields
Film Animation & Special Effects
Computer Graphics Fields
Design, Architecture, etc
Computer Graphics Fields
Video Games
Computer Graphics Fields
Simulation
Computer Graphics Fields
Scientific Visualization
Computer Graphics Fields
Graphics Research
Links
Links
SIGGRAPH
Ars Electronica
ZKM
ICC
Leonardo
Graphics Hardware & Software
Hardware
PC:
- CPU
- Memory
- Disk
- Graphics card
- Peripherals: keyboard, mouse, monitor
- Network, sound, etc.
Graphics card:
Hardware
Graphics Pipeline
- Program & data reside in PC memory
- CPU runs program, calling graphics commands
- Commands & data transferred to graphics card
- GPU runs shader code or "fixed functions"
- Images rendered into graphics card memory
- Video display generated from graphics card memory
Interface between CPU & graphics card:
|
- PCI Express
- AGP (1x, 2x, 4x, 8x)
|
Interface between graphics card & display:
|
- VGA
- DVI
- HDMI
- Composite, S-Video
|
Graphics APIs
API = Application Programming Interface
Python, Javascript, C++, Java, Fortran, etc are languages
OpenGL, Direct3D, etc are graphics APIs
A graphics API can be used with any language, if there's a binding
Lower-Level APIs
OpenGL, Direct3D
Very basic commands for things like:
- Drawing shapes (points, lines, triangles)
- Setting colors
- Setting positions, rotations, sizes
- Defining a view
- Loading textures
Most data management handled by application
Graphics APIs
- OpenGL
- Direct3D
- Performer
- OpenInventor
- OpenSceneGraph
- Java3D
- Virtools
- OpenDX
- AVS
This document is by Dave Pape, and is released under a Creative Commons License.