180 likes | 271 Views
Week 2: Review of graphics API. OpenGL design. Modern graphics pipeline. Modern graphics pipeline. Application. Command. Geometry. Rasterization. Texture. Fragment. Display. Modern graphics pipeline. Application. Command. Geometry. Rasterization. Texture. Fragment. Display.
E N D
Week 2: Review of graphics API OpenGL design
Modern graphics pipeline Application Command Geometry Rasterization Texture Fragment Display
Modern graphics pipeline Application Command Geometry Rasterization Texture Fragment Display
Modern graphics pipeline Application Command Geometry Rasterization Texture Fragment Display
Modern graphics pipeline Application Command Geometry Rasterization Texture Fragment Display
Modern graphics pipeline Application Command Geometry Rasterization Texture Fragment Display
Modern graphics pipeline Application Command Geometry Rasterization Texture Fragment Display
Modern graphics pipeline Application Command Geometry Rasterization Texture Fragment Display
Modern graphics pipeline Application Command Geometry Rasterization Texture Fragment Display
Modern graphics pipeline Application Application & higher level libraries world Command Geometry Rasterization Graphics API world Texture Fragment Display
OpenGL block diagram Generation Traversal Xformation Rasteriz. & tex. Display Display list Per-vertex operations & Primitive assembly Per- fragment operations Frame buffer Video display Evaluator Rasterization Application generation Application traversal Texture memory Pixel operations Application & higher level graphics libraries OpenGL implementation
OpenGL operation: conceptual model Configure how OpenGL should draw stuff Draw stuff
Configuring OpenGL “We view OpenGL as a state machine that controls a set of specific drawing operations” Two types of state: server and client. Most refer to server
Drawing • Begin/End paradigm • Only certain commands allowed inside the block
GL data types • GLfloat, GLint, etc.
GL values • In CAPITAL LETTERS • e.g. GL_LIGHT0, GL_AMBIENT • Use bitwise OR command to combine them, e.g. glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);