Chapter 1
Introducing WebGL
WHAT’S IN THIS CHAPTER?
The basics of WebGL
Why 3D graphics in the browser offer great possibilities
How to work with an immediate-mode API
The basics of graphics hardware
The WebGL graphics pipeline
How WebGL compares to other graphics technologies
Some basic linear algebra needed for WebGL
In this chapter you will be introduced to WebGL and learn some important theory behind WebGL,
as well as general theory behind 3D graphics. You will learn what WebGL is and get an
understanding of the graphics pipeline that is used for WebGL.
You will also be given an overview of some other related graphics standards that will give you
a broader understanding of WebGL and how it compares to these other technologies.
The chapter concludes with a review of some basic linear algebra that is useful to understand if
you really want to master WebGL on a deeper level.
THE BASICS OF WEBGL
WebGL is an application programming interface (API) for advanced 3D graphics on the web. It is
based on OpenGL ES 2.0, and provides similar rendering functionality, but in an HTML and
JavaScript context. The rendering surface that is used for WebGL is the HTML5 canvas element,
which was originally introduced by Apple in the WebKit open-source browser engine. The reason
for introducing the HTML5 canvas was to be able to render 2D graphics in applications such as
Dashboard widgets and in the Safari browser on the Apple Mac OS X operating system.
Based on the canvas element, Vladimir Vukićević at Mozilla started experimenting with 3D
graphics for the canvas element. He called the initial prototype Canvas 3D. In 2009 the Khronos
Group started a new WebGL working group, which now consists of several major browser
vendors, including Apple, Google, Mozilla, and Opera. The Khronos Group is a non-profit
industry consortium that creates open standards and royalty-free APIs. It was founded in January
2000 and is behind a number of other APIs and technologies such as OpenGL ES for 3D graphics
for embedded devices, OpenCL for parallel programming, OpenVG for low-level acceleration of
vector graphics, and OpenMAX for accelerated multimedia components. Since 2006 the Khronos
Group has also controlled and promoted OpenGL, which is a 3D graphics API for desktops.
The final WebGL 1.0 specification was frozen in March 2011, and WebGL support is
implemented in several browsers, including Google Chrome, Mozilla Firefox, and (at the time of
this writing) in the development releases of Safari and Opera.
评论2
最新资源