Adapted example after Shader/Program API changes.