I want to implement a region selection using a back buffer selection method. I know opengl has its own selection mechanism but it’s too slow for me.
Let say we have 2 circle that overlap with each other at certain region. To implement the back buffer selection, we just simply assign a different color ID for each circle and use glReadPixels to get the pixel for the current mouse position. But the problem is if our region selection is lie within the overlapping region. And only one color ID will be returned in this case. But what I want is all the entities that lie within the region selection to be selected. So can someone help me to solve this problem? Thanks.