CHAPTER 4 Window Creation and Control © 2008 Cengage Learning EMEA.

Slides:



Advertisements
Similar presentations
COMPUTER GRAPHICS SOFTWARE.
Advertisements

Understanding the graphics pipeline Lecture 2 Original Slides by: Suresh Venkatasubramanian Updates by Joseph Kider.
Graphics Pipeline.
Computer Graphic Creator: Mohsen Asghari Session 2 Fall 2014.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Introduction to Computer Graphics Ed Angel Professor of Computer Science, Electrical and.
Graphics Systems I-Chen Lin’s CG slides, Doug James’s CG slides Angel, Interactive Computer Graphics, Chap 1 Introduction to Graphics Pipeline.
The Graphics Pipeline CS2150 Anthony Jones. Introduction What is this lecture about? – The graphics pipeline as a whole – With examples from the video.
Real-Time Stereo Matching on Programmable Graphics Hardware Liang Wei.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Models and Architectures Ed Angel Professor of Computer Science, Electrical and Computer.
GPU Graphics Processing Unit. Graphics Pipeline Scene Transformations Lighting & Shading ViewingTransformations Rasterization GPUs evolved as hardware.
Computer Graphics/and Multimedia CMM472/CIT773 What is CG ?, History of CG, Course Overview.
Realtime 3D Computer Graphics Computer Graphics Computer Graphics Software & Hardware Rendering Software & Hardware Rendering 3D APIs 3D APIs Pixel & Vertex.
Course Overview, Introduction to CG Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Friday, September 5, 2003.
CS 480/680 Computer Graphics Course Overview Dr. Frederick C Harris, Jr. Fall 2012.
ISC/GAM 4322 ISC 6310 Multimedia Development and Programming Unit 1 Graphics Systems and Models.
Programmable Pipelines. Objectives Introduce programmable pipelines ­Vertex shaders ­Fragment shaders Introduce shading languages ­Needed to describe.
Real-time Graphical Shader Programming with Cg (HLSL)
Using OpenGL in Visual C++ Opengl32.dll and glu32.dll should be in the system folder Opengl32.dll and glu32.dll should be in the system folder Opengl32.lib.
Graphics Systems and Models Chapter 1. CS 480/680 2Chapter 1 -- Graphics Systems and Models Introduction: Introduction: Computer Graphics Computer Graphics.
Programmable Pipelines. 2 Objectives Introduce programmable pipelines ­Vertex shaders ­Fragment shaders Introduce shading languages ­Needed to describe.
CSC 461: Lecture 41 CSC461: Lecture 4 Introduction to OpenGL Objectives: Development of the OpenGL API OpenGL Architecture -- OpenGL as a state machine.
Graphics Architectures & OpenGL API Introduction Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
Chris Kerkhoff Matthew Sullivan 10/16/2009.  Shaders are simple programs that describe the traits of either a vertex or a pixel.  Shaders replace a.
Computer Graphics Tz-Huan Huang National Taiwan University.
CS 450: COMPUTER GRAPHICS REVIEW: INTRODUCTION TO COMPUTER GRAPHICS – PART 2 SPRING 2015 DR. MICHAEL J. REALE.
The Graphics Rendering Pipeline 3D SCENE Collection of 3D primitives IMAGE Array of pixels Primitives: Basic geometric structures (points, lines, triangles,
Computer Graphics I, Fall : What is Computer Graphics?
CSC 461: Lecture 3 1 CSC461 Lecture 3: Models and Architectures  Objectives –Learn the basic design of a graphics system –Introduce pipeline architecture.
OpenGL Conclusions OpenGL Programming and Reference Guides, other sources CSCI 6360/4360.
1 Introduction to Computer Graphics SEN Introduction to OpenGL Graphics Applications.
Computer Graphics I, Fall 2008 Introduction to Computer Graphics.
1 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 CS4610/7610: Introduction to Computer Graphics.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Computer Graphics The Rendering Pipeline - Review CO2409 Computer Graphics Week 15.
1 Computer Graphics Week2 –Creating a Picture. Steps for creating a picture Creating a model Perform necessary transformation Lighting and rendering the.
1Computer Graphics Lecture 4 - Models and Architectures John Shearer Culture Lab – space 2
GRAPHICS PIPELINE & SHADERS SET09115 Intro to Graphics Programming.
CS662 Computer Graphics Game Technologies Jim X. Chen, Ph.D. Computer Science Department George Mason University.
Programmable Pipelines Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts Director, Arts Technology Center University.
Computer Graphics Chapter 6 Andreas Savva. 2 Interactive Graphics Graphics provides one of the most natural means of communicating with a computer. Interactive.
The Cg Runtime Cyril Zeller. Cg Pipeline Graphics programs are written in Cg and compiled to low-level assembly code... Cg Runtime API...
Introduction to OpenGL  OpenGL is a graphics API  Software library  Layer between programmer and graphics hardware (and software)  OpenGL can fit in.
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
Computer Graphics 3 Lecture 6: Other Hardware-Based Extensions Benjamin Mora 1 University of Wales Swansea Dr. Benjamin Mora.
1 Angel: Interactive Computer Graphics5E © Addison- Wesley 2009 Image Formation Fundamental imaging notions Fundamental imaging notions Physical basis.
Ray Tracing using Programmable Graphics Hardware
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.
© David Kirk/NVIDIA and Wen-mei W. Hwu, ECE408, University of Illinois, Urbana-Champaign 1 GPU.
Chapter 1 Graphics Systems and Models Models and Architectures.
GPU Computing for GIS James Mower Department of Geography and Planning University at Albany.
1 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 Models and Architectures 靜宜大學 資訊工程系 蔡奇偉 副教授 2012.
Graphics Programming. Graphics Functions We can think of the graphics system as a black box whose inputs are function calls from an application program;
Computer Graphics (Fall 2003) COMS 4160, Lecture 5: OpenGL 1 Ravi Ramamoorthi Many slides courtesy Greg Humphreys.
Programmable Pipelines
Computer Graphics Lecture 32
Graphics on GPU © David Kirk/NVIDIA and Wen-mei W. Hwu,
Graphics Processing Unit
Chapter 6 GPU, Shaders, and Shading Languages
The Graphics Rendering Pipeline
Understanding Theory and application of 3D
Models and Architectures
Models and Architectures
Models and Architectures
Introduction to Computer Graphics with WebGL
Graphics Processing Unit
Introduction to Computer Graphics
Models and Architectures
Models and Architectures
CIS 441/541: Introduction to Computer Graphics Lecture 15: shaders
CIS 6930: Chip Multiprocessor: GPU Architecture and Programming
Presentation transcript:

CHAPTER 4 Window Creation and Control © 2008 Cengage Learning EMEA

LEARNING OBJECTIVES In this chapter you will learn about: – –The graphics system – –Input devices – –Output devices – –The frame buffer – –The elements of a 3D environment – –The graphics pipeline architecture – –Vertex processing – –Clipping and culling – –Rasterization and fragment processing – –Programmable pipelines – –The Direct3D 10 processing pipeline – –The input-assembler stage – –The vertex-shader stage – –The geometry-shader stage

LEARNING OBJECTIVES In this chapter you will learn about: – –The stream-output stage – –The pixel-shader stage – –The output-merger stage – –The OpenGL processing pipeline – –Evaluators and display lists – –The primitive assembly and rasterizer – –Pixel processing – –The fragment processor – –The OpenGL, GLUT, and DirectX programming interface – –Window creation and control – –Setting up a window and the main message loop – –Initializing Direct3D and generating output – –Setting up a window (GLUT), the main message loop and initializing OpenGL

THE GRAPHICS SYSTEM The term ‘graphics system’ formally describes any computing workstation with the ability to generate two- and/or three- dimensional images.

THE GRAPHICS SYSTEM Input Devices – –Request mode. – –Sample mode. – –Event mode.

THE GRAPHICS SYSTEM Output Devices

Frame Buffer The frame buffer, typically used to store the color information of individual pixels, is one of the most important components of any graphics system. – –accumulation buffer – –color indices – –overlay planes – –auxiliary buffers – –front and back buffer

ELEMENTS OF A 3D ENVIRONMENT Any three-dimensional environment, at its most basic level, consists of at least a viewer, one light source and a number of objects.

ELEMENTS OF A 3D ENVIRONMENT

THE GRAPHICS PIPELINE ARCHITECTURE A pipeline is a series of data processing units arranged in a chain-like manner with the output of the one unit read as the input of the next.

THE GRAPHICS PIPELINE ARCHITECTURE The graphics pipeline, also sometimes referred to as the rendering pipeline, implements the processing stages of the rendering process. These stages include: – –vertex processing – –clipping and culling – –Rasterization – –fragment processing

THE GRAPHICS PIPELINE ARCHITECTURE

Programmable Pipelines Today’s graphics cards all have pipelines built into their graphics processing units. The operations that could be performed by earlier graphics cards were standardized by the device manufacturer with only a number of parameters and properties available for modification. Modern graphics cards allow for not only the modification of a large number of parameters, but also for complete control over the vertex and fragment processors.

Programmable Pipelines These programmable vertex and fragment processors enable the real-time rendering of various advanced techniques only previously achievable using large rendering farms or not even possible in real-time at all.

Programmable Pipelines

The Direct3D 10 Processing Pipeline Each stage of the Direct3D 10 processing pipeline is configurable using the standard Direct3D application programming interface. The vertex shader, geometry shader, and pixel shader are programmable using either Microsoft’s proprietary High Level Shader Language (HLSL) or NVIDIA’s C for Graphics (Cg).

The Direct3D 10 Processing Pipeline The input-assembler stage The vertex-shader stage The geometry-shader stage The stream-output stage The pixel-shader stage The output-merger stage

The Direct3D 10 Processing Pipeline

The OpenGL processing pipeline Evaluators and Display Lists Primitive Assembly Rasterizer Pixel Processing Fragment Processor

The OpenGL processing pipeline

THE PROGRAMMING INTERFACE A programming interface refers to any API, such as OpenGL or DirectX, that provides an application programmer with a way to programmatically control low-level hardware subsystems (such as audio devices and graphics hardware). Direct3D and OpenGL programming interfaces facilitate interaction with the underlying graphics system, serving as software interfaces to graphics hardware.

THE PROGRAMMING INTERFACE OpenGL/GLUT

THE PROGRAMMING INTERFACE OpenGL/GLUT

THE PROGRAMMING INTERFACE OpenGL/GLUT

THE PROGRAMMING INTERFACE DirectX

THE PROGRAMMING INTERFACE DirectX

WINDOW CREATION AND CONTROL Setting up a Window and the Main Message Loop – –[see the source code “Window_Setup (win32)” on the book’s website for a detailed example].

WINDOW CREATION AND CONTROL Initializing Direct3D/OpenGL and Generating Output – –[see the source code “Initialization (Direct3D)” and “Initialization (OpenGL- GLUT)” on the book’s website for detailed examples].

WINDOW CREATION AND CONTROL