I thought I could use the normal picking procedure to select objects with a rubberband box but this only works if the area is completely covered with objects.
If I have a part of the area without objects, I get zero hits.
Is this expected behaviour?
If so, what can I do to create a rubberband selection?
int xsize=Math.abs(x0-x);
int ysize=Math.abs(y0-y);
gluPickMatrix( Math.min(x0,x)+xsize/2.0,
Math.min(y0,y)+ysize/2.0, xsize, ysize);
I have not tried it but something like that should work, the example above assume that your y values are correct OpenGL values and not standard mouse coordinates.
(You need to specify the center of the box and the width and height of the box as arguments)