fixed texture error due to uninitialized gl context