Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
WebGL Beginner's Guide

You're reading from   WebGL Beginner's Guide If you're a JavaScript developer who wants to take the plunge into 3D web development, this is the perfect primer. From a basic understanding of WebGL structure to creating realistic 3D scenes, everything you need is here.

Arrow left icon
Product type Paperback
Published in Jun 2012
Publisher Packt
ISBN-13 9781849691727
Length 376 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Table of Contents (18) Chapters Close

WebGL Beginner's Guide
Credits
About the Authors
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
1. Getting Started with WebGL FREE CHAPTER 2. Rendering Geometry 3. Lights! 4. Camera 5. Action 6. Colors, Depth Testing, and Alpha Blending 7. Textures 8. Picking 9. Putting It All Together 10. Advanced Techniques Index

Index

A

  • addHitCallback(object) callback / Picker architecture
  • addHit function / Time for action – unique object labels
  • add hit to picking list / Picker architecture
  • additive blending, alpha blending mode / Additive blending
  • Affine
    • about / The Model-View matrix
  • AJAX
    • asynchronous loading / Asynchronous loading with AJAX
  • alpha blending
    • about / Alpha blending
    • blending function, separate / Separate blending functions
    • blend equation / Blend equation
    • blend color / Blend color
  • alpha blending, modes
    • additive blending / Additive blending
    • subtractive blending / Subtractive blending
    • multiplicative blending / Multiplicative blending
    • interpolative blending / Interpolative blending
  • alpha channel / Using colors in WebGL
  • ambient / Phong reflection model
  • angle of view
    • about / Field of view
  • animation timer
    • creating / Creating an animation timer
  • application architecture
    • picking / Architectural updates, Time for action – picking
  • Apply Modifiers, Export OBJ panel / Exporting the Blender models
  • architectural updates, WebGLApp
    • about / Architectural updates
    • WebGLApp review / WebGLApp review
    • support, for matrix stacks / Adding support for matrix stacks
    • rendering rate, configuring / Configuring the rendering rate
    • animation timer, creating / Creating an animation timer
  • architecture
    • reviewing / Architectural review
  • ARRAY_BUFFER value / WebGL as a state machine: buffer manipulation
  • ARRAY_BUFFER_BINDING value / WebGL as a state machine: buffer manipulation
  • aspect / Perspective or orthogonal projection
  • asynchronous loading, with AJAX
    • about / Asynchronous loading with AJAX
    • web server, setting up / Setting up a web server
    • web server requirement / Working around the web server requirement
    • cone, loading with AJAX + JSON / Time for action – loading a cone with AJAX + JSON
    • Nissan GTX, loading / Have a go hero – loading a Nissan GTX
  • asynchronous response / Asynchronous loading with AJAX
  • attachShader(Object program, Object shader), WebGL function / Creating a program
  • attributeList array / Improving how we pass uniforms to the program
  • attributes / Attributes, uniforms, and varyings
    • associating, to VBOs / Associating attributes to VBOs
    • and uniforms, differences / Parallelism and the difference between attributes and uniforms
  • aVertexColor attribute / Per-vertex coloring
  • aVertexPosition attribute / Homogeneous coordinates
  • Axis.js / Supporting objects, Architectural review

B

  • b-splines interpolation
    • about / B-Splines, Time for action – interpolation
  • Back Face Culling button / Creating transparent objects
  • background color / Time for action – Goraud shading
  • bilinear filtering / LINEAR
  • billboard / Point sprites
  • bindBuffer(ulong target, Object buffer) method / Operations to manipulate WebGL buffers
  • blend color, alpha blending / Blend color
  • blend equation, alpha blending / Blend equation
  • Blender / Complexity of the models
  • Blender models
    • exporting / Exporting the Blender models
  • blending function / Blending function
    • separate / Separate blending functions
  • blending function, alpha blending
    • about / Blending function
  • bool / Types
  • bottom / Perspective or orthogonal projection
  • BouncingBall.update() method / Time for action – bouncing ball
  • BouncingBall function / Time for action – bouncing ball
  • bufferData(ulong target, Object data, ulong type) method / Operations to manipulate WebGL buffers
  • bufferData function / Time for action – rendering modes
  • bufferData method / Creating WebGL buffers
  • buffers, WebGL
    • creating / Creating WebGL buffers
    • manipulating / Operations to manipulate WebGL buffers, WebGL as a state machine: buffer manipulation
    • var aBuffer = createBuffer(void) method / Operations to manipulate WebGL buffers
    • deleteBuffer(Object aBuffer) method / Operations to manipulate WebGL buffers
    • bindBuffer(ulong target, Object buffer) method / Operations to manipulate WebGL buffers
    • bufferData(ulong target, Object data, ulong type) method / Operations to manipulate WebGL buffers
    • getParameter(parameter) parameter / WebGL as a state machine: buffer manipulation
    • getBufferParameter(type, parameter) parameter / WebGL as a state machine: buffer manipulation
    • states / Time for action – enquiring on the state of buffers
    • validation, adding / Have a go hero – add one validation
  • BUFFER_SIZE parameter / WebGL as a state machine: buffer manipulation
  • BUFFER_USAGE parameter / WebGL as a state machine: buffer manipulation
  • bvec2 / Types
  • bvec3 / Types
  • bvec4 / Types

