| 133 | } |
| 134 | |
| 135 | int hsStockTextureIndexRemap(int textureIndex) { |
| 136 | int remappedIndex = textureIndex; |
| 137 | |
| 138 | int nStockTextures = 30; |
| 139 | |
| 140 | // Remap texture index between 0 and MAX_TEXTURE_ARRAY_SIZE if exceeds |
| 141 | if (textureIndex >= 2048) { |
| 142 | remappedIndex = MAX_TEXTURE_ARRAY_SIZE - nStockTextures + (textureIndex - 2048); |
| 143 | } |
| 144 | |
| 145 | ASSERT(remappedIndex <= MAX_TEXTURE_ARRAY_SIZE, "Texture index still exceeds max texture array size, post-remap"); |
| 146 | |
| 147 | return remappedIndex; |
| 148 | } |
| 149 | |
| 150 | GLuint MakeTextureArray(std::map<unsigned int, Texture> &textures, bool repeatable) { |
| 151 | ASSERT(textures.size() < MAX_TEXTURE_ARRAY_SIZE, "Configured maximum texture array size of " << MAX_TEXTURE_ARRAY_SIZE << " has been exceeded."); |
no outgoing calls
no test coverage detected