OpenGL Architecture Display List Polynomial Evaluator Per Vertex Operations & Primitive Assembly Rasterization Per Fragment Operations Frame Buffer Texture.

Slides:



Advertisements
Similar presentations
Better Interactive Programs
Advertisements

Compositing and Blending Ed Angel Professor Emeritus of Computer Science University of New Mexico 1 E. Angel and D. Shreiner: Interactive Computer Graphics.
©Zachary Wartell, UNCC9/28/ :30 AM 1 Overview of OpenGL Revision: 1.2 Copyright Professor Zachary Wartell, University of North Carolina All Rights.
CS 352: Computer Graphics Chapter 7: The Rendering Pipeline.
The Buffers and Operations
Framebuffer in OpenGL MAE152 Computer Graphics for Scientists and Engineers Fall 03.
OpenGL Fragment Operations
Understanding the graphics pipeline Lecture 2 Original Slides by: Suresh Venkatasubramanian Updates by Joseph Kider.
Graphics Pipeline.
Introduction and Basic OpenGL functionality
Computing & Information Sciences Kansas State University CG Basics 5 of 8: OpenGL Primer 2 CIS 636/736: (Introduction to) Computer Graphics CIS 636 Introduction.
Status – Week 257 Victor Moya. Summary GPU interface. GPU interface. GPU state. GPU state. API/Driver State. API/Driver State. Driver/CPU Proxy. Driver/CPU.
1 Buffers and Processing Fragments 2011 Autumn Animação e Visualização Tridimensional 2011/2012.
RealityEngine Graphics Kurt Akeley Silicon Graphics Computer Systems.
Computer Graphics(Fall 2003) COMS 4160, Lecture 7: OpenGL 3 Ravi Ramamoorthi Many slides courtesy Greg Humphreys.
OPENGL Return of the Survival Guide. Buffers (0,0) OpenGL holds the buffers in a coordinate system such that the origin is the lower left corner.
CS 4363/6353 BASIC RENDERING. THE GRAPHICS PIPELINE OVERVIEW Vertex Processing Coordinate transformations Compute color for each vertex Clipping and Primitive.
University of Sulaimani - School of Science - Computer Dept.
Computer Graphic Creator: Mohsen Asghari Session 2 Fall 2014.
Blending MAE152 Computer Graphics for Engineers and Scientists Fall 03.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Better Interactive Programs Ed Angel Professor of Computer Science, Electrical and Computer.
Status – Week 277 Victor Moya.
GPU Simulator Victor Moya. Summary Rendering pipeline for 3D graphics. Rendering pipeline for 3D graphics. Graphic Processors. Graphic Processors. GPU.
Status – Week 283 Victor Moya. 3D Graphics Pipeline Akeley & Hanrahan course. Akeley & Hanrahan course. Fixed vs Programmable. Fixed vs Programmable.
GPU Graphics Processing Unit. Graphics Pipeline Scene Transformations Lighting & Shading ViewingTransformations Rasterization GPUs evolved as hardware.
Basic Graphics Concepts Day One CSCI 440. Terminology object - the thing being modeled image - view of object(s) on the screen frame buffer - memory that.
Programmable Pipelines. Objectives Introduce programmable pipelines ­Vertex shaders ­Fragment shaders Introduce shading languages ­Needed to describe.
CSC461 Lecture 11: Interactive Programs Contents and Objectives Picking Writing modes – XOR/Copy Rubberbanding Display list.
Tools for Raster Displays CVGLab Goals of the Chapter To describe pixmaps and useful operations on them. To develop tools for copying, scaling, and rotating.
Programmable Pipelines. 2 Objectives Introduce programmable pipelines ­Vertex shaders ­Fragment shaders Introduce shading languages ­Needed to describe.
An Interactive Introduction to OpenGL Programming Ed Angel
Imaging and Raster Primitives Vicki Shreiner. 2 Jobs Andrew Giles Andrew Giles Chuck Fultz Chuck Fultz SIGGraph - SIGGraph.
Lecture 12 Blending, Anti-aliasing, Fog, Display Lists.
OpenGL Conclusions OpenGL Programming and Reference Guides, other sources CSCI 6360/4360.
Computing & Information Sciences Kansas State University Lecture 20 of 42CIS 636/736: (Introduction to) Computer Graphics Lecture 21 of 42 William H. Hsu.
DREAM PLAN IDEA IMPLEMENTATION Introduction to Computer Graphics Dr. Kourosh Kiani
1 Better Interactive Programs. 2 Objectives Learn to build more sophisticated interactive programs using ­Picking Select objects from the display Three.
Programmable Pipelines Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts Director, Arts Technology Center University.
Review of OpenGL Basics
Introduction to OpenGL  OpenGL is a graphics API  Software library  Layer between programmer and graphics hardware (and software)  OpenGL can fit in.
Computer Graphics Bing-Yu Chen National Taiwan University.
MAE152 Computer Graphics for Scientists and Engineers Fall 03 Display Lists.
1 3D API OPENGL ES v1.0 Owned by Silicon Graphics (SGL) Control was then transferred to Khronos Group Introduction.
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
Mobile Graphics Patrick Cozzi University of Pennsylvania CIS Spring 2012.
Computing & Information Sciences Kansas State University Lecture 12 of 42CIS 636/736: (Introduction to) Computer Graphics CIS 636/736 Computer Graphics.
Computer Graphics Bing-Yu Chen National Taiwan University.
© David Kirk/NVIDIA and Wen-mei W. Hwu, ECE408, University of Illinois, Urbana-Champaign 1 Programming Massively Parallel Processors Lecture.
What are shaders? In the field of computer graphics, a shader is a computer program that runs on the graphics processing unit(GPU) and is used to do shading.
Lecture 7 Midterm Review. OpenGL Libraries gl: Basic OpenGL library, e.g. primitives. glu: OpenGL Utility library, a set of functions to create texture.
The Graphics Pipeline Revisited Real Time Rendering Instructor: David Luebke.
© David Kirk/NVIDIA and Wen-mei W. Hwu, ECE408, University of Illinois, Urbana-Champaign 1 GPU.
The Framebuffer Hyun-Chul Cho. HyunChul Cho - KUCG -2 Buffer Goal of a graphics program Draw pictures on the screen Screen Rectangular array.
COMP 175 | COMPUTER GRAPHICS Remco Chang1/XX13 – GLSL Lecture 13: OpenGL Shading Language (GLSL) COMP 175: Computer Graphics April 12, 2016.
CSC Graphics Programming Budditha Hettige Department of Statistics and Computer Science.
Buffers Ed Angel Professor Emeritus of Computer Science
Draw a Simple Object.
Programmable Pipelines
Computer Graphics Lecture 32
Graphics on GPU © David Kirk/NVIDIA and Wen-mei W. Hwu,
Better Interactive Programs
Lecture 18 Fasih ur Rehman
Graphics Processing Unit
Better Interactive Programs
Computer Graphics Buffers
Computer Graphics Practical Lesson 7
Buffers Ed Angel Professor Emeritus of Computer Science
Chapter X Output Merger.
Ref: OpenGL Programming Guide (The Red Book)
CIS 6930: Chip Multiprocessor: GPU Architecture and Programming
Presentation transcript:

