fix curShader being disposed/reallocated while rendering