| 476 | } |
| 477 | |
| 478 | void 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 | |
| 494 | void FontAtlas::setTexture(unsigned int slot, Texture2D* texture) |
| 495 | { |
nothing calls this directly
no test coverage detected