StelTextureMgr.cpp   StelTextureMgr.cpp 
skipping to change at line 35 skipping to change at line 35
#include <QFileInfo> #include <QFileInfo>
#include <QFile> #include <QFile>
#include <QDebug> #include <QDebug>
#include <QNetworkRequest> #include <QNetworkRequest>
#include <QThread> #include <QThread>
#include <QSettings> #include <QSettings>
#include <cstdlib> #include <cstdlib>
#include <QOpenGLContext> #include <QOpenGLContext>
StelTextureMgr::StelTextureMgr() : glMemoryUsage(0)
{
}
void StelTextureMgr::init() void StelTextureMgr::init()
{ {
} }
StelTextureSP StelTextureMgr::createTexture(const QString& afilename, const StelTexture::StelTextureParams& params) StelTextureSP StelTextureMgr::createTexture(const QString& afilename, const StelTexture::StelTextureParams& params)
{ {
if (afilename.isEmpty()) if (afilename.isEmpty())
return StelTextureSP(); return StelTextureSP();
StelTextureSP tex = StelTextureSP(new StelTexture()); StelTextureSP tex = StelTextureSP(new StelTexture(this));
tex->fullPath = afilename; tex->fullPath = afilename;
QImage image(tex->fullPath); QImage image(tex->fullPath);
if (image.isNull()) if (image.isNull())
return StelTextureSP(); return StelTextureSP();
tex->loadParams = params; tex->loadParams = params;
if (tex->glLoad(image)) if (tex->glLoad(image))
return tex; return tex;
else else
skipping to change at line 66 skipping to change at line 71
qWarning()<<tex->getErrorMessage(); qWarning()<<tex->getErrorMessage();
return StelTextureSP(); return StelTextureSP();
} }
} }
StelTextureSP StelTextureMgr::createTextureThread(const QString& url, const StelTexture::StelTextureParams& params, bool lazyLoading) StelTextureSP StelTextureMgr::createTextureThread(const QString& url, const StelTexture::StelTextureParams& params, bool lazyLoading)
{ {
if (url.isEmpty()) if (url.isEmpty())
return StelTextureSP(); return StelTextureSP();
StelTextureSP tex = StelTextureSP(new StelTexture()); StelTextureSP tex = StelTextureSP(new StelTexture(this));
tex->loadParams = params; tex->loadParams = params;
tex->fullPath = url; tex->fullPath = url;
if (!lazyLoading) if (!lazyLoading)
{ {
tex->bind(); tex->bind();
} }
return tex; return tex;
} }
 End of changes. 3 change blocks. 
2 lines changed or deleted 7 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/