//------------------------------------- // Loads in a image from a file and returns it // p1 in - pointer to the imagedata for the mesh // rv - pointer IImage object and nullptr if failed IImage *CRendererOpenGL::LoadImage(ImageData* id) { IImage *pImage = new CImageOpenGL(); if( !pImage->Load(id) ) { delete pImage; return nullptr; } m_vpImages.push_back(pImage); return pImage; }