I have been spending a night at my girlfriends place, and you have been trying to help me with my code. Makes me feel kind of bad. But I appreciate it 
SECONDLY:
in the same code (above) you are reassigning sphereList[2] to a whole new memory location (before you set the light)- not only will this mean you will lose the position, radius and material settings but you will also cause a bit of a memory leak .i’m pretty sure you were’nt intending on that so I suggest you remove the second occurrence of sphereList[2] = new Sphere;
This does not really affect my code, as there is no support for lights and the light creation has been commented out from the start, its just a reminder to me that I need to add it later on.
FIRSTLY
you are initialising your green material to the same colour as your red material
Material green(200,0,0);
when i imagine you actually want
Material green(0,200,0);
Thanks for pointing that out, must have missed that.
check that your Scene.getSphere(currentSphere) function is returning the correct sphere
it’s often the simple things (like forgetting to replace a stub function) that screw up code
I thought there might have been something wrong with that part as well, but it looks like it works ok.
just noticed 2 bugs in your code - probably not causing the current issue but still…
I agree, but the color thing made it easier to see what is wrong. Now it looks like the other spheres are only visible if they are inside of the green one.

It looks like there is something wrong with determing which sphere is closest. So I will look into that. ShaderHacker made a post about some errors in my intersection code, so the the problem might be there.
But I think there are one more problem, that causes the spheres to only be displayed if they are inside of the green one. I am open for suggestions to why this happes.
Although it’s too harsh of a guideline to follow all of the time, in general you don’t want to override non-abstract methods for that very reason.
I’ve been burned (badly) by that one.
Can you please explain a bit more? Not really sure what you are saying here.
Thanks again for all help and support:)



