History

getting rid of QSHaredPointer in favor of std::shared_ptr

Sam Gateau committed 11 years ago

Commit ade404a1 parent fad623a11 files · +49 −30Browse files

Showing the changes to libraries/render-utils/src/TextureCache.cpp (1 of 11 files). Show all

Unified · Split

libraries/render-utils/src/TextureCache.cpp+3−3
@@ -90,7 +90,7 @@ const int permutation[256] = · 89 unmodified lines
90#define USE_CHRIS_NOISE 190#define USE_CHRIS_NOISE 1
91 91
92const gpu::TexturePointer& TextureCache::getPermutationNormalTexture() {92const gpu::TexturePointer& TextureCache::getPermutationNormalTexture() {
93 if (_permutationNormalTexture.isNull()) {93 if (_permutationNormalTexture) {
94 94
95 // the first line consists of random permutation offsets95 // the first line consists of random permutation offsets
96 unsigned char data[256 * 2 * 3];96 unsigned char data[256 * 2 * 3];
@@ -134,7 +134,7 @@ static void loadSingleColorTexture(const unsigned char* color) { · 37 unmodified lines
134*/134*/
135 135
136const gpu::TexturePointer& TextureCache::getWhiteTexture() {136const gpu::TexturePointer& TextureCache::getWhiteTexture() {
137 if (_whiteTexture.isNull()) {137 if (_whiteTexture) {
138 _whiteTexture = gpu::TexturePointer(gpu::Texture::create2D(gpu::Element(gpu::VEC4, gpu::UINT8, gpu::RGBA), 1, 1));138 _whiteTexture = gpu::TexturePointer(gpu::Texture::create2D(gpu::Element(gpu::VEC4, gpu::UINT8, gpu::RGBA), 1, 1));
139 _whiteTexture->assignStoredMip(0, _whiteTexture->getTexelFormat(), sizeof(OPAQUE_WHITE), OPAQUE_WHITE);139 _whiteTexture->assignStoredMip(0, _whiteTexture->getTexelFormat(), sizeof(OPAQUE_WHITE), OPAQUE_WHITE);
140 }140 }
@@ -142,7 +142,7 @@ const gpu::TexturePointer& TextureCache::getWhiteTexture() { · 1 unmodified line
142}142}
143 143
144const gpu::TexturePointer& TextureCache::getBlueTexture() {144const gpu::TexturePointer& TextureCache::getBlueTexture() {
145 if (_blueTexture.isNull()) {145 if (_blueTexture) {
146 _blueTexture = gpu::TexturePointer(gpu::Texture::create2D(gpu::Element(gpu::VEC4, gpu::UINT8, gpu::RGBA), 1, 1));146 _blueTexture = gpu::TexturePointer(gpu::Texture::create2D(gpu::Element(gpu::VEC4, gpu::UINT8, gpu::RGBA), 1, 1));
147 _blueTexture->assignStoredMip(0, _blueTexture->getTexelFormat(), sizeof(OPAQUE_BLUE), OPAQUE_BLUE);147 _blueTexture->assignStoredMip(0, _blueTexture->getTexelFormat(), sizeof(OPAQUE_BLUE), OPAQUE_BLUE);
148 }148 }