OpenGL Architecture Display List Polynomial Evaluator Per Vertex Operations & Primitive Assembly Rasterization Per Fragment Operations Frame Buffer Texture Memory CPU Pixel Operations

Per-Fragment Operations Display List Polynomial Evaluator Per Vertex Operations & Primitive Assembly Rasterization Per Fragment Operations Frame Buffer Texture Memor y CPU Pixel Operations

Getting to the Framebuffer Blending Depth Test Depth Test Dithering Logical Operations Scissor Test Scissor Test Stencil Test Stencil Test Alpha Test Alpha Test Fragment Framebuffer

Scissor Box Additional Clipping Test glScissor( x, y, w, h ) –any fragments outside of box are clipped –useful for updating a small section of a viewport affects glClear() operations – glEnable(GL_SCISSOR_TEST);

Alpha Test Reject pixels based on their alpha value glAlphaFunc( func, value ) glEnable( GL_ALPHA_TEST ) –use alpha as a mask in textures

Storage and Transfer Modes Storage modes control accessing memory –byte alignment in host memory –extracting a subimage Transfer modes allow modify pixel values –scale and bias pixel component values –replace colors using pixel maps

Immediate Mode versus Display Listed Rendering Immediate Mode Graphics –Primitives are sent to pipeline and are processed right away. May be displayed immediately or on swapbuffer. –No memory of graphical entities Display Listed Graphics –Primitives placed in memory (display lists) –Display lists kept on graphics server –Can be redisplayed with different state –Can be shared among OpenGL graphics contexts

Immediate Mode versus Display Lists Immediate Mode Display Listed Display List Polynomial Evaluator Per Vertex Operations & Primitive Assembly Rasterization Per Fragment Operations Texture Memor y CPU Pixel Operations Frame Buffer

Display Lists Creating a display list GLuint id; void init( void ) { id = glGenLists( 1 ); glNewList( id, GL_COMPILE ); /* other OpenGL routines */ glEndList(); } Call a created list void display( void ) { glCallList( id ); }

Display Lists Not all OpenGL routines can be stored in display lists State changes persist, even after a display list is finished Display lists can call other display lists Display lists are not editable, but you can fake it –make a list (A) which calls other lists (B, C, and D) –delete and replace B, C, and D, as needed

Display Lists and Hierarchy Consider model of a car –Create display list for chassis –Create display list for wheel glNewList( CAR, GL_COMPILE ); glCallList( CHASSIS ); glTranslatef( … ); glCallList( WHEEL ); glTranslatef( … ); glCallList( WHEEL ); … glEndList();

Why use Display Lists or Vertex Arrays? May provide better performance than immediate mode rendering –Avoid function call overheads and small packet sends. Display lists can be shared between multiple OpenGL context –reduce memory usage for multi-context applications Vertex arrays may format data for better memory access

Alpha: the 4 th Color Component Measure of Opacity –simulate translucent objects glass, water, etc. –composite images –antialiasing –ignored if blending is not enabled glEnable( GL_BLEND ) CPU DL Poly. Per Vertex Per Vertex Raster Frag FB Pixel Texture

Blending Combine pixels with what’s in already in the framebuffer glBlendFunc( src, dst ) Framebuffer Pixel ( dst ) Blending Equation Fragment ( src ) Blended Pixel