MCPcopy Create free account
hub / github.com/cinder/Cinder / mapDataStore

Method mapDataStore

src/cinder/gl/Texture.cpp:2256–2269  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2254}
2255
2256void 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
2271void TextureData::unmapDataStore()
2272{

Callers 2

parseKtxFunction · 0.80
parseDdsFunction · 0.80

Calls 1

mapMethod · 0.45

Tested by

no test coverage detected