• Save
Cgp lecture2 graphics_standard, opengl
Upcoming SlideShare
Loading in...5

Cgp lecture2 graphics_standard, opengl






Total Views
Views on SlideShare
Embed Views



0 Embeds 0

No embeds



Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment
  • Virtual RealityModelling Language
  • International Federation of Information Processing Societies
  • Digital Equipment CorporationMassachusetts Institute of Technology1990’s

Cgp lecture2 graphics_standard, opengl Cgp lecture2 graphics_standard, opengl Presentation Transcript

  • 2/15/2014 1 JAVKHLAN.R
  • OVERVIEW Graphics standards Device independent graphics programming 2/15/2014 2 OpenGL and WebGL
  • GRAPHICS STANDARD Goal: portability, standard graphics functions are independent of programming language, bindings are defined for various languages • Early graphics packages • GKS (Graphical Kernel System) • PHIGS (Programmer's Hierarchical Interactive Graphics System) • OpenGL • Java3D • Direct3D • WebGL 2/15/2014 3 • VRML (Virtual Reality Modeling Language)
  • EARLY HISTORY OF APIS IFIPS (1973) formed two committees to come up with a standard graphics API • Graphical Kernel System (GKS) • 2D but contained good workstation model • Widely used graphical kernel for CAD and CAM software in the 1980’s and 1990’s • Core • Both 2D and 3D • GKS adopted as ISO and later ANSI standard (1980s) GKS not easily extended to 3D (GKS-3D) • Far behind hardware development
  • PHIGS AND X Programmers Hierarchical Graphics System (PHIGS) • At one time considered to be the 3D graphic standard for the 1990’s • Arose from CAD community • Database model with retained graphics (structures) X Window System • DEC/MIT effort • Client-server architecture with graphics PEX combined the two • Not easy to use (all the defects of each)
  • SGI AND GL Silicon Graphics (SGI) revolutionized the graphics workstation by implementing the pipeline in hardware (1982) To access the system, application programmers used a library called GL With GL, it was relatively simple to program three dimensional interactive applications
  • OPENGL The success of GL lead to OpenGL (1992), a platform-independent API that was • Simple architecture • Powerful and fast rendering • Easy to use • Contains 2 libraries: GL kernel and GLU (OpenGL Utility Library) • Close enough to the hardware to get excellent performance • 1992-2006 managed by the OpenGL ARB (Architecture Review Board), now by the khronos group • No window management: no user interface, no image processing, no file system support (no image loader)
  • WEBGL WebGL is based on OpenGL ES 2.0 and provides an API for 3D graphics. It uses the HTML5 canvas element and is accessed using Document Object Model interfaces. 2/15/2014 8 Automatic memory management is provided as part of the JavaScript language.
  • THE PROGRAMMER’S INTERFACE Programmer sees the graphics system through a software interface: the Application Programmer Interface (API)
  • APIS AND DEVICE INDEPENDENT GRAPHICS PROGRAMMING Using APIs makes it possible to create programs that can be compiled and run on many different graphics platforms. Most APIs are basically libraries of routines that take care of standard tasks like rasterization, hidden surface removal, polygon clipping, projections. 2/15/2014 10 The APIs serve as intermediaries between the application layer and the hardware layer. One of their main functions is to facilitate rendering but they can provide also higher level as well as lower level functions.
  • DIFFERENT API LEVELS Lower level APIs (e.g. the rendering APIs Direct3D and OpenGL) deal directly with the rendering task. On the other hand a higher level API like the scene graph API Java3D takes care of maintaining and organizing information about the graphic scenes, illumination, and environment states but needs the help a rendering API to complete the rendering task. 2/15/2014 11 The relationship between different APIs, the operating system, and the hardware layer are illustrated in the following two pages.
  • GRAPHICS STANDARD API contains functions for creation, manipulation and display of images Basic building blocks: primitives and attributes Geometric transformations Modeling transformations Viewing transformations Structuring/manipulating components hierarchically Control functions 2/15/2014 12 • • • • • •
  • 13 2/15/2014
  • PREPARATION • Get a browser that supports it. • Firefox: just make sure you have version 4 or higher. • Chrome: all you need to do is install it, or if you’re already using it, just check whether it’s updated itself to version 10 — this will almost certainly have happened automatically (it was released in March 2011), but you can check from the “About Google Chrome” option on the tools menu to confirm. • Safari: on Macs, OS X 10.7 has WebGL support, but it’s switched off by default. To switch it on, enable the developer menu and check the “Enable WebGL” option. (Thanks to Blah for the heads-up on this one.) If you’re on Windows, make sure you have the Microsoft DirectX runtime installed — this is a free download from Microsoft. • Once you’ve done that, make sure that you’ve got the very latest versions of the drivers for your graphics card. 2/15/2014 14 •
  • WEBGL FUNCTION FORMAT function name dimensions Gl.Vertex3f(x,y,z) x,y,z are floats belongs to GL library glVertex3fv(p) p is a pointer to an array
  • SQUARE 2/15/2014 16 if you understand how this works, the rest should be pretty simple…
  • HOMEWORK Gl.??? – Find all and study all in this example. 2/15/2014 17 Draw – Rectangle, square, circle in the same window