hello.
I have a lot of GLEntity objects(30000-100000),instance of classes that manage the drawing of some objects.
I wish create a brute force selection system with opencl: i have a rectangular selection , all that is in this rectangle must be selected.
My problem is to use a bank of memory with the id of the entity and a value that represent if the entity is selected/unselected state.
I would ,after i launched the kernel and filled this memory bank with the data of a cl buffer(output of the kernel) that all the connected GLEentities objects ,obtain
the value.

for example:
bank 1:
0 1 //selected
1 0 //unselected
2 0 //unselected
3 1 //selected
Code :
class CEntity....
int m_selected;//this var must be linked to the memory bank after I launch the kernel and reads the cl buffer result
drawGL()
{
       if(m_selected = ffffffff)
            drawGLSelected();
       else
            drawGlUnselected 
}
there is a correct system for do that with opencl?with pointers ? How?
thanks.