C

  • camera
    • about / Structure of a WebGL application
    • types / Basic camera types
    • tracking / Tracking camera
    • tracking camera / Tracking camera
    • rotating, around location / Rotating the camera around its location
    • translating, in line of sight / Translating the camera in the line of sight
    • right vector / Camera model
    • up vector / Camera model
    • axis / Camera model
    • Nissan GTX, exploring / Time for action – exploring the Nissan GTX
    • light positions, updating / Have a go hero – updating light positions
  • camera, types
    • about / Basic camera types
    • orbiting camera / Orbiting camera
  • camera, WebGL properties
    • setting up / Setting up the camera
  • Camera.js / Architectural review
  • camera axis / Camera model
  • camera interactor, WebGL properties
    • creating / Creating the Camera Interactor
  • CameraInteractor.js / Architectural review
  • CameraInteractor class / Time for action – exploring the Nissan GTX, Architectural updates
  • camera matrix
    • about / The Camera matrix
    • camera translation / Camera translation, Time for action – exploring translations: world space versus camera space
    • camera rotation / Camera rotation
    • rotations, exploring / Time for action – exploring rotations: world space versus camera space
    • rotations, combining / Have a go hero – combining rotations and translations
    • translations, combining / Have a go hero – combining rotations and translations
    • camera transform / The Camera matrix is the inverse of the Model-View matrix
    • matrix multiplications, in WebGL / Thinking about matrix multiplications in WebGL
  • camera position / Setting up the camera
  • camera rotation
    • about / Camera rotation
    • exploring / Time for action – exploring rotations: world space versus camera space
    • and camera translations, combining / Have a go hero – combining rotations and translations
  • camera space
    • versus world space / Time for action – exploring translations: world space versus camera space, Time for action – exploring rotations: world space versus camera space
  • camera transform
    • about / The Camera matrix is the inverse of the Model-View matrix
  • camera translation
    • about / Camera translation
    • exploring / Time for action – exploring translations: world space versus camera space
    • and camera rotation, combining / Have a go hero – combining rotations and translations
  • camera variable / Setting up the camera
  • canvas
    • clicking on / Clicking on the canvas
  • canvas.onmouseup function / Clicking on the canvas
  • canvas;about / Structure of a WebGL application
  • canvas element / Clicking on the canvas
  • checkKey function / Time for action – setting up WebGL context attributes
  • CLAMP_TO_EDGE / Creating the framebuffer
  • CLAMP_TO_EDGE wrap mode / CLAMP_TO_EDGE
  • clear function / Time for action – setting up WebGL context attributes
  • client-based rendering / What kind of rendering does WebGL offer?
  • clientHeight / Clicking on the canvas
  • color
    • using, in scene / Use of color in the scene
  • colors
    • using, in WebGL / Using colors in WebGL
    • using, in objects / Use of color in objects
    • constant coloring / Constant coloring
    • pre-vertex coloring / Per-vertex coloring
    • per-fragment coloring / Per-fragment coloring
    • using, in lights / Use of color in lights
    • storing, by creating texture / Creating a texture to store colors
  • colors, using in lights
    • about / Use of color in lights
    • getUniformLocation function / Use of color in lights
    • uniform4fv function / Use of color in lights
  • compileShader function / Creating a program
  • Cone First button / Time for action – creating a transparent wall
  • configure, JavaScript functions / Architectural review
  • configure function / Configure, Time for action – coloring the cube, Time for action – adding a white light to a scene, Time for action – using multitexturing, Rendering to an offscreen framebuffer, Time for action – unique object labels, Rendering
    • updating / Time for action – adding a blue light to a scene
  • configureGLHook / WebGLApp
  • configureParticles / Time for action – using point sprites to create a fountain of sparks
  • constant coloring
    • about / Constant coloring
    • and per-fragment coloring, comparing / Time for action – coloring the cube
  • context
    • used, for accessing WebGL API / Using the context to access the WebGL API
  • context attributes, WebGL
    • setting up / Time for action – setting up WebGL context attributes
  • copy operation / JavaScript matrices
  • cosine emission law / Lambertian reflection model
  • createProgram(), WebGL function / Creating a program
  • createShader function / Creating a program
  • creation operation / JavaScript matrices
  • cross product
    • used, for calculating normals / Normals
  • cube
    • texturing / Time for action – texturing the cube, What just happened?
  • cube maps
    • about / Cube maps
    • cube map-specific function / Cube maps
    • using / Time for action – trying out cube maps
  • c_height / Clicking on the canvas

D

  • 3D objects / Using colors in WebGL
  • 3D scene
    • loading / Loading a 3D scene
    • animating / Animating a 3D scene
  • d, materials uniforms / Implementing the shaders
  • deleteBuffer(Object aBuffer) method / Operations to manipulate WebGL buffers
  • depth buffer / Depth testing
  • depth function
    • about / Depth function
    • gl.NEVER parameter / Depth function
    • gl.LESS parameter / Depth function
    • gL.LEQUAL parameter / Depth function
    • gl.EQUAL parameter / Depth function
    • gl.NOTEQUAL parameter / Depth function
    • gl.GEQUAL parameter / Depth function
    • gl.GREATER parameter / Depth function
    • gl.ALWAYS parameter / Depth function
  • depth information
    • storing, by creating Renderbuffer / Creating a Renderbuffer to store depth information
  • depth testing
    • about / Depth testing
  • dest / Perspective or orthogonal projection
  • diffuse / Phong reflection model
  • diffuseColorGenerator function / Time for action – unique object labels
  • diffuse material property / Constant coloring
  • directional lights
    • about / More on lights: positional lights
  • directional point light
    • about / Time for action – directional point lights
  • discard command / Transparency
  • div tags / Defining what the GUI will look like
  • doLagrangeInterpolation function
    • about / Time for action – interpolation
  • doLinearInterpolation function
    • about / Time for action – interpolation
  • drawArrays / Creating a WebGL application
  • drawArrays function / The drawArrays and drawElements functions
    • using / Using drawArrays
  • drawArrays function;about / The drawArrays and drawElements functions
  • drawElements / Creating a WebGL application
  • drawElements function / The drawArrays and drawElements functions, Time for action – rendering modes
    • about / The drawArrays and drawElements functions
    • using / Using drawElements
  • draw function / Animating a 3D scene
  • draw function / Draw, Time for action – adding a white light to a scene, Time for action – culling, Time for action – using multitexturing, Rendering to an offscreen framebuffer, Architectural updates
    • updating / Time for action – adding a blue light to a scene
  • drawScene function / Time for action – rendering a square
  • drawSceneHook / WebGLApp
  • dropped frames / Animation strategy
  • dx function / Time for action – unique object labels
  • dy function / Time for action – unique object labels
  • DYNAMIC_DRAW / Operations to manipulate WebGL buffers

E

  • E / Goraud shading with Phong reflections
  • ELEMENT_ARRAY_BUFFER value / WebGL as a state machine: buffer manipulation
  • ELEMENT_ARRAY_BUFFER_BINDING value / WebGL as a state machine: buffer manipulation
  • end picking mode / Picker architecture
  • ESSL
    • about / ESSL—OpenGL ES Shading Language
    • storage qualifier / Storage qualifier
    • vector, components / Vector components
    • operators / Operators and functions
    • functions / Operators and functions
    • vertex attributes / Vertex attributes
    • uniforms / Uniforms
    • varyings / Varyings
    • vertex shader / Vertex shader
    • fragment shader / Fragment shader
    • programs, writing / Writing ESSL programs
    • and WebGL, gap bridging / Bridging the gap between WebGL and ESSL
  • ESSL programs, writing
    • Lambertian reflection model, Goraud shading with / Goraud shading with Lambertian reflections
    • Phong reflection model, Goraud shading with / Goraud shading with Phong reflections
    • Phong shading / Phong shading, Time for action – Phong shading with Phong lighting
  • Euclidian Space / Homogeneous coordinates
  • exponential attenuation factor / Time for action – directional point lights
  • Export OBJ panel
    • Apply Modifiers / Exporting the Blender models
    • Write Materials / Exporting the Blender models
    • Triangulate Faces / Exporting the Blender models
    • Objects as OBJ Objects / Exporting the Blender models
    • Material Groups / Exporting the Blender models
  • eye position / Picking

