From 5c004e2a5cf0e5aed584196d552f728aaf892a28 Mon Sep 17 00:00:00 2001 From: Zach Pomerantz Date: Fri, 15 Apr 2016 13:50:46 -0700 Subject: [PATCH 1/2] Add comment on storage texture ptr --- libraries/gpu/src/gpu/Texture.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/gpu/src/gpu/Texture.h b/libraries/gpu/src/gpu/Texture.h index 9dde359596..70b26e38a6 100755 --- a/libraries/gpu/src/gpu/Texture.h +++ b/libraries/gpu/src/gpu/Texture.h @@ -260,7 +260,7 @@ public: Stamp bumpStamp() { return ++_stamp; } protected: Stamp _stamp = 0; - Texture* _texture = nullptr; + Texture* _texture = nullptr; // Points to the parent texture (not owned) Texture::Type _type = Texture::TEX_2D; // The type of texture is needed to know the number of faces to expect std::vector> _mips; // an array of mips, each mip is an array of faces From f2b9acd84d98707ea78b94ca4fb1acd3259fa6e4 Mon Sep 17 00:00:00 2001 From: Zach Pomerantz Date: Fri, 15 Apr 2016 15:13:23 -0700 Subject: [PATCH 2/2] Rm Texture::createFromStorage --- libraries/gpu/src/gpu/Texture.cpp | 7 ------- libraries/gpu/src/gpu/Texture.h | 2 -- 2 files changed, 9 deletions(-) diff --git a/libraries/gpu/src/gpu/Texture.cpp b/libraries/gpu/src/gpu/Texture.cpp index 15ae609fb9..822c1392df 100755 --- a/libraries/gpu/src/gpu/Texture.cpp +++ b/libraries/gpu/src/gpu/Texture.cpp @@ -221,13 +221,6 @@ Texture* Texture::create(Type type, const Element& texelFormat, uint16 width, ui return tex; } -Texture* Texture::createFromStorage(Storage* storage) { - Texture* tex = new Texture(); - tex->_storage.reset(storage); - storage->assignTexture(tex); - return tex; -} - Texture::Texture(): Resource() { diff --git a/libraries/gpu/src/gpu/Texture.h b/libraries/gpu/src/gpu/Texture.h index 70b26e38a6..9ef98098d3 100755 --- a/libraries/gpu/src/gpu/Texture.h +++ b/libraries/gpu/src/gpu/Texture.h @@ -280,8 +280,6 @@ public: static Texture* create3D(const Element& texelFormat, uint16 width, uint16 height, uint16 depth, const Sampler& sampler = Sampler()); static Texture* createCube(const Element& texelFormat, uint16 width, const Sampler& sampler = Sampler()); - static Texture* createFromStorage(Storage* storage); - Texture(); Texture(const Texture& buf); // deep copy of the sysmem texture Texture& operator=(const Texture& buf); // deep copy of the sysmem texture