CID#1103719: fix memory leak
use fmod and make code simpler

Change-Id: I09cc4fa8288fafa78083da5bdfb8ddc6fc273da9
apparently the OpenGL doc is wrong, we need GLSL 1.20

Change-Id: I00a98b8a564c7d36f30672ba91593096e460ef8c
extract the Z_STEP value into a define

Change-Id: I38ccce4c35f6cdaa2df0dfc250fcea72a8b79049
better OpenGL debug output

Change-Id: I90a3883c0bbead0de02c8d4096eccecc59f1b0e3