Computer Graphics Lecture 32

Slides:



Advertisements
Similar presentations
Programming with OpenGL - Getting started - Hanyang University Han Jae-Hyek.
Advertisements

COMPUTER GRAPHICS SOFTWARE.
CS 4731: Computer Graphics Lecture 20: Raster Graphics Part 1 Emmanuel Agu.
CS 352: Computer Graphics Chapter 7: The Rendering Pipeline.
Graphics Pipeline.
RealityEngine Graphics Kurt Akeley Silicon Graphics Computer Systems.
Computer Graphic Creator: Mohsen Asghari Session 2 Fall 2014.
The Graphics Pipeline CS2150 Anthony Jones. Introduction What is this lecture about? – The graphics pipeline as a whole – With examples from the video.
Introduction to OpenGL. What is OpenGL OpenGL is a low-level software interface to graphics hardware No commands for performing windowing tasks or obtaining.
Course Overview, Introduction to CG Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Friday, September 5, 2003.
CHAPTER 4 Window Creation and Control © 2008 Cengage Learning EMEA.
Programmable Pipelines. Objectives Introduce programmable pipelines ­Vertex shaders ­Fragment shaders Introduce shading languages ­Needed to describe.
UniS CS297 Graphics with Java and OpenGL Introduction.
Linear Interpolation, Brief Introduction to OpenGL Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Monday, September.
Programmable Pipelines. 2 Objectives Introduce programmable pipelines ­Vertex shaders ­Fragment shaders Introduce shading languages ­Needed to describe.
Week 2 - Wednesday CS361.
3D API By Clayton Azzopardi (Group 10). Introduction Android uses the OpenGL ES 1.0 API Android uses the OpenGL ES 1.0 API Open Graphics Library for Embedded.
CSC 461: Lecture 41 CSC461: Lecture 4 Introduction to OpenGL Objectives: Development of the OpenGL API OpenGL Architecture -- OpenGL as a state machine.
Computer Graphics An Introduction. What’s this course all about? 06/10/2015 Lecture 1 2 We will cover… Graphics programming and algorithms Graphics data.
UniS CS293 Graphics with Java and OpenGL Introduction.
CS 450: COMPUTER GRAPHICS REVIEW: INTRODUCTION TO COMPUTER GRAPHICS – PART 2 SPRING 2015 DR. MICHAEL J. REALE.
OpenGL Conclusions OpenGL Programming and Reference Guides, other sources CSCI 6360/4360.
CS 4363/6353 OPENGL BACKGROUND. WHY IS THIS CLASS SO HARD TO TEACH? (I’LL STOP WHINING SOON) Hardware (GPUs) double in processing power ever 6 months!
Introduction to OpenGL Programming Jian-Liang Lin 2002.
COMPUTER GRAPHICS CSCI 375. What do I need to know?  Familiarity with  Trigonometry  Analytic geometry  Linear algebra  Data structures  OOP.
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.
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.
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.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
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.
Computer Graphics (Fall 2003) COMS 4160, Lecture 5: OpenGL 1 Ravi Ramamoorthi Many slides courtesy Greg Humphreys.
CSC Graphics Programming Budditha Hettige Department of Statistics and Computer Science.
Applications and Rendering pipeline
Graphics Pipeline Bringing it all together. Implementation The goal of computer graphics is to take the data out of computer memory and put it up on the.
What is Computer Graphics?
Khang Lam Daniel Limas Kevin Castillo Juan Battini
COMPUTER GRAPHICS CHAPTER 38 CS 482 – Fall 2017 GRAPHICS HARDWARE
- Introduction - Graphics Pipeline
Computer Graphics.
Draw a Simple Object.
Week 2 - Friday CS361.
Programmable Pipelines
Computer Graphics Lecture 33
What is Computer Graphics?
What is Computer Graphics?
Graphics Processing Unit
Introduction to OpenGL
Lecture 18 Fasih ur Rehman
Chapter 6 GPU, Shaders, and Shading Languages
The Graphics Rendering Pipeline
Understanding Theory and application of 3D
Models and Architectures
Introduction to Computer Graphics with WebGL
Introduction to Computer Graphics with WebGL
Display Lists & Text Glenn G. Chappell
The Graphics Pipeline Lecture 5 Mon, Sep 3, 2007.
Introduction to Computer Graphics
Models and Architectures
What is Computer Graphics?
Models and Architectures
Programming with OpenGL Part 1: Background
Computer Graphics Introduction to Shaders
CS297 Graphics with Java and OpenGL
CIS 441/541: Introduction to Computer Graphics Lecture 15: shaders
Introduction to OpenGL
OpenGL Background CS 4722.
OpenGL-Rendering Pipeline
Presentation transcript:

Computer Graphics Lecture 32

Introduction to OpenGL Taqdees A. Siddiqi cs602@vu.edu.pk

Most Widely Adopted Graphics Standard Inception – 1992 Multi-platform Rendering, texture mapping, special effects, and other powerful visualization functions

High-quality high-performance Markets: Broadcasting, CAD/CAM/CAE, Entertainment, Medical imaging, and Virtual reality

Developer-Driven Advantages Industry standard OpenGL Architecture Review Board (ARB) Broad industry support, The only truly open, vendor-neutral, multiplatform graphics standard Stable Available for more than a decade on a wide variety of platforms Well controlled Additions to the specification, Proposed updates announced in time Backward compatibility