F

  • f / Goraud shading with Phong reflections
  • far / Perspective or orthogonal projection
  • filter modes, texture
    • about / Texture filter modes
    • texels / Texture filter modes
    • magnification / Texture filter modes
    • minification / Texture filter modes
    • setting / Texture filter modes
    • using / Time for action – trying different filter modes
    • NEAREST filter / NEAREST
    • LINEAR filter / LINEAR
  • first-person camera / Tracking camera
  • flagX variable / Time for action – unique object labels
  • flagZ variable / Time for action – unique object labels
  • float / Types
  • Floor.js / Supporting objects, Architectural review
  • fountain sparks
    • creating, point sprites used / Time for action – using point sprites to create a fountain of sparks
  • FOV
    • about / Field of view
  • fovy / Perspective or orthogonal projection
  • fragment shader
    • about / Fragment shader
    • updating / Time for action – adding a blue light to a scene
    • unique labels, using / Time for action – unique object labels
  • fragment shader, ESSL
    • about / Fragment shader
  • fragment shaders
    • ray tracing / Ray tracing in fragment shaders
  • framebuffer
    • about / Framebuffer, Post-processing
    • creating, for offscreen rendering / Creating a framebuffer for offscreen rendering
  • framebuffer, post processing effect
    • creating / Creating the framebuffer
  • frozen frames / Simulation strategy
  • frustum
    • about / Projection transform
  • functions, ESSL
    • about / Operators and functions

G

  • generateMipmap / Generating mipmaps
  • generatePosition function / Time for action – bouncing ball
  • geometry
    • rendering, in WebGL / Rendering geometry in WebGL
  • geometry, post processing effect
    • creating / Creating the geometry
  • getBufferParameter(type, parameter) parameter / WebGL as a state machine: buffer manipulation
  • getGLContext function / Time for action – setting up WebGL context attributes, Time for action – rendering a square
  • getParameter(parameter) parameter / WebGL as a state machine: buffer manipulation
  • getParameter function / Creating a WebGL application
  • getProgramParameter(Object program, Object parameter), WebGL function / Creating a program
  • getShader function / Creating a program
  • getUniform(program, reference), WebGL function / Initializing attributes and uniforms
  • getUniformLocation function / Use of color in lights
  • gl.ALWAYS parameter / Depth function
  • gl.ARRAY_BUFFER option / Creating WebGL buffers
  • gl.bindTexture / Using multiple textures
  • gl.blendColor ( red, green, blue, alpha) function / WebGL alpha blending API
  • gl.blendEquation(mode) function / WebGL alpha blending API
  • gl.blendEquation function / Blend equation
  • gl.blendEquationSeparate(modeRGB, modeAlpha) function / WebGL alpha blending API
  • gl.blendFunc (sW, dW) function / WebGL alpha blending API
  • gl.blendFuncSeparate(sW_rgb, dW_rgb, sW_a, dW_a) function / WebGL alpha blending API
  • gl.ELEMENT_ARRAY_BUFFER option / Creating WebGL buffers
  • gl.enable|disable (gl.BLEND) function / WebGL alpha blending API
  • gl.EQUAL parameter / Depth function
  • gl.GEQUAL parameter / Depth function
  • gl.getParameter(pname) function / WebGL alpha blending API
  • gl.getParameter function / How many uniforms can we use?
  • gl.GREATER parameter / Depth function
  • gL.LEQUAL parameter / Depth function
  • gl.LESS parameter / Depth function
  • gl.NEVER parameter / Depth function
  • gl.NOTEQUAL parameter / Depth function
  • gl.readPixels(x, y, width, height, format, type, pixels) function / Reading pixels from the offscreen framebuffer
  • gl.TEXTURE_CUBE_MAP_* targets / Cube maps
  • glMatrix operations
    • creation operation / JavaScript matrices
    • identity operation / JavaScript matrices
    • copy operation / JavaScript matrices
    • transpose operation / JavaScript matrices
    • inverse operation / JavaScript matrices
    • rotate operation / JavaScript matrices
  • Globals.js / Supporting objects, Architectural review
  • glPolygonStipple function / Transparency
  • GLSL
    • void / Types
    • bool / Types
    • int / Types
    • float / Types
    • vec2 / Types
    • vec3 / Types
    • vec4 / Types
    • bvec2 / Types
    • bvec3 / Types
    • bvec4 / Types
    • ivec2 / Types
    • ivec3 / Types
    • ivec4 / Types
    • mat2 / Types
    • mat3 / Types
    • mat4 / Types
    • sampler2D / Types
    • samplerCube / Types
    • matrices in / Working with matrices in ESSL
  • GLSL uniforms
    • JavaScript, mapping / Mapping JavaScript matrices to ESSL uniforms
  • gl_FragColor variable / Assigning one color per object in the scene
  • gl_PointSize value / Point sprites
  • Goraud interpolation method
    • about / Goraud interpolation
  • Goraud shading
    • with Lambertian reflection model / Goraud shading with Lambertian reflections
    • with Phong reflection model / Goraud shading with Phong reflections
    • about / Time for action – Goraud shading
  • GUI
    • about / Defining what the GUI will look like
    • WebGL support, adding / Adding WebGL support

H

  • hardware-based rendering / What kind of rendering does WebGL offer?
  • height attribute / Understanding canvas attributes
  • hitPropertyCallback(object) callback / Picker architecture
  • hitProperty function / Time for action – unique object labels
  • hits
    • looking for / Looking for hits
    • processing / Processing hits
  • hits function / Time for action – unique object labels
  • homogeneous coordinates / Homogeneous coordinates
  • hook() / WebGLApp
  • HTML5 canvas
    • creating, steps for / Creating an HTML5 canvas
    • CSS style, defining / Defining a CSS style for the border
    • attributes / Understanding canvas attributes
    • id attribute / Understanding canvas attributes
    • width attribute / Understanding canvas attributes
    • height attribute / Understanding canvas attributes
    • not supported / What if the canvas is not supported?

I

  • IBOs
    • about / Vertices and Indices
  • id attribute / Understanding canvas attributes
  • identity operation / JavaScript matrices
  • illum, materials uniforms / Implementing the shaders
  • index parameter / Pointing an attribute to the currently bound VBO, Time for action – unique object labels
  • indices
    • about / Vertices and Indices
  • initBuffers function / Time for action – rendering a square
  • initLights function / Back to WebGL
  • initProgram function / Time for action – rendering a square, Back to WebGL
  • initProgram function / Bridging the gap between WebGL and ESSL
  • initTransforms function / initTransforms, Adding support for matrix stacks
  • initWebGL function / Time for action – setting up WebGL context attributes
  • int / Types
  • interactivity
    • adding, with JQuery UI / Have a go hero – adding interactivity with JQuery UI
  • interactor function / Time for action – unique object labels
  • interpolation
    • about / Interpolation
    • linear interpolation / Linear interpolation
    • polynomial interpolation / Polynomial interpolation
    • B-Splines / B-Splines
  • interpolation methods
    • about / Shading/interpolation methods
    • Goraud interpolation method / Goraud interpolation
    • Phong interpolation method / Phong interpolation
  • interpolative blending, alpha blending mode / Interpolative blending
  • intersect function / Time for action – examining the ray traced scene
  • INVALID_OPERATION / Creating WebGL buffers
  • inverse of matrix
    • about / The Camera matrix is the inverse of the Model-View matrix
  • inverse operation / JavaScript matrices
  • ivec2 / Types
  • ivec3 / Types
  • ivec4 / Types

