Changeset View
Changeset View
Standalone View
Standalone View
source/graphics/TextureManager.h
/* Copyright (C) 2015 Wildfire Games. | /* Copyright (C) 2017 Wildfire Games. | ||||
* This file is part of 0 A.D. | * This file is part of 0 A.D. | ||||
* | * | ||||
* 0 A.D. is free software: you can redistribute it and/or modify | * 0 A.D. is free software: you can redistribute it and/or modify | ||||
* it under the terms of the GNU General Public License as published by | * it under the terms of the GNU General Public License as published by | ||||
* the Free Software Foundation, either version 2 of the License, or | * the Free Software Foundation, either version 2 of the License, or | ||||
* (at your option) any later version. | * (at your option) any later version. | ||||
* | * | ||||
* 0 A.D. is distributed in the hope that it will be useful, | * 0 A.D. is distributed in the hope that it will be useful, | ||||
▲ Show 20 Lines • Show All 97 Lines • ▼ Show 20 Lines | public: | ||||
* Synchronously converts and compresses and saves the texture, | * Synchronously converts and compresses and saves the texture, | ||||
* and returns the output path (minus a "cache/" prefix). This | * and returns the output path (minus a "cache/" prefix). This | ||||
* is intended for pre-caching textures in release archives. | * is intended for pre-caching textures in release archives. | ||||
* @return true on success | * @return true on success | ||||
*/ | */ | ||||
bool GenerateCachedTexture(const VfsPath& path, VfsPath& outputPath); | bool GenerateCachedTexture(const VfsPath& path, VfsPath& outputPath); | ||||
/** | /** | ||||
* Returns total number of bytes uploaded for all current texture. | * Returns total number of bytes uploaded for all current textures. | ||||
*/ | */ | ||||
size_t GetBytesUploaded() const; | size_t GetBytesUploaded() const; | ||||
/** | |||||
* Create and set the properties for the base and mask of an overlay texture. | |||||
*/ | |||||
void PrepareOverlayTexture(const VfsPath& texturePath, const VfsPath& textureMaskPath, | |||||
CTexturePtr& texture, CTexturePtr& textureMask, float maxAnisotropy); | |||||
private: | private: | ||||
CTextureManagerImpl* m; | CTextureManagerImpl* m; | ||||
}; | }; | ||||
/** | /** | ||||
* Represents the filename and GL parameters of a texture, | * Represents the filename and GL parameters of a texture, | ||||
* for passing to CTextureManager::CreateTexture. | * for passing to CTextureManager::CreateTexture. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 186 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator