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 def...
EARLY HISTORY OF APIS
IFIPS (1973) formed two committees to come up with a
standard graphics API
• Graphical Kernel System...
PHIGS AND X
Programmers Hierarchical Graphics System (PHIGS)

• At one time considered to be the 3D graphic standard for t...
SGI AND GL
Silicon Graphics (SGI) revolutionized the graphics
workstation by implementing the pipeline in hardware (1982)
...
OPENGL
The success of GL lead to OpenGL (1992), a
platform-independent API that was
• Simple architecture
• Powerful and f...
WEBGL
WebGL is based on OpenGL ES 2.0 and provides an API for 3D
graphics.
It uses the HTML5 canvas element and is accesse...
THE PROGRAMMER’S
INTERFACE
Programmer sees the graphics system through a software
interface: the Application Programmer In...
APIS AND DEVICE INDEPENDENT
GRAPHICS PROGRAMMING
Using APIs makes it possible to create programs that can be
compiled and ...
DIFFERENT API LEVELS
Lower level APIs (e.g. the rendering APIs Direct3D and
OpenGL) deal directly with the rendering task....
GRAPHICS STANDARD
API contains functions for creation, manipulation and display of
images
Basic building blocks: primitive...
13

2/15/2014
PREPARATION
•

Get a browser that supports it.

• Firefox: just make sure you have version 4 or higher.
• Chrome: all you ...
WEBGL FUNCTION FORMAT
function name
dimensions

Gl.Vertex3f(x,y,z)
x,y,z are floats

belongs to GL library

glVertex3fv(p)...
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 win...
Upcoming SlideShare
Loading in …5
×

Cgp lecture2 graphics_standard, opengl

584 views
378 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
584
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Virtual RealityModelling Language
  • International Federation of Information Processing Societies
  • Digital Equipment CorporationMassachusetts Institute of Technology1990’s
  • Cgp lecture2 graphics_standard, opengl

    1. 1. 2/15/2014 1 JAVKHLAN.R
    2. 2. OVERVIEW Graphics standards Device independent graphics programming 2/15/2014 2 OpenGL and WebGL
    3. 3. 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)
    4. 4. 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
    5. 5. 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)
    6. 6. 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
    7. 7. 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)
    8. 8. 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.
    9. 9. THE PROGRAMMER’S INTERFACE Programmer sees the graphics system through a software interface: the Application Programmer Interface (API)
    10. 10. 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.
    11. 11. 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.
    12. 12. 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. 13. 13 2/15/2014
    14. 14. 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 •
    15. 15. 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
    16. 16. SQUARE 2/15/2014 16 if you understand how this works, the rest should be pretty simple…
    17. 17. HOMEWORK Gl.??? – Find all and study all in this example. 2/15/2014 17 Draw – Rectangle, square, circle in the same window

    ×