J

  • JavaScript
    • mapping, to GLSL uniforms / Mapping JavaScript matrices to ESSL uniforms
  • JavaScript array
    • used, for defining geometry / Defining a geometry using JavaScript arrays
  • JavaScript elements
    • requestAnimFrame function / requestAnimFrame function
    • JavaScript timers / JavaScript timers
  • JavaScript matrices
    • about / JavaScript matrices
  • JavaScript timers
    • about / JavaScript timers
    • used, for implementing animation sequence / Connecting matrix stacks and JavaScript timers
  • JQuery UI
    • interactivity, adding with / Have a go hero – adding interactivity with JQuery UI
  • JQuery UI widgets
    • URL / Have a go hero – adding interactivity with JQuery UI
  • JSON
    • about / Introduction to JSON – JavaScript Object Notation
    • -based 3D models, defining / Defining JSON-based 3D models
    • encoding / JSON encoding and decoding, Time for action – JSON encoding and decoding
    • decoding / JSON encoding and decoding, Time for action – JSON encoding and decoding

K

  • Khronos Group web page
    • URL / System requirements
  • KTM / Calculating the Normal matrix

L

  • Lambert's emission law / Lambertian reflection model
  • Lambert coefficient / Goraud shading with Lambertian reflections
  • Lambertian reflection model
    • Goraud shading with / Goraud shading with Lambertian reflections
    • uniforms, updating / Time for action – updating uniforms in real time
    • light, moving / Have a go hero – moving light
  • Lambertian reflection model, light reflection models
    • about / Lambertian reflection model
  • left / Perspective or orthogonal projection
  • life-cycle functions, WebGL
    • about / Life-cycle functions
    • configure function / Configure
    • load function / Load
    • draw function / Draw
  • Light / Adding support for light objects
  • light ambient term / Time for action – Goraud shading
  • light color (light diffuse term) / Time for action – Goraud shading
  • light diffuse term / Time for action – updating uniforms in real time
  • lighting
    • about / Shading methods and light reflection models
  • light position / Use of color in lights
  • light positions
    • updating / Have a go hero – updating light positions
  • light reflection models
    • about / Light reflection models
    • Lambertian reflection model / Lambertian reflection model
    • Phong reflection model / Phong reflection model
  • lights
    • about / Structure of a WebGL application, Lights, Using lights, normals, and materials in the pipeline, Using colors in WebGL
    • colors, using / Use of color in lights
    • multiple lights, using / Using multiple lights and the scalability problem
    • properties / Using multiple lights and the scalability problem
    • objects, support adding for / Adding support for light objects
  • Lights / Adding support for light objects
  • lights, WebGL properties
    • creating / Creating the lights
  • Lights.js / Architectural review
  • light specular term / Time for action – Goraud shading
  • light uniform arrays
    • uLa[NUM_LIGHTS] / Implementing the shaders
    • uLd[NUM_LIGHTS] / Implementing the shaders
    • uLs[NUM_LIGHTS] / Implementing the shaders
  • LINEAR filter / LINEAR
  • linear interpolation
    • about / Linear interpolation
  • LINEAR_MIPMAP_LINEAR filter / LINEAR_MIPMAP_LINEAR
  • LINEAR_MIPMAP_NEAREST filter / LINEAR_MIPMAP_NEAREST
  • LINES mode / Time for action – rendering modes
  • LINE_LOOP mode / Time for action – rendering modes
  • LINE_STRIP mode / Time for action – rendering modes
  • linkProgram(Object program), WebGL function / Creating a program
  • load, JavaScript functions / Architectural review
  • loadCubemapFace / Time for action – trying out cube maps
  • load function / Load, Initialization steps, Time for action – adding a blue light to a scene, Time for action – adding a white light to a scene, Loading the cars, Rendering
  • loadObject function / Time for action – unique object labels
  • loadSceneHook / WebGLApp
  • local transformations, with matrix stacks
    • about / Connecting matrix stacks and JavaScript timers
    • simple animation / Time for action – simple animation, What just happened?
    • dropped and frozen frames, simulating / Have a go hero – simulating dropped and frozen frames

M

  • magnification / Texture filter modes
  • mat2 / Types
  • mat3 / Types
  • mat4 / Types
  • mat4.ortho(left, right, bottom, top, near, far, dest) function / Perspective or orthogonal projection
  • mat4.perspective(fovy, aspect, near, far, dest) function / Perspective or orthogonal projection
  • material ambient term / Time for action – Goraud shading
  • Material Groups, Export OBJ panel / Exporting the Blender models
  • materials
    • about / Materials, Using lights, normals, and materials in the pipeline
  • material specular term / Time for action – Goraud shading
  • materials uniforms
    • uKa / Implementing the shaders
    • uKd / Implementing the shaders
    • uKs / Implementing the shaders
    • uNi / Implementing the shaders
    • uNs / Implementing the shaders
    • d / Implementing the shaders
    • illum / Implementing the shaders
  • Material Template Library (MTL) / Shader quality
  • Math.random function / Time for action – unique object labels
  • Matirx Stack Operations
    • diagrammatic representation / Matrix stacks
  • matrices
    • in GLSL / Working with matrices in ESSL
    • uMVMatrix / Working with matrices in ESSL
    • uPMatrix / Working with matrices in ESSL
    • uNMatrix / Working with matrices in ESSL
  • matrix handling functions, WebGL
    • initTransforms / initTransforms
    • updateTransforms / updateTransforms
    • setMatrixUniforms / setMatrixUniforms
  • matrix multiplications
    • in WebGL / Thinking about matrix multiplications in WebGL
  • matrix stack
    • about / Matrix stacks
  • matrix stacks
    • support, adding for / Adding support for matrix stacks
    • connecting / Connecting matrix stacks and JavaScript timers
    • used, for implementing local transformations / Connecting matrix stacks and JavaScript timers
  • minification / Texture filter modes
  • mipmap chain / Mipmapping
  • mipmapping
    • about / Mipmapping
    • mipmap chain / Mipmapping
    • NEAREST_MIPMAP_NEAREST filter / NEAREST_MIPMAP_NEAREST
    • LINEAR_MIPMAP_NEAREST filter / LINEAR_MIPMAP_NEAREST
    • NEAREST_MIPMAP_LINEAR filter / NEAREST_MIPMAP_LINEAR
    • LINEAR_MIPMAP_LINEAR filter / LINEAR_MIPMAP_LINEAR
    • generating / Generating mipmaps
  • MIRRORED_REPEAT wrap mode / MIRRORED_REPEAT
  • miss
    • about / Looking for hits
  • Model-View matrix
    • about / WebGL implementation, The Model-View matrix, Spatial encoding of the world
    • identity matrix / Spatial encoding of the world
    • rotation matrix / Rotation matrix
    • translation vector / Translation vector
    • fourth row / The mysterious fourth row
    • updating / Matrix stacks
  • Model-View transform
    • and projective transform, integrating / Have a go hero – integrating the Model-view and the projective transform
  • model matrix
    • about / Model transform
  • modes
    • rendering / Rendering modes, Time for action – rendering modes
    • TRIANGLES mode / Time for action – rendering modes
    • LINES mode / Time for action – rendering modes
    • POINTS mode / Time for action – rendering modes
    • LINE_LOOP mode / Time for action – rendering modes
    • LINE_STRIP mode / Time for action – rendering modes
    • TRIANGLE_STRIP mode / Time for action – rendering modes
    • TRIANGLE_FAN mode / Time for action – rendering modes
  • moveCallback(hits,interactor, dx, dy) callback / Picker architecture
  • movePickedObjects function / Time for action – unique object labels
  • multiple lights
    • handling, uniform arrays used / Using uniform arrays to handle multiple lights
  • multiplicative blending, alpha blending mode / Multiplicative blending
  • multitexturing
    • about / Using multiple textures
    • accessing / Using multiple textures
    • using / Time for action – using multitexturing
  • mvMatrix / Thinking about matrix multiplications in WebGL

