Skip to Main Content
WebGL Insights
book

WebGL Insights

by Patrick Cozzi
August 2015
Intermediate to advanced content levelIntermediate to advanced
416 pages
16h 58m
English
A K Peters/CRC Press
Content preview from WebGL Insights
22 2. Mozilla’s Implementation of WebGL
uninitialized texture data would be unacceptable for security and portability reasons.
So WebGL avoids exposing uninitialized memory and instead species that null texture
images must behave as if all bytes were set to 0 (i.e., as transparent black textures).
e straightforward implementation would be to allocate a buer, ll it with zeroes,
and pass it to glTextImage2D. at works, but adds overhead, so Mozilla’s implementa-
tion avoids this approach insofar as possible. e key observation is that in WebGL ren-
dering, all such transparent black textures are indistinguishable from each other. us,
one ca ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning HTML5 Game Programming: Build Online Games with Canvas, SVG, and WebGL

Learning HTML5 Game Programming: Build Online Games with Canvas, SVG, and WebGL

James L. Williams

Publisher Resources

ISBN: 9781498716079