MCPcopy Create free account
hub / github.com/c3d/tao3D / CachedTexture

Method CachedTexture

tao/texture_cache.cpp:559–586  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

557// ============================================================================
558
559CachedTexture::CachedTexture(TextureCache &cache, const QString &path,
560 bool mipmap, bool compress)
561// ----------------------------------------------------------------------------
562// Allocate GL texture ID to image
563// ----------------------------------------------------------------------------
564 : path(path), width(0), height(0), mipmap(mipmap),
565 compress(compress), isDefaultTexture(false),
566 networked(path.contains("://")),
567 cache(cache), GLsize(0),
568 memLRU(this), GLmemLRU(this), saveCompressed(cache.saveCompressed),
569 networkReply(NULL), inLoad(false)
570{
571 GL.GenTextures(1, &id);
572 if (networked)
573 {
574 connect(&cache.network, SIGNAL(finished(QNetworkReply*)),
575 this, SLOT(checkReply(QNetworkReply*)));
576 }
577 else
578 {
579 connect(&cache.fileMonitor, SIGNAL(created(QString,QString)),
580 this, SLOT(onFileCreated(QString,QString)));
581 connect(&cache.fileMonitor, SIGNAL(changed(QString,QString)),
582 this, SLOT(onFileChanged(QString,QString)));
583 connect(&cache.fileMonitor, SIGNAL(deleted(QString,QString)),
584 this, SLOT(onFileDeleted(QString)));
585 }
586}
587
588
589CachedTexture::~CachedTexture()

Callers

nothing calls this directly

Calls 2

GenTexturesMethod · 0.80
containsMethod · 0.45

Tested by

no test coverage detected