N

  • NDC
    • about / Perspective division
  • near / Perspective or orthogonal projection
  • NEAREST filter / NEAREST
  • NEAREST_MIPMAP_LINEAR filter / NEAREST_MIPMAP_LINEAR
  • NEAREST_MIPMAP_NEAREST filter / NEAREST_MIPMAP_NEAREST
  • Nissan GTX
    • example / Nissan GTS example
    • exploring / Time for action – exploring the Nissan GTX
  • Nissan GTX, asynchronous response
    • loading / Have a go hero – loading a Nissan GTX
  • non-homogeneous coordinates / Homogeneous coordinates
  • Non Power Of Two (NPOT) texture / Generating mipmaps
  • normal mapping
    • about / Normal mapping
    • using / Time for action – normal mapping in action
  • normal matrix
    • calculating / Calculating the Normal matrix
    • about / Calculating the Normal matrix, WebGL implementation
  • normals
    • about / Normals, Using lights, normals, and materials in the pipeline
    • calculating, cross product used / Normals
    • calculating / Normals
    • updating, for shared vertices / Normals
  • normal transformations
    • about / Normal transformations
    • normal matrix, calculating / Calculating the Normal matrix
  • normal vectors
    • about / Normal transformations
  • norm parameter / Pointing an attribute to the currently bound VBO

O

  • objectLabelGenerator function / Time for action – unique object labels
  • objects
    • about / Structure of a WebGL application
    • colors, using / Use of color in objects
  • Objects as OBJ Objects, Export OBJ panel / Exporting the Blender models
  • OBJ files
    • parsing / Parsing the OBJ files
  • OBJ format
    • about / Understanding the OBJ format
    • Vertex / Understanding the OBJ format
    • Vertex / Texture Coordinate / Understanding the OBJ format
    • Vertex / Texture Coordinate / Normal / Understanding the OBJ format
    • Vertex // Normal / Understanding the OBJ format
  • offscreen framebuffer
    • setting up / Setting up an offscreen framebuffer
    • texture, creating to store colors / Creating a texture to store colors
    • Renderbuffer, creating to store depth information / Creating a Renderbuffer to store depth information
    • framebuffer, creating to offscreen rendering / Creating a framebuffer for offscreen rendering
    • rendering to / Rendering to an offscreen framebuffer
    • pixels, reading from / Reading pixels from the offscreen framebuffer
  • offscreen rendering
    • framebuffer, creating / Creating a framebuffer for offscreen rendering
  • offset parameter / Pointing an attribute to the currently bound VBO
  • onblur event / JavaScript timers
  • one color per object
    • assigning, in scene / Assigning one color per object in the scene
  • onfocus event / JavaScript timers
  • onFrame function / Setting up the animation timer
  • onload event / WebGLApp review
  • onLoad event / Back to WebGL
  • onmouseup event / Clicking on the canvas
  • OpenGL Shading Language ES specification
    • uniforms / How many uniforms can we use?
  • operators, ESSL
    • about / Operators and functions
  • optimization strategies
    • about / Optimization strategies
    • batch performance, optimizing / Optimizing batch performance
    • translations, performing in vertex shader / Performing translations in the vertex shader
  • orbiting camera / Orbiting camera
  • orthogonal projection
    • about / Perspective or orthogonal projection
    / Time for action – orthographic and perspective projections

P

  • parametric curves
    • about / Parametric curves
    • initialization steps / Initialization steps
    • animation timer, setting up / Setting up the animation timer
    • animation, running / Running the animation
    • ball, drawing in current position / Drawing each ball in its current position
    • ball, bouncing / Time for action – bouncing ball
  • particle effect
    • about / Point sprites
  • pcolor property / Time for action – unique object labels
  • per-fragment coloring
    • about / Per-fragment coloring
    • cube, coloring / Time for action – coloring the cube
    • and constant coloring, comparing / Time for action – coloring the cube
  • per-vertex coloring
    • about / Per-vertex coloring
  • perspective division
    • about / Perspective division
  • perspective matrix
    • about / Projection transform, WebGL implementation, The Perspective matrix
    • Field of view (FOV) / Field of view
    • perspective projection / Perspective or orthogonal projection, Time for action – orthographic and perspective projections
    • orthogonal projection / Time for action – orthographic and perspective projections
    • projective transform and Model-View transform, integrating / Have a go hero – integrating the Model-view and the projective transform
  • perspective projection
    • about / Perspective or orthogonal projection
    / Time for action – orthographic and perspective projections
  • Phong lighting
    • Phong shading with / Time for action – Phong shading with Phong lighting
  • Phong reflection model
    • Goraud shading with / Goraud shading with Phong reflections
    • about / Implementing the shaders
  • Phong reflection model, light reflection models
    • about / Phong reflection model
  • Phong shading
    • about / Phong shading, Implementing the shaders
    • with Phong lighting / Time for action – Phong shading with Phong lighting
  • pickedObject / Looking for hits
  • Picker.js / Architectural review
  • picker architecture
    • about / Picker architecture
    • picker searches for hit / Picker architecture
    • user drags mouse in picking mode / Picker architecture
    • remove hit from picking list / Picker architecture
    • add hit to picking list / Picker architecture
    • end picking mode / Picker architecture
  • picker configuration
    • for unique object labels / Time for action – unique object labels
  • Picker object / Picker architecture
  • picker searches for hit / Picker architecture
  • picking
    • about / Picking
    • application architecture / Architectural updates, Time for action – picking
  • Picking Image button / Time for action – picking
  • pixels / Fragment shader
    • reading, from offscreen framebuffer / Reading pixels from the offscreen framebuffer
  • POINTS mode / Time for action – rendering modes
  • POINTS primitive type / Point sprites
  • point sprites
    • about / Point sprites
    • POINTS primitive type / Point sprites
    • using, to create sparks fountain / Time for action – using point sprites to create a fountain of sparks
  • polygon rasterization / Ray tracing in fragment shaders
  • polygon stippling / Transparency
  • polynomial interpolation
    • about / Polynomial interpolation
  • positional light
    • about / Lights
  • positional lights
    • about / More on lights: positional lights
    • in action / Time for action – positional lights in action
  • positionGenerator function / Time for action – unique object labels
  • PostProcess class / Time for action – examining the ray traced scene
  • post processing effect
    • about / Post-processing
    • example / Post-processing
    • framebuffer, creating / Creating the framebuffer
    • geometry, creating / Creating the geometry
    • shader, setting up / Setting up the shader
    • architectural updates / Architectural updates
    • testing / Time for action – testing some post-process effects
  • pos_cone variable / Time for action – simple animation
  • pos_sphere variable / Time for action – simple animation
  • previous property / Time for action – unique object labels
  • processHitsCallback(hits) callback / Picker architecture
  • processHits function / Time for action – unique object labels, Have a go hero – clearing the scene
  • Program.js / Supporting objects, Architectural review
  • program attributes, WebGL properties
    • mapping / Mapping the Program attributes and uniforms
  • projection transform
    • about / Projection transform
  • projective Space
    • about / Homogeneous coordinates
  • projective transform
    • and Model-View transform, integrating / Have a go hero – integrating the Model-view and the projective transform
  • projective transformations / Homogeneous coordinates

