| 575 | } |
| 576 | |
| 577 | void TIC80Node::updateTexture() { |
| 578 | auto tic = s_cast<TIC80*>(_tic80.get())->tic; |
| 579 | if (!tic || !tic->screen) return; |
| 580 | |
| 581 | auto texture = getTexture(); |
| 582 | if (!texture || texture->getWidth() < TIC80_FULLWIDTH || texture->getHeight() < TIC80_FULLHEIGHT) { |
| 583 | return; |
| 584 | } |
| 585 | |
| 586 | const bgfx::Memory* mem = bgfx::copy(tic->screen, s_cast<uint32_t>(TIC80_FULLWIDTH * TIC80_FULLHEIGHT * sizeof(u32))); |
| 587 | bgfx::updateTexture2D(texture->getHandle(), 0, 0, 0, 0, |
| 588 | TIC80_FULLWIDTH, |
| 589 | TIC80_FULLHEIGHT, |
| 590 | mem); |
| 591 | } |
| 592 | |
| 593 | bool TIC80Node::update(double deltaTime) { |
| 594 | if (!_tic80) return true; |
nothing calls this directly
no test coverage detected