WebGL Programming Guide: Interactive 3D Graphics Programming with WebGL (OpenGL)

By Rodger Lea

Using WebGL®, you could create refined interactive 3D photographs within internet browsers, with out plug-ins. WebGL makes it attainable to construct a brand new iteration of 3D net video games, consumer interfaces, and knowledge visualization recommendations that may run on any typical net browser, and on desktops, smartphones, drugs, video game consoles, or different units. WebGL Programming consultant can assist you start fast with interactive WebGL 3D programming, whether you don't have any earlier wisdom of HTML5, JavaScript, 3D images, arithmetic, or OpenGL.

 

You’ll study step by step, via practical examples, construction your talents as you progress from uncomplicated to advanced suggestions for construction visually attractive web content and 3D functions with WebGL. Media, 3D portraits, and WebGL pioneers Dr. Kouichi Matsuda and Dr. Rodger Lea provide easy-to-understand tutorials on key facets of WebGL, plus a hundred downloadable pattern courses, each one demonstrating a particular WebGL subject.

 

You’ll circulation from uncomplicated thoughts similar to rendering, animating, and texturing triangles, the entire method to complex strategies equivalent to fogging, shadowing, shader switching, and exhibiting 3D versions generated via Blender or different authoring instruments. This ebook won’t simply train you WebGL top practices, it is going to offer you a library of code to jumpstart your personal projects.

 

Coverage includes:

• WebGL’s starting place, middle suggestions, beneficial properties, merits, and integration with different internet standards
• How and uncomplicated WebGL capabilities interact to bring 3D graphics
• Shader improvement with OpenGL ES Shading Language (GLSL ES)
• 3D scene drawing: representing consumer perspectives, controlling house quantity, clipping, item construction, and perspective
• reaching larger realism via lighting fixtures and hierarchical objects
• complicated strategies: item manipulation, heads-up monitors, alpha mixing, shader switching, and more
• important reference appendixes overlaying key matters starting from coordinate structures to matrices and shader loading to internet browser settings

 

This is the most recent textual content within the OpenGL Technical Library, Addison-Wesley’s definitive choice of programming courses an reference manuals for OpenGL and its comparable applied sciences. The Library allows programmers to achieve a realistic figuring out of OpenGL and the opposite Khronos application-programming libraries together with OpenGL ES and OpenCL. the entire applied sciences within the OpenGL Technical Library evolve lower than the auspices of the Khronos staff, the consortium guiding the evolution of contemporary, open-standards media APIs.

Show description

Preview of WebGL Programming Guide: Interactive 3D Graphics Programming with WebGL (OpenGL) PDF

Best Programming books

Joe Celko's SQL for Smarties: Advanced SQL Programming Third Edition (The Morgan Kaufmann Series in Data Management Systems)

SQL for Smarties used to be hailed because the first e-book committed explicitly to the complex concepts had to remodel an skilled SQL programmer into knowledgeable. Now, 10 years later and within the 3rd version, this vintage nonetheless reigns very best because the e-book written through an SQL grasp that teaches destiny SQL masters.

Designing Audio Effect Plug-Ins in C++: With Digital Audio Signal Processing Theory

Not only one other theory-heavy electronic sign processing ebook, nor one other boring build-a-generic-database programming ebook, Designing Audio influence Plug-Ins in C++ offers every little thing you every thing you must recognize to just do that, together with totally labored, downloadable code for dozens audio impression plug-ins and essentially awarded algorithms.

Effective C++: 55 Specific Ways to Improve Your Programs and Designs (3rd Edition)

“Every C++ expert wishes a duplicate of powerful C++. it's an absolute must-read for a person considering doing severe C++ improvement. If you’ve by no means learn potent C++ and also you imagine you recognize every little thing approximately C++, re-examine. ”— Steve Schirripa, software program Engineer, Google “C++ and the C++ neighborhood have grown up within the final fifteen years, and the 3rd variation of powerful C++ displays this.

Cocoa Design Patterns

“Next time a few child exhibits up at my door soliciting for a code evaluation, this can be the booklet that i'm going to throw at him. ”   –Aaron Hillegass, founding father of great Nerd Ranch, Inc. , and writer of Cocoa Programming for Mac OS X   Unlocking the secrets and techniques of Cocoa and Its Object-Oriented Frameworks   Mac and iPhone builders are frequently beaten via the breadth and class of the Cocoa frameworks.

Additional resources for WebGL Programming Guide: Interactive 3D Graphics Programming with WebGL (OpenGL)

Show sample text content

Uniform1f() is a technique to assign a unmarried worth (v0), gl. uniform2f() assigns values (v0 and v1), and gl. uniform3f() assigns 3 values (v0, v1, and v2). * * * gl. uniform1f(location, v0) gl. uniform2f(location, v0, v1) gl. uniform3f(location, v0, v1, v2) gl. uniform4f(location, v0, v1, v2, v3) Assign info to the uniform variable laid out in place. gl. uniform1f() exhibits that just one price is handed, and it'll be used to change the 1st component to the uniform variable. the second one and 3rd elements could be set to zero. zero, and the fourth part could be set to one. zero. equally, gl. uniform2f() exhibits that values are supplied for the 1st elements, the 3rd part may be set to zero. zero, and the fourth part could be set to one. zero. gl. uniform3f() exhibits that values are supplied for the 1st 3 elements and the fourth part should be set to at least one. zero, while gl. unifrom4f() exhibits that values are supplied for all 4 parts. * * * precis during this bankruptcy, you observed the center capabilities of WebGL and the way to take advantage of them. particularly, you realized approximately shaders, that are the most mechanism utilized in WebGL to attract photographs. in keeping with this, you built a number of pattern courses beginning with an easy software to attract a crimson element, after which you further complexity by way of altering its place according to a mouse click on and altered its colour. In either situations, those examples helped you know how to move info from a JavaScript software to the shaders, so that it will be serious for destiny examples. The shapes present in this bankruptcy have been nonetheless simply two-dimensional issues. although, you could practice an identical wisdom of using the middle WebGL features and shaders to extra complicated shapes and to 3-dimensional items. A key studying element during this bankruptcy is that this: A vertex shader plays per-vertex operations, and a fraction shader plays per-fragment operations. the subsequent chapters clarify a few of the different services of WebGL, whereas slowly expanding the complexity of the shapes that you simply control and reveal at the display. bankruptcy three. Drawing and reworking Triangles bankruptcy 2, “Your First Step with WebGL,” defined the fundamental method of drawing WebGL photographs. You observed tips to retrieve the WebGL context and transparent a in training for drawing your 2D/3DCG. then you definately explored the jobs and contours of the vertex and fragment shaders and the way to really draw pictures with them. With this uncomplicated constitution in brain, then you definitely built a number of pattern courses that drew easy shapes composed of issues at the reveal. This bankruptcy builds on these fundamentals by way of exploring how you can draw extra complicated shapes and the way to control these shapes in 3D house. specifically, this bankruptcy seems to be at • The severe position of triangles in 3DCG and WebGL’s aid for drawing triangles • utilizing a number of triangles to attract different easy shapes • uncomplicated modifications that circulate, rotate, and scale triangles utilizing easy equations • How matrix operations make changes easy through the tip of this bankruptcy, you might have a finished knowing of WebGL’s help for drawing simple shapes and the way to take advantage of matrix operations to control these shapes.

Download PDF sample

Rated 4.01 of 5 – based on 27 votes