R

  • R / Goraud shading with Phong reflections
  • ray casting
    • about / Picking
  • ray tracing
    • in fragment shaders / Ray tracing in fragment shaders
    • scene, examining / Time for action – examining the ray traced scene
  • removeHitCallback(object) callback / Picker architecture
  • remove hit from picking list / Picker architecture
  • removeHit function / Time for action – unique object labels
  • render, JavaScript functions / Architectural review
  • Renderbuffer
    • creating, to store depth information / Creating a Renderbuffer to store depth information
  • renderFirst(objectName) / Time for action – creating a transparent wall
  • render function / Rendering to an offscreen framebuffer, Architectural updates, Time for action – unique object labels, Rendering
  • Render function / Architectural updates
  • rendering
    • about / What kind of rendering does WebGL offer?, Rendering
    • software-based rendering / What kind of rendering does WebGL offer?
    • hardware-based rendering / What kind of rendering does WebGL offer?
    • server-based rendering / What kind of rendering does WebGL offer?
    • client-based rendering / What kind of rendering does WebGL offer?
    • application, customizing / Time for action – customizing the application
  • rendering order / Time for action – creating a transparent wall
  • rendering pipeline
    • about / Overview of WebGL's rendering pipeline
    • Vertex Buffer Objects (VBOs) / Vertex Buffer Objects (VBOs)
    • vertex shader / Vertex shader
    • fragment shader / Fragment shader
    • framebuffer / Framebuffer
    • varyings / Attributes, uniforms, and varyings
    • attributes / Attributes, uniforms, and varyings
    • uniforms / Attributes, uniforms, and varyings
    • updating / Updated rendering pipeline
  • rendering rate
    • configuring / Configuring the rendering rate
  • renderLast(objectName) / Time for action – creating a transparent wall
  • renderLater(objectName) / Time for action – creating a transparent wall
  • renderLoop function / Time for action – rendering a square
  • renderOrder() / Time for action – creating a transparent wall
  • renderSooner(objectName) / Time for action – creating a transparent wall
  • REPEAT wrap mode / REPEAT
  • requestAnimFrame function
    • about / requestAnimFrame function
    / JavaScript timers
  • resetParticle function / Time for action – using point sprites to create a fountain of sparks
  • RGBA model / Using colors in WebGL
  • right / Perspective or orthogonal projection
  • right vector / Camera model
  • rotate operation / JavaScript matrices
  • rotation matrix
    • about / Rotation matrix
  • Runge's phenomenon
    • about / Polynomial interpolation
  • runWebGLApp function / Back to WebGL, WebGLApp review, Creating an animation timer, Rendering to an offscreen framebuffer

S

  • sampler2D / Types
  • sampler2D uniform / Using textures in a shader
  • samplerCube / Types
  • samplers / Using textures in a shader
  • scalars array / Time for action – coloring the cube
  • scaleX variable / Time for action – unique object labels
  • scaleY variable / Time for action – unique object labels
  • scene / Using colors in WebGL
    • blue light, adding / Time for action – adding a blue light to a scene
    • color, using / Use of color in the scene
    • one color per object, assigning / Assigning one color per object in the scene
    • setting up / Setting up the scene
  • Scene.js / Architectural review
  • scene.js / Supporting objects
  • scene object / Loading the cars
  • Scene object / Rendering
  • sceneTime variable / Running the animation
  • SceneTransform.js / Architectural review
  • SceneTransforms object / Adding support for matrix stacks
  • SceneTransforms object, WebGL properties / The SceneTransforms object
  • server-based rendering / What kind of rendering does WebGL offer?
  • setMatrixUniforms function / setMatrixUniforms, Adding support for matrix stacks
  • shader
    • textures, using / Using textures in a shader
  • shader, post processing effect
    • setting up / Setting up the shader
  • shaders
    • about / Implementing the shaders
  • shaderSource function / Creating a program
  • shading
    • about / Shading methods and light reflection models
  • shininess / Time for action – Goraud shading
  • size parameter / Pointing an attribute to the currently bound VBO
  • software-based rendering / What kind of rendering does WebGL offer?
  • specular / Phong reflection model
  • sphere color / Time for action – updating uniforms in real time
  • sphere color (material diffuse term) / Time for action – Goraud shading
  • square
    • rendering / Putting everything together, Time for action – rendering a square
    • getGLContext function / Time for action – rendering a square
    • initProgram function / Time for action – rendering a square
    • initBuffers function / Time for action – rendering a square
    • renderLoop function / Time for action – rendering a square
    • drawScene function / Time for action – rendering a square
    • color, changing / Have a go hero – changing the square color
  • square.blend / Understanding the OBJ format
  • startAnimation function / Creating an animation timer, Setting up the animation timer
  • STATIC_DRAW / Operations to manipulate WebGL buffers
  • storage qualifier, ESSL
    • attribute / Storage qualifier
    • uniform / Storage qualifier
    • varying / Storage qualifier
    • const / Storage qualifier
  • STREAM_DRAW / Operations to manipulate WebGL buffers
  • stride parameter / Pointing an attribute to the currently bound VBO
  • subtractive blending, alpha blending mode / Subtractive blending
  • system requisites, WebGL
    • about / System requirements

