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
89#define USE_CHRIS_NOISE 189#define USE_CHRIS_NOISE 1
90 90
91const gpu::TexturePointer& TextureCache::getPermutationNormalTexture() {91const gpu::TexturePointer& TextureCache::getPermutationNormalTexture() {
92 if (_permutationNormalTexture.isNull()) {92 if (!_permutationNormalTexture) {
93 93
94 // the first line consists of random permutation offsets94 // 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
135const gpu::TexturePointer& TextureCache::getWhiteTexture() {135const 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
143const gpu::TexturePointer& TextureCache::getBlueTexture() {143const 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 }