Add support for Skybox and rendering path of background according to Zones
Showing the changes to libraries/render-utils/src/TextureCache.cpp (1 of 36 files). Show all
Unified · Split
| @@ -89,7 +89,7 @@ const int permutation[256] = · 88 unmodified lines | |||
| 89 | #define USE_CHRIS_NOISE 1 | 89 | #define USE_CHRIS_NOISE 1 |
| 90 | 90 | ||
| 91 | const gpu::TexturePointer& TextureCache::getPermutationNormalTexture() { | 91 | const gpu::TexturePointer& TextureCache::getPermutationNormalTexture() { |
| 92 | if (_permutationNormalTexture.isNull()) { | 92 | if (!_permutationNormalTexture) { |
| 93 | 93 | ||
| 94 | // the first line consists of random permutation offsets | 94 | // the first line consists of random permutation offsets |
| 95 | unsigned char data[256 * 2 * 3]; | 95 | unsigned char data[256 * 2 * 3]; |
| @@ -133,7 +133,7 @@ static void loadSingleColorTexture(const unsigned char* color) { · 37 unmodified lines | |||
| 133 | */ | 133 | */ |
| 134 | 134 | ||
| 135 | const gpu::TexturePointer& TextureCache::getWhiteTexture() { | 135 | const gpu::TexturePointer& TextureCache::getWhiteTexture() { |
| 136 | if (_whiteTexture.isNull()) { | 136 | if (!_whiteTexture) { |
| 137 | _whiteTexture = gpu::TexturePointer(gpu::Texture::create2D(gpu::Element(gpu::VEC4, gpu::UINT8, gpu::RGBA), 1, 1)); | 137 | _whiteTexture = gpu::TexturePointer(gpu::Texture::create2D(gpu::Element(gpu::VEC4, gpu::UINT8, gpu::RGBA), 1, 1)); |
| 138 | _whiteTexture->assignStoredMip(0, _whiteTexture->getTexelFormat(), sizeof(OPAQUE_WHITE), OPAQUE_WHITE); | 138 | _whiteTexture->assignStoredMip(0, _whiteTexture->getTexelFormat(), sizeof(OPAQUE_WHITE), OPAQUE_WHITE); |
| 139 | } | 139 | } |
| @@ -141,7 +141,7 @@ const gpu::TexturePointer& TextureCache::getWhiteTexture() { · 1 unmodified line | |||
| 141 | } | 141 | } |
| 142 | 142 | ||
| 143 | const gpu::TexturePointer& TextureCache::getBlueTexture() { | 143 | const gpu::TexturePointer& TextureCache::getBlueTexture() { |
| 144 | if (_blueTexture.isNull()) { | 144 | if (!_blueTexture) { |
| 145 | _blueTexture = gpu::TexturePointer(gpu::Texture::create2D(gpu::Element(gpu::VEC4, gpu::UINT8, gpu::RGBA), 1, 1)); | 145 | _blueTexture = gpu::TexturePointer(gpu::Texture::create2D(gpu::Element(gpu::VEC4, gpu::UINT8, gpu::RGBA), 1, 1)); |
| 146 | _blueTexture->assignStoredMip(0, _blueTexture->getTexelFormat(), sizeof(OPAQUE_BLUE), OPAQUE_BLUE); | 146 | _blueTexture->assignStoredMip(0, _blueTexture->getTexelFormat(), sizeof(OPAQUE_BLUE), OPAQUE_BLUE); |
| 147 | } | 147 | } |