T

  • tangent space / Normal mapping
  • texels / Texture filter modes
  • texImage2D call / Creating and uploading a texture
  • texParameteri / Texture filter modes, Texture wrapping
  • texture
    • mapping / What is texture mapping?
    • creating / Creating and uploading a texture
    • uploading / Creating and uploading a texture
    • texImage2D call / Creating and uploading a texture
    • coordinates, using / Using texture coordinates
    • using, in shader / Using textures in a shader
    • filter modes / Texture filter modes
    • mipmapping / Mipmapping
    • creating, to store colors / Creating a texture to store colors
  • texture, using in shader
    • about / Using textures in a shader
    • cube, texturing / Time for action – texturing the cube, What just happened?
  • texture2D / Using textures in a shader
  • texture coordinates
    • using / Using texture coordinates
  • texture mapping
    • about / What is texture mapping?
  • texture wrapping
    • about / Texture wrapping
    • modes / Time for action – trying different wrap modes
    • CLAMP_TO_EDGE mode / CLAMP_TO_EDGE
    • REPEAT mode / REPEAT
    • MIRRORED_REPEAT mode / MIRRORED_REPEAT
  • TEXTURE_CUBE_MAP target / Cube maps
  • TEXTURE_MIN_FILTER / Mipmapping
  • TEXTURE_MIN_FILTER mode / Mipmapping
  • timing strategies
    • about / Timing strategies
    • animation strategy / Animation strategy
    • simulation strategy / Simulation strategy
    • animation and simulation, combined approach / Combined approach: animation and simulation
  • top / Perspective or orthogonal projection
  • tracking camera
    • about / Tracking camera
    • camera, rotating around location / Rotating the camera around its location
    • camera, translating in line of sight / Translating the camera in the line of sight
    • camera model / Camera model
    • Nissan GTX, exploring / Time for action – exploring the Nissan GTX
    • light positions, updating / Have a go hero – updating light positions
  • transforms.calculateModelView() / Time for action – simple animation
  • translation vector
    • about / Translation vector
  • transparent objects
    • creating / Creating transparent objects
    • face culling / Creating transparent objects
    • face culling used / Time for action – culling
  • transparent wall
    • creating / Time for action – creating a transparent wall
  • transpose operation / JavaScript matrices
  • TRIANGLES mode / Time for action – rendering modes
  • TRIANGLE_FAN mode / Time for action – rendering modes
  • TRIANGLE_STRIP mode / Time for action – rendering modes
  • Triangulate Faces, Export OBJ panel / Exporting the Blender models
  • trilinear filtering / LINEAR_MIPMAP_LINEAR
  • type parameter / Pointing an attribute to the currently bound VBO

U

  • uKa, materials uniforms / Implementing the shaders
  • uKd, materials uniforms / Implementing the shaders
  • uKs, materials uniforms / Implementing the shaders
  • uLa[NUM_LIGHTS], light uniform arrays / Implementing the shaders
  • uLd[NUM_LIGHTS], light uniform arrays / Implementing the shaders
  • uLs[NUM_LIGHTS], light uniform arrays / Implementing the shaders
  • uMVMatrix / Working with matrices in ESSL
  • uNi, materials uniforms / Implementing the shaders
  • uniform4fv function / Use of color in lights
  • uniform arrays
    • using, to handle multiple lights / Using uniform arrays to handle multiple lights
    • declaration / Uniform array declaration
    • JavaScript array mapping / JavaScript array mapping
    • white light, adding to scene / Time for action – adding a white light to a scene
    • light uniform arrays / Implementing the shaders
  • uniformList array / Improving how we pass uniforms to the program
  • uniforms / Attributes, uniforms, and varyings
    • and attributes, differences / Parallelism and the difference between attributes and uniforms
    • about / How many uniforms can we use?
    • passing, to programs / Improving how we pass uniforms to the program
  • uniforms, ESSL
    • about / Uniforms
  • uniforms, WebGL properties
    • mapping / Mapping the Program attributes and uniforms
    • initialization / Uniform initialization
  • uniform[1234][fi], WebGL function / Initializing attributes and uniforms
  • uniform[1234][fi]v, WebGL function / Initializing attributes and uniforms
  • unique object labels
    • implementing / Implementing unique object labels
    • random scene, creating / Time for action – unique object labels
    • using, in fragment shader / Time for action – unique object labels
    • picker, configuring for / Time for action – unique object labels
    • scene, testing / Time for action – unique object labels
  • uNMatrix / Working with matrices in ESSL
  • uNs, materials uniforms / Implementing the shaders
  • unwrapping
    • about / Using texture coordinates
  • uOffscreen uniform / Rendering to an offscreen framebuffer
  • updateLightPosition function / Have a go hero – adding interactivity with JQuery UI
  • update method / Running the animation
  • updateParticles function / Time for action – using point sprites to create a fountain of sparks
  • updateTransforms / updateTransforms
  • updateTransforms function / Time for action – orthographic and perspective projections, updateTransforms, Adding support for matrix stacks
  • uPMatrix / Working with matrices in ESSL
  • up vector / Camera model
  • Use Lambert Coefficient button / Time for action – coloring the cube
  • useProgram(Object program), WebGL function / Creating a program
  • user drags mouse in picking mode / Picker architecture
  • Utils.js / Supporting objects, Architectural review
  • UV Mapping
    • about / Using texture coordinates
  • UVs
    • about / Using texture coordinates

V

  • var aBuffer = createBuffer(void) method / Operations to manipulate WebGL buffers
  • variable declaration
    • storage qualifier / Storage qualifier
  • Var reference = getAttribLocation(Object program,String name), WebGL function / Creating a program
  • var reference= getUniformLocation(Object program,String uniform), WebGL function / Creating a program
  • varyings / Attributes, uniforms, and varyings
  • varyings, ESSL
    • about / Varyings
  • VBOs
    • about / Vertices and Indices, Vertex Buffer Objects (VBOs)
    • attributes, associating / Associating attributes to VBOs
    • attribute, pointing / Pointing an attribute to the currently bound VBO
    • index parameter / Pointing an attribute to the currently bound VBO
    • size parameter / Pointing an attribute to the currently bound VBO
    • type parameter / Pointing an attribute to the currently bound VBO
    • norm parameter / Pointing an attribute to the currently bound VBO
    • stride parameter / Pointing an attribute to the currently bound VBO
    • offset parameter / Pointing an attribute to the currently bound VBO
    • attribute, enabling / Enabling the attribute
    • rendering / Rendering
    • drawArrays function / The drawArrays and drawElements functions
    • drawElements function / The drawArrays and drawElements functions
  • vec2 / Types
  • vec3 / Types
  • vec4 / Types
  • vector components, ESSL / Vector components
  • vector sum
    • about / Normals
  • Vertex, OBJ format / Understanding the OBJ format
  • Vertex // Normal, OBJ format / Understanding the OBJ format
  • Vertex / Texture Coordinate, OBJ format / Understanding the OBJ format
  • Vertex / Texture Coordinate / Normal, OBJ format / Understanding the OBJ format
  • vertexAttribPointer / Pointing an attribute to the currently bound VBO
  • vertex attributes, ESSL
    • about / Vertex attributes
  • Vertex Buffer object / Per-vertex coloring
  • vertex shader
    • about / Vertex shader
  • Vertex Shader
    • updating / Time for action – adding a blue light to a scene
  • vertex shader, ESSL
    • about / Vertex shader
  • Vertex Shader attribute / Per-vertex coloring
  • vertex transformations
    • about / Vertex transformations, View transform
    • homogeneous coordinates / Homogeneous coordinates
    • model transform / Model transform
    • projection transform / Projection transform
    • perspective division / Perspective division
    • viewport transform / Viewport transform
  • vertices
    • about / Vertices and Indices
  • vertices array / Time for action – coloring the cube
  • vFinalColor variable / Types
  • vFinalColor[3] / Vector components
  • view matrix
    • about / View transform
  • viewport coordinates
    • about / Viewport transform
  • viewport function
    • about / Viewport transform
    / Have a go hero – integrating the Model-view and the projective transform
  • viewport transform
    • about / Viewport transform
  • Virtual Car Showroom application
    • about / Virtual car showroom
    • finished scene, visualizing / Time for action – visualizing a finished scene, What just happened?
    • creating / Virtual Car Showroom application
    • models, complexity / Complexity of the models
    • shader quality / Shader quality
    • network delays / Network delays and bandwidth consumption
    • bandwidth consumption / Network delays and bandwidth consumption
    • cars, loading in WebGl scene / Load cars into our WebGL scene
    • application, customizing / Time for action – customizing the application
  • void / Types