Developer-Driven Advantages Reliable and portable Consistent visual display results on any OpenGL API-compliant hardware regardless of operating system or windowing system Evolving Thorough and forward-looking design, Allows new hardware innovations to be accessible through the API (OpenGL extension mechanism)

Developer-Driven Advantages Scalable OpenGL API-based applications can run on : consumer electronics PCs Workstations Supercomputers. As a result, applications can scale to any class of machine that the developer chooses to target.

Developer-Driven Advantages Easy to use Well structured Intuitive design Logical commands Efficient routines Compact programs/code Hardware features independent coding possible Well-documented Many 3rd party books A lot of sample code

As a software interface for graphics hardware, OpenGL renders multidimensional objects into a framebuffer.

OpenGL is industry standard graphics software with which programmers can create high-quality still and animated three-dimensional color images.

Where Applicable: OpenGL is built for compatibility across hardware and operating systems. This architecture makes it easy to port OpenGL programs from one system to another.

Developer Audience: C/C++ programmers

All 32 bit versions of Microsoft Windows Run Time Requirements OpenGL can run on: Linux All 32 bit versions of Microsoft Windows

Main purpose of OpenGL Purpose of OpenGL is to render two- and three-dimensional objects into a framebuffer.

These objects are described as sequences of vertices (that define geometric objects) or pixels (that define images).

OpenGL performs several processes on this data to convert it to pixels to form the final desired image in the framebuffer.

How OpenGL Works

The following topics present a global view of how OpenGL works: Primitives and Commands OpenGL Graphic Control Execution Model Basic OpenGL Operations

Primitives and Commands

OpenGL draws primitive: points line segments polygons

OpenGL draw these primitives subject to several selectable modes. User can control modes independently of one another.

Primitives are defined by a group of one or more vertices Primitives are defined by a group of one or more vertices. A vertex defines: a point an end point of a line or a corner of a polygon where two edges meet

Following data is associated with a vertex: its coordinates colour normal texture coordinates and flags

Each vertex and its data is processed independently and in the same way.

Exceptions are cases in which the group of vertices must be clipped so that a particular primitive fits within a specified region. In this case, vertex data may be modified and new vertices created.

Commands Commands are always processed in order. Though there may be an indeterminate delay before a command takes effect.

Therefore state-querying commands return inconsistent data. Each primitive is completed before next command Therefore state-querying commands return inconsistent data.

OpenGL Graphic Control

OpenGL provides you with fairly direct control over the fundamental operations of two- and three-dimensional graphics.

This includes specification of such parameters as: transformation matrices lighting equation coefficients antialiasing methods and pixel-update operators

OpenGL commands specify how a certain result should be produced (The procedure to be followed). OpenGL is fundamentally procedural rather than descriptive.

Execution Model

Client/server model Application code issues commands and these are processed by OpenGL.

OpenGL is network-transparent. A server can maintain several OpenGL contexts. A client can connect to any context.

Network protocol may be an already existing protocol (as X Window System) or an independent protocol. No OpenGL commands are provided for obtaining user input.

The window system that allocates framebuffer resources ultimately controls the effects of OpenGL commands on the framebuffer.

The window system: determines the portions to be accessed at any given time communicates to OpenGL how those portions are structured

No OpenGL commands to configure the framebuffer or initialize OpenGL. Configuration is done outside of OpenGL in conjunction with the window system.

Basic OpenGL Operation

The OpenGL Visualization Programming Pipeline OpenGL operates on image data as well as geometric primitives

Display list Rather than having all commands proceed immediately through the pipeline, you can choose to accumulate some of them in a display list for processing later.

Evaluator Provides an efficient way to approximate curve and surface geometry by evaluating polynomial commands of input values.

Per-vertex operations and primitive assembly OpenGL processes geometric primitives—points. Vertices are transformed and lit, and primitives are clipped to the viewport in preparation for rasterization.

Rasterization The rasterization stage produces a series of frame-buffer addresses and associated values using a two-dimensional description of a point, line segment, or polygon.

Rasterization Each fragment so produced is fed into the last stage, per-fragment operations

Per-fragment operations These are the final operations performed on the data before it's stored as pixels in the framebuffer.

Per-fragment operations include conditional updates to the framebuffer based on incoming and previously stored z values.

for z buffering and blending of incoming pixel colors with stored colors, as well as masking and other logical operations on pixel values

Data can be input in the form of pixels rather than vertices.

Following pixel operations, the pixel data is either: Stored as texture memory, for use in the rasterization stage. Resulting fragments merged into the framebuffer just as if they were generated from geometric data.

OpenGL Processing Pipeline

Many OpenGL functions are used specifically for drawing objects such as points, lines, polygons, and bitmaps.

Some functions control the way that some of this drawing occurs (such as those that enable antialiasing or texturing). Other functions are specifically concerned with framebuffer manipulation.

The topics discussed here describe how all of the OpenGL functions work together to create the OpenGL processing pipeline. Here we also take a closer look at the stages in which data is actually processed, and tie these stages to OpenGL functions.

The following diagram details the OpenGL processing pipeline The following diagram details the OpenGL processing pipeline. For most of the pipeline, you can see three vertical arrows between the major stages.

These arrows represent vertices and the two primary types of data that can be associated with vertices: color values and texture coordinates.

Computer Graphics Lecture 32