| 147 | } |
| 148 | |
| 149 | void TextureBufferPool::free(const ITextureBufferHandle &handle) { |
| 150 | auto iter = std::find(_handles.begin(), _handles.end(), handle); |
| 151 | if (iter != _handles.end()) { |
| 152 | _chunks[handle.chunkIdx].end = handle.end; |
| 153 | _handles.erase(iter); |
| 154 | } |
| 155 | } |
| 156 | |
| 157 | uint32_t TextureBufferPool::createChunk(uint32_t length) { |
| 158 | uint32_t texSize = length * length * _formatSize; |