| 2254 | } |
| 2255 | |
| 2256 | void TextureData::mapDataStore() |
| 2257 | { |
| 2258 | #if ! defined( CINDER_GL_ES ) |
| 2259 | if( mPbo ) { |
| 2260 | mPboMappedPtr = mPbo->map( GL_WRITE_ONLY ); |
| 2261 | if( ! mPboMappedPtr ) { |
| 2262 | CI_LOG_W( "Failed to map PBO for TextureData of size " << mDataStoreSize << " bytes. Using CPU heap instead." ); |
| 2263 | // a failure to map the data store means we need to resort to memory as a backup |
| 2264 | if( ! mDataStoreMem ) |
| 2265 | mDataStoreMem = unique_ptr<uint8_t[]>( new uint8_t[mDataStoreSize] ); |
| 2266 | } |
| 2267 | } |
| 2268 | #endif |
| 2269 | } |
| 2270 | |
| 2271 | void TextureData::unmapDataStore() |
| 2272 | { |