Computer Graphics Buffers

Slides:



Advertisements
Similar presentations
Better Interactive Programs
Advertisements

©Zachary Wartell, UNCC9/28/ :30 AM 1 Overview of OpenGL Revision: 1.2 Copyright Professor Zachary Wartell, University of North Carolina All Rights.
Graphics Pipeline.
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.
Computer Graphics(Fall 2003) COMS 4160, Lecture 7: OpenGL 3 Ravi Ramamoorthi Many slides courtesy Greg Humphreys.
Computer Graphic Creator: Mohsen Asghari Session 2 Fall 2014.
Texture Mapping. Texturing  process that modifies the appearance of each point on a surface using an image or function  any aspect of appearance can.
Objectives Introduce OpenGL buffers and read/write Introduce OpenGL buffers and read/write Introduce texture mapping Introduce texture mapping Introduce.
Buffers Mohan Sridharan Based on slides created by Edward Angel 1 CS4395: Computer Graphics.
Buffers Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
Raster Displays Images are composed of arrays of pixels displayed on a raster device. Two main ways to create images: –Scan and digitize an existing image.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Better Interactive Programs Ed Angel Professor of Computer Science, Electrical and Computer.
OpenGL Texture Mapping
The programmable pipeline Lecture 10 Slide Courtesy to Dr. Suresh Venkatasubramanian.
OpenGL Texture Mapping Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
CS 4731: Computer Graphics Lecture 21: Raster Graphics Part 2 Emmanuel Agu.
OpenGL Pixel Operations, Bitmaps, Fonts and Images The Current Raster Position Current raster position: A position in window coordinates where the next.
CS 638, Fall 2001 Today Light Mapping (Continued) Bump Mapping with Multi-Texturing Multi-Pass Rendering.
 Bitmap: A bitmap is a rectangular array of 0s and 1s that serves as a drawing mask for a corresponding rectangular portion of the window.  Applications:
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.
Fundamentals of Computer Graphics Part 9 Discrete Techniques prof.ing.Václav Skala, CSc. University of West Bohemia Plzeň, Czech Republic ©2002 Prepared.
COMPUTER GRAPHICS Hochiminh city University of Technology Faculty of Computer Science and Engineering CHAPTER 8: Texture Mapping.
Imaging and Raster Primitives Vicki Shreiner. 2 Jobs Andrew Giles Andrew Giles Chuck Fultz Chuck Fultz SIGGraph - SIGGraph.
2002 by Jim X. Chen: 1 So far, we only concerned with the rendering of geometric data. Two other important classes of data:
CS 638, Fall 2001 Multi-Pass Rendering The pipeline takes one triangle at a time, so only local information, and pre-computed maps, are available Multi-Pass.
Pixels, Images and Image Files 1 By Dr. HANY ELSALAMONY.
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.
OpenGL Texture Mapping. 2 Objectives Introduce the OpenGL texture functions and options.
CS 480/680 Computer Graphics OpenGL Texture Mapping Dr. Frederick C Harris, Jr. Fall 2011.
1 Better Interactive Programs. 2 Objectives Learn to build more sophisticated interactive programs using ­Picking Select objects from the display Three.
Discrete Techniques Chapter 7 Begun February 22, 2005 Finished April 26, 2005.
Review of OpenGL Basics
111/17/ :24 UML Solution Involves Selection of Discrete Representation Values.
Graphics: Conceptual Model Real Object Human Eye Display Device Graphics System Synthetic Model Synthetic Camera Real Light Synthetic Light Source.
OpenGL Architecture Display List Polynomial Evaluator Per Vertex Operations & Primitive Assembly Rasterization Per Fragment Operations Frame Buffer Texture.
09/16/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Environment mapping Light mapping Project Goals for Stage 1.
Discrete Techniques Chapter 7.
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.
Buffers Computer Graphics I, Fall 2010.
Buffers, Compositing and Blending Week 8 David Breen Department of Computer Science Drexel University Based on material from Ed Angel, University of New.
Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Buffers. 2 Objectives Introduce additional OpenGL buffers Learn to read and write buffers Learn to use blending.
The Framebuffer Hyun-Chul Cho. HyunChul Cho - KUCG -2 Buffer Goal of a graphics program Draw pictures on the screen Screen Rectangular array.
Tan-Chi Ho, CGGM Lab., CSIE of NCTU Pixel Operations and Buffers.
CS425 © 2003 Ray S. Babcock Pixels and Bitmaps ● OpenGL allows us to work directly with bits and groups of bits, or pixels, which flow down a parallel.
CSC Graphics Programming Budditha Hettige Department of Statistics and Computer Science.
Chapter 8. Drawing Pixels, Bitmaps, Fonts, and Images Computer Graphics (spring, 2009) School of Computer Science University of Seoul.
Buffers Ed Angel Professor Emeritus of Computer Science
Discrete Techniques.
Better Interactive Programs
OpenGL Texture Mapping
Introduction to Computer Graphics with WebGL
Important stuff that doesn’t fit elsewhere Evan Hart
Introduction to Computer Graphics with WebGL
Introduction to Computer Graphics with WebGL
Geb Thomas Adapted from the OpenGL Programming Guide
Computer Graphics, Lee Byung-Gook, Dongseo Univ.
Class 26 more textures environmental textures Color ramps
Better Interactive Programs
Computer Graphics, Lee Byung-Gook, Dongseo Univ.
3D Game Programming Texture Mapping
Texture and Shadow Mapping
Buffers Ed Angel Professor Emeritus of Computer Science
Last Time Presentation of your game and idea Environment mapping
Class 27 more textures environmental textures Color ramps
OpenGL Texture Mapping
Programming Textures Lecture 15 Fri, Sep 28, 2007.
OpenGL Texture Mapping
Presentation transcript:

