From c79c5df295111060468b6fe991b0be18f0fc5889 Mon Sep 17 00:00:00 2001 From: Chris Oates Date: Wed, 2 Jul 2014 13:50:47 -0700 Subject: [PATCH] Fixing up #define / #if pair so that permutation table change can be turned of by setting #defined variable to 0 instead of having to comment it out. --- interface/src/renderer/TextureCache.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/src/renderer/TextureCache.cpp b/interface/src/renderer/TextureCache.cpp index 1352b2c326..01c3dc1cc1 100644 --- a/interface/src/renderer/TextureCache.cpp +++ b/interface/src/renderer/TextureCache.cpp @@ -110,7 +110,7 @@ const int permutation[256] = 222, 114, 67, 29, 24, 72, 243, 141, 128, 195, 78, 66, 215, 61, 156, 180 }; -#define USE_CHRIS_NOISE 0 +#define USE_CHRIS_NOISE 1 GLuint TextureCache::getPermutationNormalTextureID() { if (_permutationNormalTextureID == 0) { @@ -119,7 +119,7 @@ GLuint TextureCache::getPermutationNormalTextureID() { // the first line consists of random permutation offsets unsigned char data[256 * 2 * 3]; -#if defined(USE_CHRIS_NOISE) +#if (USE_CHRIS_NOISE==1) for (int i = 0; i < 256; i++) { data[3*i+0] = permutation[i]; data[3*i+1] = permutation[i];