updated ray cast renderer to OpenGL 3.1