Computer Graphics Buffers Dr. Frederick C Harris, Jr.

Objectives Introduce additional OpenGL buffers Learn to read from buffers Learn to use blending

Buffer Define a buffer by its spatial resolution (n x m) and its depth (or precision) k, the number of bits/pixel pixel

OpenGL Frame Buffer

OpenGL Buffers Color buffers can be displayed Depth Stencil Front Back Auxiliary Stereo Depth Stencil Holds masks Most RGBA buffers 8 bits per component Latest are floating point (IEEE)

Writing in Buffers Conceptually, we can consider all of memory as a large two-dimensional array of pixels We read and write rectangular block of pixels Bit block transfer (bitblt) operations The frame buffer is part of this memory memory source frame buffer (destination) writing into frame buffer

Writing Model Read destination pixel before writing source

Bit Writing Modes Source and destination bits are combined bitwise 16 possible functions (one per column in table) replace XOR OR

XOR mode Recall from Chapter 3 that we can use XOR by enabling logic operations and selecting the XOR write mode XOR is especially useful for swapping blocks of memory such as menus that are stored off screen If S represents screen and M represents a menu the sequence S  S  M M  S  M swaps the S and M

The Pixel Pipeline OpenGL has a separate pipeline for pixels Writing pixels involves Moving pixels from processor memory to the frame buffer Format conversions Mapping, Lookups, Tests Reading pixels Format conversion

Buffer Selection Need packing and unpacking Reading can be slow OpenGL can read from any of the buffers (front, back, depth) Default to the back buffer Change with glReadBuffer Note that format of the pixels in the frame buffer is different from that of processor memory and these two types of memory reside in different places Need packing and unpacking Reading can be slow Drawing through texture functions

OpenGL Pixel Functions glReadPixels(x,y,width,height,format,type,myimage) size type of pixels start pixel in frame buffer type of image pointer to processor memory GLubyte myimage[512][512][3]; glReadPixels(0,0, 512, 512, GL_RGB, GL_UNSIGNED_BYTE, myimage);

Deprecated Functionality glDrawPixels glCopyPixels glBitMap Replace by use of texture functionality, glBltFrameBuffer, frame buffer objects