From ee476a604866369fbcb20b3db1610638c6f61b2b Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Tue, 20 Sep 2016 19:45:50 -0700 Subject: [PATCH] GLTextures store the source for easier debugging --- libraries/gpu-gl/src/gpu/gl/GLTexture.cpp | 1 + libraries/gpu-gl/src/gpu/gl/GLTexture.h | 1 + 2 files changed, 2 insertions(+) diff --git a/libraries/gpu-gl/src/gpu/gl/GLTexture.cpp b/libraries/gpu-gl/src/gpu/gl/GLTexture.cpp index c2d6b3eb54..16ee81592a 100644 --- a/libraries/gpu-gl/src/gpu/gl/GLTexture.cpp +++ b/libraries/gpu-gl/src/gpu/gl/GLTexture.cpp @@ -135,6 +135,7 @@ float GLTexture::getMemoryPressure() { // Create the texture and allocate storage GLTexture::GLTexture(const std::weak_ptr& backend, const Texture& texture, GLuint id, bool transferrable) : GLObject(backend, texture, id), + _source(texture.source()), _storageStamp(texture.getStamp()), _target(getGLTextureType(texture)), _internalFormat(gl::GLTexelFormat::evalGLTexelFormatInternal(texture.getTexelFormat())), diff --git a/libraries/gpu-gl/src/gpu/gl/GLTexture.h b/libraries/gpu-gl/src/gpu/gl/GLTexture.h index fa893ae52a..4375d0644f 100644 --- a/libraries/gpu-gl/src/gpu/gl/GLTexture.h +++ b/libraries/gpu-gl/src/gpu/gl/GLTexture.h @@ -111,6 +111,7 @@ public: ~GLTexture(); const GLuint& _texture { _id }; + const std::string _source; const Stamp _storageStamp; const GLenum _target; const GLenum _internalFormat;