MCPcopy Create free account
hub / github.com/axmolengine/axmol / addNewPageWithData

Method addNewPageWithData

core/2d/FontAtlas.cpp:478–492  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

476}
477
478void FontAtlas::addNewPageWithData(const uint8_t* data, size_t size)
479{
480 assert(_currentPageDataSize == size);
481
482 auto texture = new Texture2D();
483 texture->initWithData(data, _currentPageDataSize, _pixelFormat, _width, _height);
484
485 if (_antialiasEnabled)
486 texture->setAntiAliasTexParameters();
487 else
488 texture->setAliasTexParameters();
489
490 setTexture(++_currentPage, texture);
491 texture->release();
492}
493
494void FontAtlas::setTexture(unsigned int slot, Texture2D* texture)
495{

Callers

nothing calls this directly

Calls 4

initWithDataMethod · 0.45
setAliasTexParametersMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected