I changed
//create 5x5 pixel picking region near cursor location
GLU.gluPickMatrix( (float) mouse_x, (float) mouse_y, 5.0f, 5.0f, viewport);
to
//create 5x5 pixel picking region near cursor location
GLU.gluPickMatrix( (float) mouse_x, (float) mouse_y, 5.0f, 5.0f,IntBuffer.wrap(viewport));
To get the last example to work. It was either incorrect code before or a change in GLU.gluPickMatrix since the lastest lwjgl version?
Is this the correct way of solving this?
Thanks, Del
Edit -
Also, would this be a good way to detect what I've hit, in say a first person shooter if mouse x and y where just switch with the crosshair's x and y(center of screen in most cases)?