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 ...

Get WebGL Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.