HTML and CSS Reference
In-Depth Information
OpenGL is a cross-platform library for Mac OS X, Unix/Linux, and Windows. It allows
for graphics hardware control at a low level. WebGL is based on OpenGL ES (OpenGL for
Embedded Systems), which is a subset of OpenGL for mobile devices. Although WebGL's
ability to render 3D data via browser seems great, it's also violating the internet's security
model of not letting web pages access hardware. The good news, though, is that browsers
integrate extra security features to “hopefully” prevent someone from setting your graph-
ics card on fire, stealing graphic memory, and/or launching DoS attacks (more details at ) . We're going to be optimistic here and
assume those things won't happen.
In this section, you'll learn how
• WebGL processes data inside a computer
• To create shader data and store
• To create and store shape data with buffers
• To manipulate matrices to output assembled 3D data on a screen
• To use a few scripts that make writing matrices easier
Let's start by looking at how WebGL renders data before you see it.
9.2.1. Graphics cards: a quick primer
Consider the game you're creating: How will a user's browser process and display the 3D
data for your objects? Take a look at figure 9.6 .
Search WWH ::

Custom Search