Solved error with fbos. While storing texture as attachment a local texture was created and deleted and that causes INVALID_VALUE in GL