This patch is for first-hit selection, storing selection ID's in color.
- Off screen buffer is used so we can draw RGBA (screen context uses RGB with no alpha channels).
- Selection caches the the region to avoid multiple buffer reads (for object selection which currently does 3x draws for regular selection).
Proof of concept patch, works with cameras, surfaces, metaballs.
Not meshes or armatures (which change the color).
For this to be properly supported we need:
- better control of color (currently color is set within draw code fairly often).
- ability to force shadeless colors.
This patch could be developed in master but changes to shading would cause *many* conflicts with 2.8x,
so postponing the patch for now, uploading here for reference.