Keep on cleaning

This commit is contained in:
samcake 2017-03-29 18:22:21 -07:00
parent b6504bba56
commit 5584853340
2 changed files with 4 additions and 47 deletions
libraries/gpu/src/gpu

View file

@ -348,24 +348,6 @@ Texture::Size Texture::resize(Type type, const Element& texelFormat, uint16 widt
return _size;
}
/*
Texture::Size Texture::resize1D(uint16 width, uint16 numSamples) {
return resize(TEX_1D, getTexelFormat(), width, 1, 1, numSamples, 0);
}
Texture::Size Texture::resize2D(uint16 width, uint16 height, uint16 numSamples) {
return resize(TEX_2D, getTexelFormat(), width, height, 1, numSamples, 0);
}
Texture::Size Texture::resize3D(uint16 width, uint16 height, uint16 depth, uint16 numSamples) {
return resize(TEX_3D, getTexelFormat(), width, height, depth, numSamples, 0);
}
Texture::Size Texture::resizeCube(uint16 width, uint16 numSamples) {
return resize(TEX_CUBE, getTexelFormat(), width, 1, 1, numSamples, 0);
}
Texture::Size Texture::reformat(const Element& texelFormat) {
return resize(_type, texelFormat, getWidth(), getHeight(), getDepth(), getNumSamples(), _numSlices, getNumMips());
}
*/
bool Texture::isColorRenderTarget() const {
return (_texelFormat.getSemantic() == gpu::RGBA);
@ -486,22 +468,7 @@ void Texture::assignStoredMipFace(uint16 level, uint8 face, storage::StoragePoin
_stamp++;
}
}
/*
uint16 Texture::resizeMips(uint16 maxMip) {
bool changed = false;
auto newMaxMip = std::min((uint16)(evalNumMips() - 1), maxMip);
if (newMaxMip != _maxMip) {
changed = true;
_maxMip = newMaxMip;;
}
if (changed) {
_stamp++;
}
return _maxMip;
}
*/
void Texture::setAutoGenerateMips(bool enable) {
bool changed = false;
if (!_autoGenerateMips) {

View file

@ -340,22 +340,12 @@ public:
Stamp getDataStamp() const { return _storage->getStamp(); }
// The theoretical size in bytes of data stored in the texture
// For the master (level) first level of mip
Size getSize() const override { return _size; }
// The actual size in bytes of data stored in the texture
Size getStoredSize() const;
/*
// Resize, unless auto mips mode would destroy all the sub mips
Size resize1D(uint16 width, uint16 numSamples);
Size resize2D(uint16 width, uint16 height, uint16 numSamples);
Size resize3D(uint16 width, uint16 height, uint16 depth, uint16 numSamples);
Size resizeCube(uint16 width, uint16 numSamples);
// Reformat, unless auto mips mode would destroy all the sub mips
Size reformat(const Element& texelFormat);
*/
// Size and format
Type getType() const { return _type; }
TextureUsageType getUsageType() const { return _usageType; }
@ -395,8 +385,8 @@ public:
// max mip is in the range [ 0 if no sub mips, log2(max(width, height, depth))]
// It is defined at creation time (immutable)
uint16 getNumMips() const { return _maxMipLevel + 1; }
uint16 getMaxMip() const { return _maxMipLevel; }
uint16 getNumMips() const { return _maxMipLevel + 1; }
// Mips size evaluation
@ -448,13 +438,13 @@ public:
uint16 getMinMip() const { return _minMip; }
uint16 usedMipLevels() const { return (_maxMipLevel - _minMip) + 1; }
const std::string& source() const { return _source; }
void setSource(const std::string& source) { _source = source; }
bool setMinMip(uint16 newMinMip);
bool incremementMinMip(uint16 count = 1);
uint16 getMinMip() const { return _minMip; }
uint16 usedMipLevels() const { return (getNumMips() - _minMip); }
// Generate the sub mips automatically for the texture
// If the storage version is not available (from CPU memory)