History

Merge pull request #4780 from samcake/blue

Add support for Skybox and rendering path of background according to Zones

Brad Hefta-Gaub committed 11 years ago

Commit 55519972 parents 719747e 8fd77f936 files · +1048 −604Browse files

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

Unified · Split

libraries/render-utils/src/TextureCache.cpp+3−3
@@ -89,7 +89,7 @@ const int permutation[256] = · 88 unmodified lines
8989 #define USE_CHRIS_NOISE 1
9090
9191 const gpu::TexturePointer& TextureCache::getPermutationNormalTexture() {
92− if (_permutationNormalTexture.isNull()) {
92+ if (!_permutationNormalTexture) {
9393
9494 // the first line consists of random permutation offsets
9595 unsigned char data[256 * 2 * 3];
@@ -133,7 +133,7 @@ static void loadSingleColorTexture(const unsigned char* color) { · 37 unmodified lines
133133 */
134134
135135 const gpu::TexturePointer& TextureCache::getWhiteTexture() {
136− if (_whiteTexture.isNull()) {
136+ if (!_whiteTexture) {
137137 _whiteTexture = gpu::TexturePointer(gpu::Texture::create2D(gpu::Element(gpu::VEC4, gpu::UINT8, gpu::RGBA), 1, 1));
138138 _whiteTexture->assignStoredMip(0, _whiteTexture->getTexelFormat(), sizeof(OPAQUE_WHITE), OPAQUE_WHITE);
139139 }
@@ -141,7 +141,7 @@ const gpu::TexturePointer& TextureCache::getWhiteTexture() { · 1 unmodified line
141141 }
142142
143143 const gpu::TexturePointer& TextureCache::getBlueTexture() {
144− if (_blueTexture.isNull()) {
144+ if (!_blueTexture) {
145145 _blueTexture = gpu::TexturePointer(gpu::Texture::create2D(gpu::Element(gpu::VEC4, gpu::UINT8, gpu::RGBA), 1, 1));
146146 _blueTexture->assignStoredMip(0, _blueTexture->getTexelFormat(), sizeof(OPAQUE_BLUE), OPAQUE_BLUE);
147147 }