O'Reilly logo

WebGL Beginner's Guide by Brandon Jones, Diego Cantor

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 8. Picking

Picking refers to the ability of selecting objects in a 3D scene by pointing at them. The most common device used for picking is the mouse. However, picking can also be performed using other human computer interfaces such as tactile screens and haptic devices. In this chapter we will see how picking can be implemented in WebGL.

This chapter talks about:

  • Selecting objects in a WebGL scene using the mouse
  • Creating and using offscreen framebuffers
  • What renderbuffers are and how they are used by framebuffers
  • Reading pixels from framebuffers
  • Using color labels to perform object selection based on color

Picking

Virtually any 3D computer graphics application needs to provide mechanisms for the user to interact with the scene being displayed ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required