Switched to multitexture mode instead of GLSL.
Using KD trees to find the neighbouring objects.