1 / 12

OpenGL Conclusions OpenGL Programming and Reference Guides, other sources

OpenGL Conclusions OpenGL Programming and Reference Guides, other sources. CSCI 6360/4360. Overview. Putting the OpenGL pieces together Recall, this all a “survival guide” … OpenGL “post-view” Coordinate systems in viewing OpenGL Transformations Transformations between coordinate systems

bertha
Download Presentation

OpenGL Conclusions OpenGL Programming and Reference Guides, other sources

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. OpenGL ConclusionsOpenGL Programming and Reference Guides, other sources CSCI 6360/4360

  2. Overview • Putting the OpenGL pieces together • Recall, this all a “survival guide” … • OpenGL “post-view” • Coordinate systems in viewing • OpenGL Transformations • Transformations between coordinate systems • OpenGL geometry and pixel paths • OpenGL pipeline • Vertices primitives fragments pixels • Programmer access to all • Pieces in context of the whole

  3. Coordinate Systems in Viewing • Coordinate Systems in the Graphics Pipeline • OCS – object coordinate system • WCS – world coordinate system • VCS – viewing coordinate system • CCS – clipping coordinate system • NDCS - normalized device coordinate system • DCS – device coordinate system • Images are formed on the image plane

  4. OpenGL Transformations • Series of “viewing transformations” • transforms a point (its coordinates) from world space to eye space • Set these transformation matrices as part of OpenGL programming • Each transformation operates on different spaces and coordinates • Model – View – Projection – Perspective Divide - Viewport • From “red book”:

  5. Transform. between Coordinate Sys. • Transformations • Between coordinate systems • Model • OCS – WCS • View • WCS – V(E)CS • Projection • VCS – CCS • Perspective divide • CCS - NDCS • Viewport • NDCS - DCS

  6. Many techniques rely on direct interactions with frame buffer Texture mapping, antialiasing, compositing, alpha blending, … OpenGL allows API access to both “geometry path” and “pixel path” Bitmaps, pixel to rasterization and texture mapping to fragment processing Images and geometry flow through separate pipelines that join during rasterization and fragment processing “complex” textures do not affect geometric complexity Texture application is done “at last minute” Texture Mapping and OpenGL Pipeline Geometry Path Geometry Path Pixel Path

  7. OpenGL Pipeline • OpenGL pipeline “big picture” • Different coordinate systems • Transformations • Figure from Blue Book • http://www.opengl.org/documentation/blue_book • http://www.glprogramming.com/blue/ch02.html • Vertices – describe shape of objects • Primitives – polygons, lines, pixels • Fragments – clipped, etc., primitives • Pixels – elements of frame buffer • Three parallel set of operations on • Vertices, color, textures

  8. OpenGL Pipeline - Vertices • Vertices • Location (x,y,z) and color (rgba) • Normal used for lighting, etc. • Vertex position transformed by model-view matrix • Object loc. and camera view • Lighting model applied to vertex color (using vertex loc.) • Textures • Recall, different (sub)pipeline • OpenGL handles the mapping of textures to polygons • Texture coordinates • Vertex raster position • Where in frame buffer located

  9. OpenGL Pipeline - Primitives • Primitive Assembly • Assembly of verts. into primitives • Polygons, line segments, points • Conversion to pixel fragments • Clipped • Converted to wind. coords. • App. Clipping of primitives • Projection transformation • Clip to view volume • Transform to clip coordinates • Perspective divide • to normalized device coordinates • Map to viewport and window • Direct pixel operations possible

  10. OpenGL Pipeline-Fragments, Pixels • Fragment • Point and its color, texture, depth data are a fragment • Rasterization • Converts clipped primitives to 2-d image (pixels) • Each point of image contains color, texture, depth data • Fragments operations (e.g., xor) can be performed • Final texture application using “images” stored in memory based on fragment values • Frame buffer • Image scanned out

  11. OpenGL Pipeline • … and that’s the “big picture!

  12. End

More Related