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

Method allocateDataStore

src/cinder/gl/Texture.cpp:2240–2254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2238}
2239
2240void TextureData::allocateDataStore( size_t requireBytes )
2241{
2242#if defined( CINDER_GL_ES )
2243 mDataStoreMem = unique_ptr<uint8_t[]>( new uint8_t[requireBytes] );
2244#else
2245 if( mPbo ) {
2246 if( mPbo->getSize() < requireBytes )
2247 mPbo->bufferData( requireBytes, nullptr, GL_STREAM_DRAW );
2248 }
2249 else {
2250 mDataStoreMem = unique_ptr<uint8_t[]>( new uint8_t[requireBytes] );
2251 }
2252#endif
2253 mDataStoreSize = requireBytes;
2254}
2255
2256void TextureData::mapDataStore()
2257{

Callers 2

parseKtxFunction · 0.80
parseDdsFunction · 0.80

Calls 2

bufferDataMethod · 0.80
getSizeMethod · 0.45

Tested by

no test coverage detected