How do I perform range picking in the latest OpenGL version? By range picking I mean selecting all objects which are picked using a selection rectangle, like in an RTS game.

For single object picking I'm using the ray picking method, which I guess can be used in this case as well, but I'm not sure how I should go about doing that.

Could you give me any pointers?

Thank you.

  • \$\begingroup\$ Can you describe how your objects are organised in memory? Do you use a scenegraph, octree, BVH or some other kind of space partitioning storage? \$\endgroup\$ Sep 17, 2012 at 9:03
  • \$\begingroup\$ I'm not using any yet, I'm just trying to put together a simple demo which uses ray picking. \$\endgroup\$
    – Pateman
    Sep 17, 2012 at 9:13
  • 1
    \$\begingroup\$ Related / Duplicated: gamedev.stackexchange.com/questions/35929/… \$\endgroup\$
    – Dan
    Sep 17, 2012 at 9:19

1 Answer 1


Range picking is basically a set of intersection tests between objects and camera frustum (6 planes that together define a convex volume). If you have some frustum culling code, you can just fix it up to make it work. The easiest way is to generate point data from camera matrix (view*projection), adjust the point data by means of coordinate transforms and interpolation (interpolate point data on near/far planes depending on the screen-space selection rectangle corner values) and generate planes from those points.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .