Book Image

WebGL HOTSHOT

By : Mitch Williams
Book Image

WebGL HOTSHOT

By: Mitch Williams

Overview of this book

Table of Contents (17 chapters)
WebGL HOTSHOT
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

A second coming


3D was basically an entertainment medium used in movies such as Toy Story and Shrek or in video games such as Doom. Game development was rather tedious. Programmers had to create software known as drivers for every model of a graphics card, similar to how peripherals today, for instance a printer and a scanner, must have their own driver device. Each video game had its own unique graphic card drivers. The industry needed a better solution to interface between video games and graphic cards. Thus, an industry standard interface was born: a set of commands that said "you game developers, build your game using these commands" and "you graphics chip makers, make sure you accept these commands". The end result was that any game could run on any graphics card.

A graphic interface can be thought of as a gas station; any car can purchase their gas from any gas station. We need not worry about our car only accepting gas from a particular vendor. The two leading graphics interfaces at the end of the millennium were Open Graphics Library (OpenGL) (1992) and DirectX (1995). OpenGL was from Silicon Graphics Incorporated (SGI) and was designed for computer graphics in animation or special effects, mostly in movies or commercials. Thus, OpenGL did not require interactivity from the mouse or keyboard to play video games. OpenGL also did not include sound; audio would just be combined with the computer-generated video in a film-editing process.

The other graphics interface was DirectX, originally known as Game Developers Kit from Microsoft. Launched in the early 1990s, DirectX provided additional support for programming video games such as interfaces to the mouse, keyboard, and game controllers as well as support to control audio. Game developers could use DirectX to load their 3D models; move and rotate them; specify lights and properties; and receive mouse, keyboard, and game controller commands.

OpenGL was picked up by Khronos (www.khronos.org), a consortium of graphics and computer companies that insured its growth. Khronos' mission is to create open standards for all computing media. It was a broad agenda that incorporated mobile graphics and the Web.

Meanwhile, file formats also needed an industry standard. It was clear that information was being shared among organizations, businesses, and over the Internet. There was a need for a worldwide standard for the World Wide Web. XML, eXtensible Markup Language, was launched in the late 1990s. It specified a format to share data and ways to validate whether the format is correct. Each industry would come up with its own standards; the most prevalent was HTML, which adopted the XML standard to become XHTML, a more rigorous standard that enabled a more consistent file format.

VRML 2.0 gained stature as a 3D mesh file-sharing format and was exported from major 3D modeling programs. Now was the time to jump on the XML bandwagon, and thus, X3D was born. It had the features of VRML but was now in a standardized XML format. VRML and X3D were under the direction of the Web3D Consortium (http://www.web3d.org/), a group of outstanding, intelligent, dedicated people with a vision and commitment for 3D on the Web. As an XML document, X3D could be extended for specific applications, such as medical applications, computer-aided design (CAD) for mechanical engineers, and avatars. Collada is another file format from Khronos with a broader scope for other 3D applications, but with X3D, the community is well served.