Beispiel #1
0
bool DkImageContainer::loadImage() {

	if (fileBuffer->isEmpty())
		fileBuffer = loadFileToBuffer(fileInfo);

	loader = loadImageIntern(fileInfo, loader, fileBuffer);

	return loader->hasImage();
}
Beispiel #2
0
bool DkImageContainer::loadImage() {

	if (!QFileInfo(mFileInfo).exists())
		return false;

	if (getFileBuffer()->isEmpty())
		mFileBuffer = loadFileToBuffer(mFilePath);

	mLoader = loadImageIntern(mFilePath, getLoader(), mFileBuffer);

	return mLoader->hasImage();
}
void ResourceEngineAndroid::reloadAllTextures() {
	for (auto & tex : m_textures) {
		std::string texName = tex.first;

		// internal, because the image extension has already been added !
		auto texPtr = loadImageIntern(texName, tex.second->getAnimationFrames(),
				false);
		// we just need the id
		logging::Info() << "Prev id : " << tex.second->getID() << " newId: "
				<< texPtr->getID();
		tex.second->setID(texPtr->getID());
		tex.second->setPixelPointer(texPtr->getPixelPointer());
	}
}
TexturePtr ResourceEngineAndroid::loadImage(std::string const& imageName,
		unsigned int frames) {
	std::string imageNameExt = imageName + defaultImageExt();

	return loadImageIntern(imageNameExt, frames, true);
}