W

  • wall
    • working on / Time for action – working on the wall
  • Wall First button / Time for action – creating a transparent wall
  • Wavefront OBJ / Loading the cars
  • WebGL
    • system requisites / System requirements
    • rendering / What kind of rendering does WebGL offer?
    • software-based rendering / What kind of rendering does WebGL offer?
    • hardware-based rendering / What kind of rendering does WebGL offer?
    • server-based rendering / What kind of rendering does WebGL offer?
    • client-based rendering / What kind of rendering does WebGL offer?
    • advantages / What kind of rendering does WebGL offer?
    • context attributes, setting up / Time for action – setting up WebGL context attributes
    • geometry, rendering / Rendering geometry in WebGL
    • geometry defining, JavaScript arrays used / Defining a geometry using JavaScript arrays
    • buffers, creating / Creating WebGL buffers
    • application, architecture / Back to WebGL
    • program, creating / Creating a program
    • attributes, initializing / Initializing attributes and uniforms
    • uniforms, initializing / Initializing attributes and uniforms
    • and ESSL, gap bridging / Bridging the gap between WebGL and ESSL
    • matrix multiplications / Thinking about matrix multiplications in WebGL
    • colors, using / Using colors in WebGL
  • WebGL, implementation
    • about / WebGL implementation
    • Model-View matrix / WebGL implementation
    • Normal matrix / WebGL implementation
    • Perspective matrix / WebGL implementation
    • JavaScript matrices / JavaScript matrices
    • JavaScript matrices, mapping to GLSL uniforms / Mapping JavaScript matrices to ESSL uniforms
    • matrices, in GLSL / Working with matrices in ESSL
  • WebGL 3D scenes
    • objects / Using colors in WebGL
    • lights / Using colors in WebGL
    • scene / Using colors in WebGL
  • WebGL alpha blending API
    • about / WebGL alpha blending API
    • gl.enable|disable (gl.BLEND) function / WebGL alpha blending API
    • gl.blendFunc (sW, dW) function / WebGL alpha blending API
    • gl.blendFuncSeparate(sW_rgb, dW_rgb, sW_a, dW_a) function / WebGL alpha blending API
    • gl.blendEquation(mode) function / WebGL alpha blending API
    • gl.blendEquationSeparate(modeRGB, modeAlpha) function / WebGL alpha blending API
    • gl.blendColor ( red, green, blue, alpha) function / WebGL alpha blending API
    • gl.getParameter(pname) function / WebGL alpha blending API
  • WebGL API
    • accessing, context used / Using the context to access the WebGL API
  • WebGLApp.js / Supporting objects, Architectural review
  • WebGLApp.run() / Configuring the rendering rate
  • WebGLApp class
    • about / JavaScript timers
  • WebGL application
    • structure / Structure of a WebGL application
    • creating / Creating a WebGL application
    • Virtual Car Showroom application / Virtual Car Showroom application
  • WebGL application, structure
    • about / Structure of a WebGL application
    • canvas / Structure of a WebGL application
    • objects / Structure of a WebGL application
    • lights / Structure of a WebGL application
    • camera / Structure of a WebGL application
  • WebGLApp object
    • about / WebGLApp review
  • WEBGLAPP_RENDER_RATE / Configuring the rendering rate
  • WebGL context
    • about / Accessing a WebGL context
    • accessing, steps for / Time for action – accessing the WebGL context
  • WebGL examples, structure
    • about / Structure of the WebGL examples
    • objects supported / Supporting objects
    • life-cycle functions / Life-cycle functions
    • matrix handling functions / Matrix handling functions
  • WebGL function
    • createProgram() / Creating a program
    • attachShader(Object program, Object shader) / Creating a program
    • linkProgram(Object program) / Creating a program
    • getProgramParameter(Object program, Object parameter) / Creating a program
    • useProgram(Object program) / Creating a program
    • Var reference = getAttribLocation(Object program,String name) / Creating a program
    • var reference= getUniformLocation(Object program,String uniform) / Creating a program
    • uniform[1234][fi] / Initializing attributes and uniforms
    • uniform[1234][fi]v / Initializing attributes and uniforms
    • getUniform(program, reference) / Initializing attributes and uniforms
  • WebGL index buffer
    • about / Vertices and Indices
  • WebGL properties
    • configuring / Configuring some WebGL properties
    • camera, setting up / Setting up the camera
    • camera interactor, creating / Creating the Camera Interactor
    • SceneTransforms object / The SceneTransforms object
    • lights, creating / Creating the lights
    • program attributes, mapping / Mapping the Program attributes and uniforms
    • uniforms, mapping / Mapping the Program attributes and uniforms
    • uniform initialization / Uniform initialization
  • WebGL vertex buffer / Vertices and Indices
  • web server, asynchronous response
    • setting up / Setting up a web server
  • web server requirement, asynchronous response / Working around the web server requirement
  • Web Workers
    • about / Web Workers: Real multithreading in JavaScript
    • URL / Web Workers: Real multithreading in JavaScript
  • width attribute / Understanding canvas attributes
  • window.requestAnimFrame() function
    • about / requestAnimFrame function
  • world space
    • versus camera space / Time for action – exploring translations: world space versus camera space, Time for action – exploring rotations: world space versus camera space
  • Write Materials, Export OBJ panel / Exporting the Blender models
lock icon The rest of the chapter is locked
arrow left Previous Section
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime