mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-06 03:29:44 -06:00
Add option to purge texture from RAM after gpu upload
This commit is contained in:
@@ -39,11 +39,15 @@ class TextureComponent {
|
||||
|
||||
public:
|
||||
TextureComponent() = default;
|
||||
TextureComponent(const Texture::FilterMode filterMode, bool watchFile = true);
|
||||
TextureComponent(const Texture::FilterMode filterMode, bool watchFile = true,
|
||||
bool shouldPurge = true);
|
||||
~TextureComponent() = default;
|
||||
|
||||
Texture* texture() const;
|
||||
|
||||
void setShouldWatchFileForChanges(bool value);
|
||||
void setShouldPurgeFromRAM(bool value);
|
||||
|
||||
void bind();
|
||||
void uploadToGpu();
|
||||
|
||||
@@ -60,9 +64,10 @@ private:
|
||||
|
||||
Texture::FilterMode _filterMode = Texture::FilterMode::LinearMipMap;
|
||||
bool _shouldWatchFile = true;
|
||||
bool _shouldPurgeFromRAM = true;
|
||||
|
||||
bool _fileIsDirty = false;
|
||||
bool _textureIsDirty = false;
|
||||
bool _fileIsDirty;
|
||||
bool _textureIsDirty;
|
||||
};
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
Reference in New Issue
Block a user