One function to load image and create openGL texture from file, in C++