picking & draging

i know how to pick and process hits
but i have problems handling “while pressed”

The button press and button release events define two points. When a button is pressed, simply store the mouse x,y at that event, later when the button is released you have two points which can be used to define a rectangle. That rectangle should be used as the bounds of a frustum used when rendering with selection active.

If the points are the same you have a simple mouse click, if different you have a rubber banded selection.

If you want to get fancy you can begin drawing the rubber band when you get a mouse press from that position to the current mouse whenever you get a mouse move event. Then on button release you can perform the selection.